Error getting tags :
error 404Error getting tags :
error 404 \ | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
\
Basics
Expander triangle
Type
Keyword
Syntax
xmlerr, can't find element
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
The character \ is used to break a line in a script for display, while still having it treated as a single statement.
Examples

answer "You've been waiting for" numberOfMinutes \
"minutes." with "Keep Waiting" or "Cancel"

Additional Comments
Expander triangle

If a line is too long to fit conveniently in the script window, use the \ character to break it into two (or more) lines for viewing.

Comments:

A line that is split with \ is shown in the script editor as more than one line, but when it's executed, it is treated as a single line of code.

The script editor automatically indents continued lines, as shown in the example above.

A \ character which is used within a literal string does not break the line, because the \ is treated as part of the quoted string instead of being treated as a line continuation. For example, the following statement causes a compile error because the \ character is inside the quotes:

answer "This is a test. This is only a test. \

Had this been an actual life..." with "OK" -- BAD EXAMPLE

The above bad example can be corrected by using the operator to break up the long string:

answer "This is a test. This is only a test." \

"Had this been an actual life..." with "OK" -- good example

The string has been broken into two substrings, so the \ character is no longer within a literal string. This second example does not cause an error.

User Comments
Expander triangle
User thumbnail
dick.kriesel@mail.com
StarStarStarStarStar
Feb 2, 2011
The final sentence is wrong, because the final example lacks a concatenation operator.