Difference between revisions of "Assigned"
From Free Pascal wiki
Jump to navigationJump to searchm (bold) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{Assigned}} | |
+ | |||
+ | <syntaxhighlight lang="pascal" inline>Assigned</syntaxhighlight> is a [[Function|<syntaxhighlight lang="pascal" inline>function</syntaxhighlight>]] defined in the [[System unit]] of the [[FPC|Free Pascal]] [[RTL|Runtime Library]]. It is used to determine if certain [[Type|types]] of [[Variable|variables]] have been given a value: | ||
*[[Pointer|Pointer variables]] | *[[Pointer|Pointer variables]] | ||
*[[Procedural variable]]s and method procedural variables | *[[Procedural variable]]s and method procedural variables | ||
*[[Class|Class variables]] | *[[Class|Class variables]] | ||
− | <syntaxhighlight> | + | The <syntaxhighlight lang="pascal" inline>function assigned</syntaxhighlight> receives a [[Boolean|<syntaxhighlight lang="pascal" inline>boolean</syntaxhighlight>]] value <syntaxhighlight lang="pascal" inline>false</syntaxhighlight> if the type pointer assigned to it indicates a [[Nil|<syntaxhighlight lang="pascal" inline>nil</syntaxhighlight>]] value |
+ | |||
+ | <syntaxhighlight lang="Pascal"> | ||
function Assigned( P: Pointer ) : Boolean; | function Assigned( P: Pointer ) : Boolean; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | == see also == | ||
+ | * {{Doc|package=RTL|unit=system|identifier=assigned|text=<syntaxhighlight lang="pascal" inline>Assigned</syntaxhighlight>}} |
Latest revision as of 17:22, 6 August 2022
│
English (en) │
Assigned
is a function
defined in the System unit of the Free Pascal Runtime Library. It is used to determine if certain types of variables have been given a value:
- Pointer variables
- Procedural variables and method procedural variables
- Class variables
The function assigned
receives a boolean
value false
if the type pointer assigned to it indicates a nil
value
function Assigned( P: Pointer ) : Boolean;