strings
This is an old revision of the document!
Strings and their prefixes
A string in X# is delimited by the double quotation mark:
cString := "this is a string"
This is valid for the VO, Vulcan and Code dialects. In the VO dialect a string can also be delimited by the single quotation mark:
cString := 'this is a string'
This is to make X# compatible to VO code.
If you need to use special characters or double quotation mark in your string, the enhanced string does what you need:
cString := e"this is a \"string\"."
and of course you can also embed other control characters in your string:
cString := e"this is a multiline\nstring with another\nline"
But you can do even more with interpolated strings:
local cMyVar := "Hi" as string cString := i"{cMyVar} guys"
Of course you can use both at the same time:
cString := ei"this is a \"string\". that references {cLocalVar}"
And only in the VO dialect, you need to prefix a char with the c
prefix:
cChar := c'a'
strings.1518585186.txt.gz · Last modified: 2018/02/14 05:13 by wolfgangriedmann