PDA

View Full Version : Variable Initialization



LoboMgr
05-25-2006, 06:32 PM
Do Variables need to be initialized to 0 or ""?

If my own variable already has a non-zero or non-null value at script entry, is it reasonable to expect that it was set by a command line option?

linder
05-27-2006, 05:45 AM
Hello,

You can set it to 0, or "" or to any other value.

The first variable declaration (Set Variable) always receives the variable value passed through the command line.

So if you set it to -1 to initialize it and it is still -1 after the Set Variable declaration then it could mean that the command line did not pass the value to the variable.

Does this help?