Assigning Values to Variables


[Home][Index][Previous][Next]
You assign a value to a variable in AppletQuiz using a numerical assignment string of the form:

{{$variable=expression}

Any format code starting with "{$" that is not followed by "IMG", "COLOR", "SIZE", "STYLE", "EXP", "SUB", or "FONT" (or their lower-case equivalents) is considered to be a numerical format string. The equals sign ("=") is not optional in this case.

A numerical assignment string assigns the numerical value of "expression" to the "variable", where variable is a single character "A"-"Z" (not case sensitive). This assignment statement will not display in your question.

"Expression" consists of one-or-more characters that provide a numerical value for the variable. If you are familiar with any modern computer programming language, the syntax of the AppletQuiz expression will be familiar to you. An "expression" can contain:

Conventionally, the variables used in a question are assigned values at the beginning of the question text, but this is not a requirement. (See the example.)


[Home][Index][Previous][Next]
copyright © 1998 by Jerry L. Stanbrough - all rights reserved.
last update July 29, 1998 by JL Stanbrough (jstanbro@venus.net)