Closed xvxx closed 5 years ago
Okay, you can do it this way:
$ cat env.ldpl
DATA:
$name is text
PROCEDURE:
execute "echo $NAME" and store output in $name
display "Your name is: " $name
$ ./env-bin
Your name is:
$ env NAME=Bobby ./env-bin
Your name is: Bobby
Maybe that's good enough? It's nice to keep the language small.
The language is growing beyond what I've thought it would. It's still not a really usable language though. What I'm saying here is: if you'd like to add something to the language it's ok to do so.
In this particular case, I don't feel this is a necessary thing, as you can do that, but the main problem here is that environmental variables are different in Windows and in Unix/BSD, so making something that works for both would be kind of a chore.
In this particular case, I don't feel this is a necessary thing, as you can do that, but the main problem here is that environmental variables are different in Windows and in Unix/BSD, so making something that works for both would be kind of a chore.
Makes sense! I like this reasoning. :+1:
Awesome! Thank you! I'll be closing this then.
I don't think there's a way to get ENV variables in LDPL currently, right?
If not, they could either be pre-set like
argv
andargc
, or there could be a new statement likeSTORE ENV AT "PATH" IN $path
to do a lookup.