Sign in Join
Wiki copytemporary

Local variables: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Local variables

OldNewLine
1+A local [[Variable|variable]] is defined inside a [[Procedure]], [[Function]], [[Method]] or the [[Implementation|implementation]] section of a [[Unit]] and is only accessible from there. It is said to have local scope and cannot be accessed from outside (i.e. by another outside procedure, function or unit).
2+
3+``` pascal
4+ procedure DoSomething;
5+ var
6+ x : Tsome_type;
7+ begin
8+
9+ end;
10+```
11+
12+## Read More
13+
14+- [[Var]]
15+- [[Global variables]]
16+
17+---
18+*From the Free Pascal wiki, page "Local variables", as it stood on 2020-02-19 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history