Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!ig!agate!ucbvax!CORY.BERKELEY.EDU!dillon
From: dillon@CORY.BERKELEY.EDU (Matt Dillon)
Newsgroups: comp.sys.amiga
Subject: Re: ENV: variables (long)
Message-ID: <8809242100.AA13675@cory.Berkeley.EDU>
Date: 24 Sep 88 21:00:01 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 31

>	Is this really an EFFICIENT idea ?? Please consider this:
>The example "Setenv foobar/width 10" will open a file "width" in the directory
>"foobar" with nothing more in it than the two characters "1" and "0" (well of
>course we get "\0" too, so make that three). How much space have we used to
>get a file that will hold just three characters ?? I smell a waste of space
>here, or have I missed something ??

	Too right... but also remember that one's entire enviroment, even at
1K/var on disk, is still smaller than a tiny application program... especially
on hard disk.

	So while disk space might appear to wasted, the actual space used is
almost nothing compared to other things on the disk.

	And, of course, there is no waste in RAM at all .. just the # bytes
the enviroment text takes.

    			         USING ENV: 

NOTE!  If you are writing programs which set and get enviroment variables,
remember that NO \0 IS PLACED AT THE END OF THE STRING IN THE FILE!  ALSO,
NO NEWLINE IS PLACED AT THE END OF THE STRING IN THE FILE!  that is, 
for standard variables like:

	SetEnv CHARLIE Test

The file would hold:  'T' 'e' 's' 't' ... nothing more.  Files which contain
whole lines of text or other things might have newlines in them, but here I
am just discussion the standard one-liner's

					-Matt