Victor Diaz
Victor Diaz

Reputation: 35

Pascal - How to write a quotation mark ' as a string?

In pascal we assign a value to a string with a double single-quote. What if we want to write out a single quotation mark as a string?

how to write out '? So I want to echo out a string like "It's a good day", but it cant cause there is a single quotation mark that will destroy the entire string.

thanks!

Upvotes: 3

Views: 3559

Answers (1)

Timekiller
Timekiller

Reputation: 3136

Well, if Freepascal follows Pascal dialect, then you type the single quote twice.

It''s a good day

There are other escape sequences described at http://www.freepascal.org/docs-html/ref/refse8.html

Upvotes: 5

Related Questions