Printing values

 
 
 

Commands always print their result in the Script Editor. However, unlike some read-eval-print type environments you might be used to, typing an expression in the command line or Script Editor does not automatically print out the expression’s value. For example, typing the following expression in the Script Editor...

500 + 5

...results in a syntax error. To print the result of an expression you must use the print command:

print(500);
print("Hello world!\n");
print("The time is now " + $time);

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License