Hi all,
What is C99 and C89 ??
Is there anywhere I can download it?
Hi all,
What is C99 and C89 ??
Is there anywhere I can download it?
These are short names for the two versions of the ISO C standard. C89 refers to ISO/IEC 9899:1990 (it's called C89 because the ANSI C standard was published in 1989; because the ISO standard was published in 1990, it's also sometimes called C90). C99 refers to ISO 9899:1999.
You have to pay for the standard documents. You can get them at the ISO homepage, but they're not cheap. Alternatively, there's a sticky thread where you can find links to download the final public drafts of the documents. Note that these drafts can differ in details from the actual standards.
To actually program in C, you need a C compiler instead. You can find a list here.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
Thank you!!!
How can I know which ISO my compiler use??
For example I am using Visual Stduio 6.
Thanks again
VC++ 6 has complete support for C89 and none for C99.
In general, the standards require that a specific preprocessor macro is defined to a specific value for every version. The Wikipedia entry on C lists the macro name and values, and there's a site that specializes in listing predefined macros. I forgot which. (Salem ought to have the link.)
However, the macro isn't entirely reliable, because compilers are really only allowed to define it if they support the standard in full. There is no way, really, to indicate partial support.
As it stands, Sun CC has full C99 support, GCC has nearly full C99 support, MS and Borland compiler have very little C99 support (mostly in the form of extensions backported from C++), and I don't know about others.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
>How can I know which ISO my compiler use??
If your compiler supports C99 it'll document it.
>Is there anywhere I can download it?
If you're on Linux, you can download a trial version of Intel's C compiler, which supports C99 (completely, IIRC). lcc-win32, Digital Mars, GCC, and Open Watcom are all freely available and all have partial support for C99. Of those, the only one that doesn't support C89 is lcc-win32. For $50 you can download Comeau C/C++ which gives you full C support across the board, but it doesn't come with a library and you have to piecemeal it together.
>You can get them at the ISO homepage, but they're not cheap.
For the electronic version, $18 is exceptionally cheap.
>Note that these drafts can differ in details from the actual standards.
Minor details that really only matter to implementors.
My best code is written with the delete key.