Variables

A variable is a place to store a piece of information. You can think of it as a “slot” into which you can store a value. Presentation layouts support the following types of variables:

  • Integer: A whole number from –2,147,483,648 to 2,147,483,647 (inclusive).
  • Decimal: A fractional number from –9×10306 to 9×10306 with a precision of 15 decimal places.
  • String: A series of up to 255 letters, numbers, and punctuation characters.
  • Boolean: True or false.
  • Point: An x,y coordinate (for example: 10, 20). Each number must be an integer from –2,147,483,648 to 2,147,483,647 (inclusive).
  • Object: A reference to an interactive object.

Each variable has a unique name. When you use a variable’s name in an expression, you’re telling an interactive presentation to go find whatever value is stored in that variable and use that value in the expression.

For example, let’s say you have an integer variable named IntVar that contains the number 6. You can then create the following expression:

Box1.Append(IntVar)

When this expression is executed (or “evaluated”), the interactive presentation will find the value stored in the variable named “IntVar” (6) and put that value in the box named “Box1.” Afterward, the text box named “Box1″ will contain the number 6.

Variables can be very useful. You can use a variable to store information such as the number of the last page someone visited in a presentation, the end user’s name, or the number of points scored in a game.

Note: Variable names are case-insensitive.

Variables