Code formatting and inclusion of special characters (SDL script)
In an SDL script, you specify text to generate by enclosing that text in quotes. For example:
"Generate this text"
In addition, you can control the following formatting features:
• Maximum line length
• Escape characters
• Text indentation
• Carriage returns and line feeds
Maximum line length
By default, there is no maximum line length specified for generated code. You can specify a maximum line length through the Line Length box on the Advanced tab of the Launch ACS/TDK dialog.
Note that setting the Line Length to 0 means that no maximum line length is specified.
Escape characters
You can use the following escape codes to generate formatting and special characters. You can use these escape code within and outside of text enclosed by quotes. For example:
"This is the Dollar character \$\n"
"This is the percentage character " \%\n
To generate
|
Use this escape code
|
a space
|
\s
|
a tab
|
\t
|
a new line
|
\n
|
$
|
\$
|
%
|
\%
|
\
|
\\
|
"
|
\"
|
'
|
\'
|
Text indentation
By default, the \t escape code adds two spaces to a generated file. You can generate tabs instead of spaces, or change the number of spaces that are generated for a \t escape code. The generate of \t escape codes are controlled through the following options on the Advanced tab of the Launch ACS/TDK dialog:
• Use Spaces Instead of Tabs check box selected results in spaces being generated for \t escape codes.
• Use Spaces Instead of Tabs check box cleared results in tabs being generated for \t escape codes.
• Spaces Per Tab box specifies the number of spaces generated for \t escape codes (applies only when spaces are being used instead of tabs).
Carriage returns and line feeds
By default, the \n escape code inserts a carriage return and line feed to a generated file.
If you want to generate code files for use in a UNIX environment, you will not want to include carriage returns. You can make the \n escape code insert a line feed without a carriage return by selecting the LF Instead of CRLF check box on the Advanced tab of the Launch ACS/TDK dialog.
Carriage returns and line feeds
By default, the \n escape code inserts a carriage return and line feed to a generated file.
If you want to generate code files for use in a UNIX environment, you will not want to include carriage returns. You can make the \n escape code insert a line feed without a carriage return by selecting the LF Instead of CRLF check box on the Advanced tab of the Launch ACS/TDK dialog.