Re: is this stadard C?
From: Keith Thompson (kst-u_at_mib.org)
Date: 02/22/05
- Next message: Renato: "Is this board a good alternative to the PC?"
- Previous message: manan.kathuria_at_gmail.com: "Re: expression evaluation : help!"
- In reply to: Alan Balmer: "Re: is this stadard C?"
- Next in thread: E. Robert Tisdale: "Re: is this stadard C?"
- Reply: E. Robert Tisdale: "Re: is this stadard C?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 22 Feb 2005 20:25:42 GMT
Alan Balmer <albalmer@att.net> writes:
> On Tue, 22 Feb 2005 02:19:57 -0800, Lowell Kirsh <lkirsh@cs.ubc.ca>
> wrote:
>
>>Thank you all for your answers. I get the impression that using this
>>form is pretty unnecessary. It seems like using getenv would be a better
>>solution in most cases.
>>
> If you know the name of the environment variable you're looking for,
> yes, it's easier to use getenv(). If, for some reason, you wanted to
> search the environment variables, the "char *env[]" form would be the
> way to do it.
<OT>
Passing the extra parameter to main() is one way to do it. Another is
(I think) declaring "extern char *environ[];". The latter is cleaner,
IMHO. Both, of course, are non-standard.
</OT>
-- Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst> We must do something. This is something. Therefore, we must do this.
- Next message: Renato: "Is this board a good alternative to the PC?"
- Previous message: manan.kathuria_at_gmail.com: "Re: expression evaluation : help!"
- In reply to: Alan Balmer: "Re: is this stadard C?"
- Next in thread: E. Robert Tisdale: "Re: is this stadard C?"
- Reply: E. Robert Tisdale: "Re: is this stadard C?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]