Jump to content

Rexx Programming/How to Rexx/quotation mark

From Wikibooks, open books for an open world

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

Quotation Marks Within a Literal String

[edit | edit source]

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

[edit | edit source]

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 */