<<%DELIMITER% ... %DELIMITER%
- string1, stringNCharacter
Any character string.
<<%DELIMITER% ... %DELIMITER% allows you to define a quoted character string. This command is typically used when the string includes carriage return-line feed characters (CR-LF).
The string used for "DELIMITER" can be any text you like, as long as it is identical in the opening and closing delimiter statements.
X = <<%a% Alpha Software %a% Y = <<%b% Alpha Anywhere %b%
The above two commands are equivalent to:
X = "Alpha Software" Y = "Alpha Anywhere"
The Xbasic autohelp system will offer suggestions for delimiters as you write your scripts. There are several special case delimiters, such as %code% and %html%, which add special behaviors such as syntax highlighting and validation. The delimiters offered through autohelp include:
- <<%a5w% ... %a5w%
A5W page string
- <<%code% ... %code%
Xbasic code string. Xbasic written inside code blocks will have full access to autohelp and includes syntax highlighting.
- <<%css% ... %css%
CSS code string. CSS written inside a CSS block will include syntax highlighting and autohelp.
- <<%dlg% ... %dlg%
XDialog string. XDialog code written inside dlg blocks will have syntax highlighting and autohelp.
- <<%html% ... %html%
HTML code string. HTML written inside html blocks will have syntax highlighting and autohelp.
- <<%js% ... %js%
- <<%json% ... %json%
- <<%xml% ... %xml%
XML string. XML code written inside xml blocks will have syntax highlighting and autohelp.
- <<%str% ... %str%
- <<%txt% ... %txt%
Example: Array Initialization
The following script initializes an array.
dim colors10 as C ' First, create a string with a list of choices. Each choice is delimited with CR-LF color_string = <<%choices% Red Green Blue Orange Purple %choices% ' Then, initialize the array with the CR-LF delimited string. colors.initialize(color_string)