Index ButtonsFields Message Variables
Ask/Answer Colour Sound Menus QuickTime

Variables

Like fields and buttons, variables are containers. However, unlike fields and buttons, the size of a variable is not limited to 30,000 characters, but depends only on how much available memory (RAM) you have. You can create a variable whenever you need one and you can create as many as you wish.

Variables are containers where values can be stored.

Usually variables are local variables which are only valid in a single operation. Global variables are used for longer storage ( ie until the stack is closed ). For permanent storage Fields are normally used

When variables are created using the message box they are global variables Here are some examples of global variables to try using your message box

type put "cat" into dog and press return

then type dog and press return

type put "poodle" into dog and press return

then type dog and press return

In each example dog is a global variable in which you can store values. You can retrieve the value by invoking the name of the variable in this case dog.

type put 10.3 into dog and press return

then type dog and press return

Often we choose letters to stand as variables much like mathematicians choose them in algebra. Try these examples using x and y as variables

Select Copy and paste these examples, one line at a time, into the Measage Box, then press return

Return to top of page