[Coco] OS-9 environment variables?

Allen Huffman alsplace at pobox.com
Wed Apr 15 18:02:51 EDT 2009


On Apr 15, 2009, at 11:39 AM, Roger Taylor wrote:
> Is the data guaranteed to be there after hitting Reset?

No. It would be like environment variables on DOS, etc. where they are  
just named values you can set and read between programs.

However, due to implementing it in a DATA MODULE on OS-9, there would  
be the capability to write them to disk, and restore on the next boot.

RESET causes the system to reload, yes?

GENE:
> Tell me, is this going to be easier that having a file on disk (or  
> in myram,
> copied there by the startup script) along with a cron job to check &  
> see if

I was not planning any such thing. The user would be responsible for  
saving data if it was important to them. What operating systems  
provide environment variables that are maintained between reboots? I  
have not worked with any that did that, so I didn't even know that was  
an option.

TIM:
> Don't most OS's keep the environment variables in a file?   
> like .profoile, .csh, .login .logout etc?

Not that I know of. THose are read-only configuration files, read at  
startup (like autoexec.bat) or shell start or login. Different  
creatures.

WILLARD:
> getenv() and setenv() in the cgfx library read/write "environment
> variables" from /dd/sys/env.file

Willard shoots and scores! I did not know CGFX had those calls, though  
during my CoCO days, I have never heard of getenv() and setenv().   
INTERESTING!

Is that the stock Tandy version of CGFX, or the third party one?

			-- Allen




More information about the Coco mailing list