Allin Cottrell schrieb:
On Thu, 12 Apr 2007, Sven Schreiber wrote:
>
> Hence my question: what type of environment variables can be used in a
> script? Or any other ideas on a good place to store temp files (on all
> supported platforms)?
See chapter 11, section 2 of the User's Guide, sub-head "Built-in
strings". You have "@userdir" which gives the user directory,
which must be writable (or else gretl will fail at startup).
Again, I should have read the latest manual... That sounds very good!
(Although your last statement above doesn't seem 100% correct at least
on windows, gretl started ok for me with a user dir setting of "/".
Don't know what that would mean on windows, but I couldn't open a gretl
console or a new script until I changed that to something more sensible.)
I also just learned about the named strings. Very nice as well! But --
I can print out "@userdir" alright, but can't assign to a string:
? string jojo = "@userdir"
Syntax error in command line
? string jojo = @userdir
Syntax error in command line
? print "@userdir"
C:\openprogs\gretlwork\
?
Bug or feature?
And BTW, could strings be used as function arguments/parameters? (Not
that I have an urgent need, just checking.)
And finally totally unrelated: could it be that the latest win snapshot
has no syntax coloring support compiled in?
We could maybe add a "getenv" function for strings, so you could
grab variables in the external environment.
I guess a working @userdir would be enough for my needs, but of course
if I'm not opposed to other possibilities...
thanks,
Sven