Variables

A Vortex variable is denoted by a dollar sign ($) immediately followed by a name. Variable names have the same syntax as function names (here), i.e. alphanumerics, underscores, spaces or a period, and are case-sensitive (i.e. $value and $Value are distinct variables). If a variable name contains non-alphanumeric characters, or is adjacent to text not part of its name, its name must be quoted to delimit it, e.g.:

I $'prefix'opened the case.

A variable is printed by simply referring to it in the Vortex script, as above. Its value is automatically HTML-escaped when printed (unless the script content type is non-HTML, or HTML mode is explicitly turned off - see <vxcp htmlmode>, here)). To print a literal $, use $$:

The price is $$39.95.

In syntaxversion 8 and later (here), the character sequences $., $[, $], and $n (where n is a digit) may be used, and will be taken as literal characters. This is to aid JSON code.



Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.