String variable that can store and return the string values you specify.
Syntax |
Description |
SVAR n = "text" |
Sets the value of the specified string variable. |
SVAR n |
Returns the value stored in the specified string variable. |
The SVAR command syntax uses these parameters:
Parameter |
Description |
n |
An integer from 1 to 100. This is the unique identifier for the string variable. |
"text" |
The string value stored in the string variable. This can be any text string expression. |
The default value of a new SVAR is not always a blank string. For this reason, it is recommended that you initialize each SVAR in your template by setting it to a specific value (such as "") at the beginning of the template. You can initialize specific SVARs or initialize all SVARs and NVARs.
Example:
SVAR 3 = "Test"
|
Stores the characters "Test" in string variable 3. |
SVAR 3 |
Returns the text string "Test". |
Example:
SVAR 1 = CONCAT "Test " , "String"
|
Stores the characters "Test String" in string variable 1. |
SVAR 1 |
Returns the text string "Test String". |
Example:
SVAR 30 = [A1] |
Stores the string value of cell [A1] in string variable 30.
|
SVAR 30 |
Returns the string value stored in string variable 30.
|
Example:
SVAR 3 = "A2" |
Stores the characters "A2" in string variable 3.
|
GOTO [SVAR 3] |
The template will go to cell [A2]. |
Note: Do not use the equals sign (=) to compare SVAR values with text or with other SVAR values, because this test will return incorrect values.