Skip to main content
Skip table of contents

Varf

3.2.18 Varf

DESCRIPTION

Varf - Define one or more variables where the value may contain Java escape sequences allowing to insert new lines, tabs or special Unicode characters. Supported since v3.5.1. 

SYNOPSIS

varf <var_name_1>=<value_1> [<var_name_2>=<value_2> ... <var_name_N>=<value_N>]
* Red colour indicates obligatory parameters

OPTIONS

var_name

- A name for the variable. The name is case sensitive and may not contain spaces.

value

- Variable value. If the value contains spaces, it must be enclosed in double quotes, e.g. "This is a text containing spaces". Escape sequences will be converted as follows:

    \b    /* \u0008: backspace BS */
    \t    /* \u0009: horizontal tab HT */
    \n    /* \u000a: linefeed LF */
    \f    /* \u000c: form feed FF */
    \r    /* \u000d: carriage return CR */
    \"    /* \u0022: double quote " */
    \'    /* \u0027: single quote ' */
    \\    /* \u005c: backslash \ */
    \uNNNN will be converted to the appropriate Unicode character as long as NNNN is a valid Unicode character hexadecimal value
   
RETURNS

The Varf command always returns 0 (zero).

EXAMPLES

Varf MULTILINE="Line #1\nLine #2"

- Populate the MULTILINE variable with two lines of text (the '\n' sequence will be converted to new line).

Varf MULTILINE="Line #1\u000aLine #2"

- Same example as above where the new line character is specified through escaped Unicode (new line is ASCII 10, 0x0a).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.