Thursday, February 18, 2010

MEL Lesson 2 Variables

Execute the following 2 commands in the script editor.
$name = "ABC";
print $name;

Tip: If you dont know how to execute please see lesson 1.
Result:
ABC
Do you understand what is happening.
The print command is telling the output window to display "$name".
Since $name has the symbol $ as the first letter, the command understands it as a variable and looks for its value.
Since the value of "$name" is defined earlier as "ABC", the print command tells the output window to display "ABC".

No comments:

Post a Comment