Re: environmental variables
From: Joona I Palaste (palaste_at_cc.helsinki.fi)
Date: 12/12/04
- Next message: geowar: "Re: Writing a virtual Santa Claus in C ?"
- Previous message: Kenny McCormack: "Re: environmental variables"
- In reply to: Kenny McCormack: "Re: environmental variables"
- Next in thread: Greg Comeau: "Re: environmental variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 Dec 2004 16:38:55 GMT
Kenny McCormack <gazelle@yin.interaccess.com> scribbled the following:
> In article <cpc0lv$jo0$1@oravannahka.helsinki.fi>,
> Joona I Palaste <palaste@cc.helsinki.fi> wrote:
>>Satya Das <satyaranjandas77@yahoo.com> scribbled the following:
>>> /*
>>> This program should print all the environment variables.
>>> */
>>
>>Only on some implementations.
>>
>>> #include <stdio.h>
>>> int main( int argc, char *argv[], char *envp[] )
>>
>>This form of main() is non-standard and causes undefined behaviour.
>>It might work for some implementations but is not guaranteed to work
>>on any.
> Bzzzzt. It is guaranteed to work on Unix (aka, POSIX).
> This serves as a counterexample to the statement that there doesn't exist
> a system under which it is guaranteed to work.
When I say "guaranteed" I mean "guaranteed by the C standard", keeping
with the topic of this group. Implementations may guarantee what they
want, as long as it doesn't conflict with the C standard, but that's off
topic here.
-- /-- Joona Palaste (palaste@cc.helsinki.fi) ------------- Finland --------\ \-------------------------------------------------------- rules! --------/ "I am lying." - Anon
- Next message: geowar: "Re: Writing a virtual Santa Claus in C ?"
- Previous message: Kenny McCormack: "Re: environmental variables"
- In reply to: Kenny McCormack: "Re: environmental variables"
- Next in thread: Greg Comeau: "Re: environmental variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|