Environment variables: Difference between revisions

Content deleted Content added
PureFox (talk | contribs)
m →‎{{header|Wren}}: Minor tidy
J7M (talk | contribs)
Add SmallBASIC
 
(2 intermediate revisions by one other user not shown)
Line 191:
 
<syntaxhighlight lang="is-basic">ASK machine-option-code var</syntaxhighlight>
 
==={{header|SmallBASIC}}===
<syntaxhighlight lang="langurqbasic">writeln "HOME: ", _env'HOME
print env("HOME")
print env("PATH")
print env("USER")
</syntaxhighlight>
 
==={{header|ZX Spectrum Basic}}===
Line 578 ⟶ 585:
 
=={{header|langur}}==
<syntaxhighlight lang="langur">writeln "HOME: ", _env["HOME"]
writeln "PATHHOME: ", _env["PATH"]'HOME
writeln "USER: ", _env["USER"]</syntaxhighlight>
 
{{works with|langur|0.9}}
We could also the short-hand form of indexing by string. This is limited to code points used for tokens and does not allow for spaces, nor an index alternate.
<syntaxhighlight lang="langur">writeln "HOME: ", _env'HOME
writeln "PATH: ", _env'PATH
writeln "USER: ", _env'USER</syntaxhighlight>
</syntaxhighlight>
 
=={{header|Lasso}}==