Marco Bleich wrote:
>> According to my compiler, it is. :) You're thinking PRE-ANSI. Like K&R
>> original C.
> Nope. I'm not. Take a look at 'Wiki':
> http://en.wikipedia.org/wiki/ANSI_C
> http://en.wikipedia.org/wiki/C_(programming_language)

Right. To quote that page:

"To mitigate the differences between K&R C and the ANSI C standard, the
__STDC__ macro can be used to split code into ANSI and K&R sections."

:)

Or according to my K&R book:

  A note of history: The biggest change between ANSI C and earlier version
  is how functions are declared and defined. In the original definition of
  C, the power function would have been written like this:

  /* ... */
  power(base, n)
  int base, n;
  {
     ...
  }

There was C used before the ANSI ratification of it.

That said, it appears that variables declared not at the top was in fact not
part of the c89 spec. But there was definitely pre-ANSI C.

I'm annoyed that gcc doesn't get angry about that stuff. It really should.
Ah well, I'll fix it up next time I have a few minutes, won't take long.

Thanks for making me look that up, it's been too long. :)

-- 
Phil Dibowitz                             [EMAIL PROTECTED]
Open Source software and tech docs        Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming


Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to