Re: getenv

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jeremy Cowgar wrote:
> 
> Kenneth Rhodes wrote:
> > 
> > So which is it? ALL SORTS / ALL OVER or ONLY ONCE? It sounds as 
> > though your new ifdef code might simply the cross-platform problem
> > with getenv() without having to dumb down Linux.
> > 
> 
> It makes it possible but it does not simplify anything. It just places the
> burden
> on the programmer. The programmer must know there is a difference, then he/she
> must account for that difference in their program.
> 
> And the real issue to me is that the getenv() returning "" in Linux has no
> practical
> benefit.
> 
> --
> Jeremy Cowgar
> <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>

Right, but that's a "feature" of Linux and not a "bug" in Windows. If the OS
returns an empty string then so should Euphoria. If the OS returns "does not
exist" then so should Euphoria.

en = getenv("FOO")
if atom(en) or length(en) = 0 then
   -- empty
end if

--
A complex system that works is invariably found to have evolved from a simple
system that works.
--John Gall's 15th law of Systemantics.

"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare

j.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu