Printing quotes from within a print statement

Although individual single quotes are fine in a print statement, in order to print two single quotes in a row while inside the double quotes of a print statement, one must precede each of the single quotes with a backslash, as in:

print "'' This will look like a Mentor comment in the printfile"


In order to print a double quote as part of the text of a print statement, use two double quotes, as in:

 print "The next ""word"" is quoted"


Defined items inside the double quotes of a print statement are not expanded. They are printed literaly as in:

 >define @word1 testingprint "This is @word1 defined items in print statements"


One way that one can use defined items with print statements is to define the item as a string variable and then print that, as in:

 >define @word2 [$s="testing"]print "This is s defined items in print statements." @word2


Example Spec:

>-allowindent~comment&quotes.doc~cleanprint "One single ' by itself is OK,"'' print "but one double " will cause an error."print "The next ""word"" is quoted."print "Testing '' in a print statement.">define @word1 testing>define @word2 [$s="testing"]print "This is @word1 defined items in print statements."'' print "This is s defined items in print statements." @word1print "This is s defined items in print statements." "@word2"print "This is s defined items in print statements." @word2~end