Arbortext Command Language > Using the Arbortext Command Language > ACL Syntax Conventions for Quotation Marks
  
ACL Syntax Conventions for Quotation Marks
Either double (") or single (') quotes can be used to delimit strings.
When a variable occurs within double quotes, its value is substituted. For example,
String
Result
$firstname="John"
$lastname="Smith"
$string1="My name is $firstname
$lastname."
My name is John Smith.
When a variable occurs in a string delimited by single quotes, it is treated as a literal string. For example,
String
Result
$string2='My name is $firstname
$lastname.'
My name is $firstname $lastname.
If a dollar sign ($) is directly followed by characters, the sequence is treated as a variable string. To treat the sequence as a literal string, use two consecutive dollar signs. For example,
String
Result
$firstname="John"
$lastname="Smith"
$string3="My name is $$firstname
$lastname."
My name is $firstname Smith.
Also note that backslash (\) sequences are recognized in double-quoted strings but not in single-quoted strings. In the following example, the backslash (\) and double quotes () are used to create a newline character that is assigned to the variable $n1.
$n1="\n"
The next example is a string of the two characters `\' and `n':
$n1=`\n'