How do I check to see if an environment variable exists?
smaclean at madmansoft.com
Fri Nov 23 17:27:26 EST 2018
Looking to see how I check to see if my standalone was launch via command line with a parameter?
I know that when it’s launched via command line with a parameter in windows, I will see a $0 (Name of executable) and $1 for the parameter.
Since this is a dual launch able app, double click and command line with parameter I have the following in the main stack:
if exists($1) then
put $1 into pState
put "prod" into pMode
runBuildAndPush pState, pMode
However, the exists($1) never returns true, even when it should. Which leads to to believe that’s not what I want to use.
How would I test to see if the $1 variable exists?
More information about the use-livecode