< Rexx Programming < How to Rexx

In rexx, strings can be quoted using either singlequotes or doublequotes.

Quotation Marks Within a Literal String

In order to use literal singlequote characters within a string, the string can be enclosed using doublequotes:

say "Here's how we use an apostrophe within a string"

In order to use literal doublequote characters within a string, the string can be enclosed using singlequotes:

say 'Here we are using "doublequotes" within a string'

Back To Back Quotation Marks

It is possible to use backtoback quotation marks to represent a single quotation mark within the string:

say 'Heres back to back'  /* Note the back to back quotation mark for an apostrophe */

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.