Strings, Escape sequences – Teledyne LeCroy BTTracer_Trainer - BTTrainer Users Manual User Manual
Page 310

292
CATC BTT
RAINER
2.11
C
HAPTER
User’s Manual
Hexadecimal numbers must be preceded by 0x: 0x2A, 0x54,
0xFFFFFF01
Octal numbers must begin with 0: 0775, 017, 0400
Decimal numbers are written as usual: 24, 1256, 2
Binary numbers are denoted with 0b: 0b01101100, 0b01,
0b100000
Strings
String literals are used to represent text. A string consists of zero or more
characters and can include numbers, letters, spaces, and punctuation. An
empty string ("") contains no characters and evaluates to false in an
expression, whereas a non-empty string evaluates to true. Double quotes
surround a string, and some standard backslash (\) escape sequences are
supported.
Escape Sequences
These are the available escape sequences in CSL:
String
Represented text
"Quote: \"This is a string
literal.\""
Quote: "This is a string
literal."
"256"
256
**Note that this does not represent the
integer 256, but only the characters that make up the
number.
"abcd!$%&*"
abcd!$%&*
"June 26, 2001"
June 26, 2001
"[ 1, 2, 3 ]"
[ 1, 2, 3 ]
Character
Escape Sequence
Example
Output
backslash
\\
"This is a backslash: \\"
This is a backslash: \
double quote
\"
"\"Quotes!\""
"Quotes!"
horizontal tab
\t
"Before tab\tAfter tab"
Before tab After tab
newline
\n
"This is how\nto get a
newline."
This is how
to get a newline.
single quote
\'
"\'Single quote\'"
'Single quote'