Difference between revisions of "Uses"

From Lazarus wiki
Jump to navigationJump to search
Line 1: Line 1:
 
{{Uses}}
 
{{Uses}}
  
The '''uses''' statement is a [[declaration]] by a [[Pascal]] [[Program|program]] that it will invoke or use certain [[Procedure|procedures]], [[Function|functions]], [[object]]s, [[Const|const]]ants, [[Var|var]]iables and other items which are defined or declared in the specified [[Unit|unit]].
+
The '''uses''' statement is a [[declaration]] by a [[Pascal]] [[Program|program]] that it will invoke or use certain [[Procedure|procedures]], [[Function|functions]], [[object]]s, [[Const|const]]ants, [[Var|var]]iables and other items which are defined or declared in the specified [[Unit|unit]]. <syntaxhighlight lang="pascal" enclose="none">Uses</syntaxhighlight> is a [[Reserved word|reserved word]].
  
 
Every pascal program and unit has an automatic implied uses statement of
 
Every pascal program and unit has an automatic implied uses statement of
  
USES System;
+
<syntaxhighlight>
 +
Uses System;
 +
</syntaxhighlight>
  
except in the case where a compiler [[parameter]] allows a unit to exclude a reference to the [[System]] unit.  (One example of this would be if one was recompiling the System unit, it would be necessary for it not to invoke itself.)
+
except in the case where a [[Compiler|compiler]] [[parameter]] allows a unit to exclude a reference to the [[System unit]].  (One example of this would be if one was recompiling the System unit, it would be necessary for it not to invoke itself.)
[[category:Pascal]]
 

Revision as of 22:01, 13 February 2019

Deutsch (de) English (en) español (es) suomi (fi) français (fr) 日本語 (ja)

The uses statement is a declaration by a Pascal program that it will invoke or use certain procedures, functions, objects, constants, variables and other items which are defined or declared in the specified unit. Uses is a reserved word.

Every pascal program and unit has an automatic implied uses statement of

Uses System;

except in the case where a compiler parameter allows a unit to exclude a reference to the System unit. (One example of this would be if one was recompiling the System unit, it would be necessary for it not to invoke itself.)