From owner-freebsd-questions@FreeBSD.ORG Mon Oct 19 15:54:59 2009 Return-Path: Delivered-To: FreeBSD-Questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CA4C106566C for ; Mon, 19 Oct 2009 15:54:59 +0000 (UTC) (envelope-from kline@thought.org) Received: from aristotle.thought.org (aristotle.thought.org [209.180.213.210]) by mx1.freebsd.org (Postfix) with ESMTP id 39FDC8FC0A for ; Mon, 19 Oct 2009 15:54:58 +0000 (UTC) Received: from thought.org (tao.thought.org [10.47.0.250]) (authenticated bits=0) by aristotle.thought.org (8.14.2/8.14.2) with ESMTP id n9JFsm03027777; Mon, 19 Oct 2009 08:54:48 -0700 (PDT) (envelope-from kline@thought.org) Received: by thought.org (nbSMTP-1.00) for uid 1002 kline@thought.org; Mon, 19 Oct 2009 08:54:53 -0700 (PDT) Date: Mon, 19 Oct 2009 08:54:53 -0700 From: Gary Kline To: Erik Trulsson Message-ID: <20091019155452.GE9657@thought.org> References: <20091019013337.GA9522@thought.org> <20091019040229.b4e11bbc.freebsd@edvax.de> <4ad871310910181916q655dec06k72b1e7577751751e@mail.gmail.com> <19163.56681.724615.44106@jerusalem.litteratus.org> <20091019140322.GB35875@Grumpy.DynDNS.org> <20091019141911.GA57854@owl.midgard.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091019141911.GA57854@owl.midgard.homeip.net> User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 23 years of service to the Unix community. X-Spam-Status: No, score=-4.4 required=3.6 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on aristotle.thought.org Cc: FreeBSD-Questions@freebsd.org Subject: Re: need C help, passing char buffer[] by-value.... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2009 15:54:59 -0000 On Mon, Oct 19, 2009 at 04:19:11PM +0200, Erik Trulsson wrote: > On Mon, Oct 19, 2009 at 09:03:22AM -0500, David Kelly wrote: > > On Sun, Oct 18, 2009 at 11:30:49PM -0400, Robert Huff wrote: > > > > > > Glen Barber writes: > > > > > > > > "//" comments are recognized by both C and C++. > > > > > > How about "... are recognized by both C++ and more recent versions > > > of C."? > > > > I think gcc++ and gcc use the same preprocessor? Comments are stripped > > in the preprocessor. > > > > The only thing we can really say is that gcc accepts // as a comment. Is > > becoming an accepted convention in other C's but I doubt one can > > universally state that its accepted in all "recent versions". > > It is accepted in recent versions of C, but not necessarily by all C > compilers, depending on which version of C they support. "//" comments were > added to C in the 1999 revision of the C standard, and was already then a > very common extension that was supported by many compilers. > > If gcc supports "//" comments or not depends on which mode it is running in. > If you run it in strict C89 mode, then it will not support "//" comments, > but if you run it in C99 mode (or as a C++ compiler), it will support them. > This is my FWIW, but I use the std "/*" and "*/" in C programs and often in C++ also. It's only when I'm [1] lazy, or [2] have severe shoulder pains that I'll use the "//" for comments -- anywhere. This is a bit quirky, but even in my prose I'll use #ifdef/#endif and the std C comments. Very handy for sidebar comments, thoughts, work-arounds or "write-around" in early drafts. just my $0.02-worth, gary > > > -- > > Erik Trulsson > ertr1013@student.uu.se > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.31a release of Jottings: http://jottings.thought.org/index.php