Difference between revisions of "Ord"

From Lazarus wiki
Jump to navigationJump to search
m
(more accurate content)
Line 1: Line 1:
 
 
{{Ord}}
 
{{Ord}}
  
Function '''ord''' returns the [[ASCII]] value of the [[Char|char]] '''c'''.
+
The language construct <syntaxhighlight lang="pascal" enclose="none">ord(someVariable)</syntaxhighlight> evaluates to the index of any ordinal type, including, but not limited to any integer type and sub-ranges thereof, [[Char|<syntaxhighlight lang="pascal" enclose="none">char</syntaxhighlight>]], [[Boolean|<syntaxhighlight lang="pascal" enclose="none">boolean</syntaxhighlight>]], or any enumerative type.
 
 
Declaration
 
    Function ord (c : Char) : byte;
 
 
 
  
See also:
+
== see also ==
* [[Chr]]
+
* [[Chr|<syntaxhighlight lang="pascal" enclose="none">chr</syntaxhighlight>]] returns a character by its index
  
 
[[Category:Pascal]]
 
[[Category:Pascal]]

Revision as of 14:59, 2 December 2018

Deutsch (de) English (en) français (fr) русский (ru)

The language construct ord(someVariable) evaluates to the index of any ordinal type, including, but not limited to any integer type and sub-ranges thereof, char, boolean, or any enumerative type.

see also

  • chr returns a character by its index