Difference between revisions of "Ord"

From Lazarus wiki
Jump to navigationJump to search
m (resolve Category: Pages using deprecated enclose attributes, remove explicit categorization in Category: Pascal already done via language bar template {{Ord}})
(internal link added for enum, integer, subrange types)
 
Line 1: Line 1:
 
{{Ord}}
 
{{Ord}}
  
The language construct <syntaxhighlight lang="pascal" inline>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" inline>char</syntaxhighlight>]], [[Boolean|<syntaxhighlight lang="pascal" inline>boolean</syntaxhighlight>]], or any enumerative type.
+
The language construct <syntaxhighlight lang="pascal" inline>ord(someVariable)</syntaxhighlight> evaluates to the index of any ordinal type, including, but not limited to any [[Integer|<syntaxhighlight lang="pascal" inline> integer</syntaxhighlight>]] type and [[subrange_types | sub-ranges]] thereof, [[Char|<syntaxhighlight lang="pascal" inline>char</syntaxhighlight>]], [[Boolean|<syntaxhighlight lang="pascal" inline>boolean</syntaxhighlight>]], or any [[Enum_Type |enumerative type]].
  
 
== see also ==
 
== see also ==
 
* {{Doc|package=RTL|unit=system|identifier=ord|text=<syntaxhighlight lang="pascal" inline>ord</syntaxhighlight>}} documented in the [[System unit|system unit]]
 
* {{Doc|package=RTL|unit=system|identifier=ord|text=<syntaxhighlight lang="pascal" inline>ord</syntaxhighlight>}} documented in the [[System unit|system unit]]
 
* [[Chr|<syntaxhighlight lang="pascal" inline>chr</syntaxhighlight>]] returns a character by its index
 
* [[Chr|<syntaxhighlight lang="pascal" inline>chr</syntaxhighlight>]] returns a character by its index

Latest revision as of 08:07, 17 October 2023

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