Difference between revisions of "'"

From Free Pascal wiki
Jump to navigationJump to search
(Created page with "{{'}} <div style="float:right; margin: 0 25px 20px 0; padding:40px; font-size:500%; font-family: Georgia; background-color: #f9f9f9; border: 2px solid #777777;">'</div> In ...")
 
Line 27: Line 27:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
The above line is print:
 
The above line is print:
   abcd
+
   ab'cd
  
 
{{Symbols}}
 
{{Symbols}}

Revision as of 13:15, 12 May 2019

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)