Assigned: Difference between revisions
From Lazarus wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Assigned}} | {{Assigned}} | ||
<syntaxhighlight lang="pascal" enclose="none">Assigned</syntaxhighlight> is a [[Function|<syntaxhighlight lang="pascal" enclose="none">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" enclose="none">function assigned</syntaxhighlight> receives a [[Boolean|<syntaxhighlight lang="pascal" enclose="none">boolean</syntaxhighlight>]] value <syntaxhighlight lang="pascal" enclose="none">false</syntaxhighlight> if the type pointer assigned to it indicates a [[Nil|<syntaxhighlight lang="pascal" enclose="none">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" enclose="none">Assigned</syntaxhighlight>}} |
Revision as of 20:05, 16 July 2019
│
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;