(Page 5 of 5 in this chapter)


TEST

Description

Compares the input string with a specified value and jumps if the test evaluation is true.

If the keyword CASE or NOCASE is specified, a character comparison is performed. Otherwise an integer comparison of up to five digits is performed.

If the test evaluation is true, processing continues with the command at the specified label. If a CALL jump is specified, processing resumes at the next line in the Prompt Rules table once control is returned.

If the test evaluation is false or no label is specified, processing continues directly to the next line unless the EXIT keyword is used. In this case, processing resumes at the line following the command which called this one.

Command Specification

TEST [GREATER|LESS|EQUAL|NOT] [CASE|NOCASE] cmpval[CALL|GOTO|ERROR] [label] [[ELSE] EXIT|CONT]

GREATER True if substring is greater than cmpval.

LESS True if substring is less than cmpval.

EQUAL True if substring is equal to cmpval.

NOT True if substring is not equal to cmpval. This is the default.

CASE Do a case sensitive compare.

NOCASE Do a case insensitive compare. This is the default.

cmpval Value with which to compare substring.

CALL Call the command at label, if true.

GOTO Go to the command at label, if true. This is the default.

ERROR Return VCEERR_PROMPT_BUILD_FAIL immediately.

label Command to execute if evaluation is true.

ELSE Optional NO-OP keyword allowed before EXIT to enhance readability.

EXIT Return if a label was specified and evaluation is False or no label was specified and evaluation is True.

CONT Continue if false evaluation. This is the default.

Examples



(Page 5 of 5 in this chapter)


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.