Open System Testing Architecture

TOC PREV NEXT INDEX



Variable Values

A set of values may be associated with a variable, using a value clause in the variable definition. They are used by the GENERATE and NEXT commands, which allow the variable to be assigned a value from the list or range, either randomly (using GENERATE) or sequentially (using NEXT). Values may be specified as a list (integer and character variables) or as a range (integers only). Note: Lists may contain only individual values, and not ranges.

Variables which have been declared as an array may not have an associated value list or range. A value list has the following format:

 (value1{, value2, value3 ...})

The values must be of the same data type as the variable, i.e. integer values for integer variables and character values for character variables. They may be literals or constants which have previously been defined.

Note: In the case of character variables, the maximum size of a character constant or literal string is 65535 characters.

Ranges provide a shorthand method for defining a list of adjacent integer values and have the following format:

 (start_value - end_value)

If the start value is less than the end value, the variable is incremented by 1 on each execution of the NEXT command, until the end value is reached. If the start value is greater than the end value, the variable is decremented by 1 on each execution of the NEXT command, until the end value is reached.

If the variable is set to the end value when the NEXT command is executed, the variable will be reset to the start value. You can also reset the variable explicitly, by using the RESET command.

In the following list of example variable definitions including values, the first two definitions are equivalent:

 Integer       A         (4,3,2,1,0,-1)
 Integer       B         (4 - -1)
 Integer       C         (100 - 999)
 Integer       D         (100,200,300,400)
 Character*10  Language  ("ENGLISH", 'FRENCH', &
                          'GERMAN', "SPANISH")
 Character     Control   ("~<CR>", "~<LF>", "^Z", &
                          "^X", "^U")

See also:

The DEFINITIONS Section


OpenSTA.org
Mailing Lists
Further enquiries
Documentation feedback
CYRANO.com
TOC PREV NEXT INDEX