'

From Free Pascal wiki
Revision as of 12:15, 12 May 2019 by Djzepi (talk | contribs)
Jump to navigationJump to search

English (en) suomi (fi)

'

In ASCII, the character code decimal 39 (or hexadecimal 27) is defined to be ' ( Single quotation mark ).

In Pascal programming language, the strings are enclosed in single quotation marks.

program HelloWorld;
var
  s:string;
begin
  s := 'Hello World!';
  writeLn(s);
  readln;
end.

If you want to print a single quotation mark in a string, it will double.

Writeln ('ab''cd');   // string containing a single quote

The above line is print:

 ab'cd


navigation bar: topic: Pascal symbols
single characters

+ (plus)  •  - (minus)  •  * (asterisk)  •  / (slash)
= (equal)  •  > (greater than)  •  < (less than)
. (period)  •  : (colon)  •  ; (semi colon)
^ (hat)  •  @ (at)
$ (dollar sign)  •  & (ampersand)  •  # (hash)
' (single quote)

character pairs

<> (not equal)  •  <= (less than or equal)  •  := (becomes)  •  >= (greater than or equal)

 •  >< (symmetric difference)  •  // (double slash)