Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

string

pascal

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!

like image 724
Victor Diaz Avatar asked Dec 06 '25 15:12

Victor Diaz


1 Answers

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

like image 60
Timekiller Avatar answered Dec 08 '25 10:12

Timekiller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!