From owner-freebsd-questions Thu Jan 14 12:36:29 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA03923 for freebsd-questions-outgoing; Thu, 14 Jan 1999 12:36:29 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from alice.gba.oz.au (gba-254.tmx.com.au [203.9.155.254]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id MAA03881 for ; Thu, 14 Jan 1999 12:36:23 -0800 (PST) (envelope-from gjb@acm.org) Received: (qmail 8307 invoked by uid 1001); 14 Jan 1999 20:10:43 -0000 Message-ID: <19990114201043.8306.qmail@alice.gba.oz.au> X-Posted-By: GBA-Post 1.03 20-Sep-1998 X-PGP-Fingerprint: 5A91 6942 8CEA 9DAB B95B C249 1CE1 493B 2B5A CE30 Date: Fri, 15 Jan 1999 06:10:42 +1000 From: Greg Black To: Gustavo Vieira Goncalves Coelho Rios Cc: FreeBSD Subject: Re: programming References: In-reply-to: of Thu, 14 Jan 1999 14:22:08 -0200 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Does it covers something about memory stack ? > diffrences among static, volatile e dynamic declarations, etc!!! K&R covers everything about C. It doesn't discuss other languages. > in C the following code is worng!!! > ... > for (int a=0;a&~5;a++) Yes, it's not C. > The right would be: > int a; > for(a=0;a&~5;a++) That depends on your definition of "right". It's syntactically correct, but since it does nothing (as the second expression in the for statement will never be true), it's not much use. And, in any sensible environment, the lack of white space would be seen as a crime. It "should" be: for (a = 0; a & ~5; a++) Since this is not a FreeBSD question, I won't say any more about it on the list. -- Greg Black To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message