getenv and putenv

Q&A's, tips, howto's
Locked
eddier
Posts: 289
Joined: Mon Oct 07, 2002 2:48 pm
Location: Blue Mountain College, MS US

getenv and putenv

Post by eddier »

Lutz,

I noticed you replaced read-process and write-process with exec.

How about replacing getenv and putenv with env?

Eddie

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

you mean:

(env str str) = (putenv str str)
(env str) = (getenv str)

and how about ?

(env) = (environ)

not a bad idea, kind of a logical progression, I would introduce env and leave the old getenv/putenv/environ until several releases after? What do other usrers think?

Lutz

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

sounds logical and consistent

eddier
Posts: 289
Joined: Mon Oct 07, 2002 2:48 pm
Location: Blue Mountain College, MS US

Post by eddier »

Yes, that's what I mean. Oh yea, I keep thinking to ask but never do

Is println just a pretty print version of write-line? If so, I should be using write-line instead of println for cgi operations. How about a write function like print except no pretty printing?

Eddie

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

print and println only to pretty-printing when printing lisp espressions. When printing strings no pretty prining is performed. write-line only prints struings and can only take one argument and also can take a file handle.

So there is no reason to prefer write-line over println when printing strings.

Lutz

eddier
Posts: 289
Joined: Mon Oct 07, 2002 2:48 pm
Location: Blue Mountain College, MS US

Post by eddier »

Thanks Lutz.

I never have used write-line. Does it really have a purpose given println?

Also, I am e-mailing the new version of ecal.cgi with the bell.png image. Overlook the cookie info at the bottom of the applet when setting a reminder. I am going to use that to find out what is up with the time-zone function. I'm on vacation next week, so I probably wont have a time-zone fix for two weeks.

Eddie

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

write-line can take a filehandle, it belongs to the write-char, write-buffer family.

Lutz

Locked