5.2 Printing results

Besides the print command, you can also use the message command to print contents to a dialog box. This approach comes in handy if you want to pause the execution of the program, displays some value, and require the user to click the OK button to continue.

Try out this command:

message [here is a message]

This prints a message without the square brackets. This is because the message command expects a list. The contents enclosed by a pair of square bracket forms a list. If you want to output a single word, it still has to be enclosed by square brackets, such as

message [stop]