Var/fi: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Var/fi
| Old | New | Line | |
|---|---|---|---|
| 1 | + | **Var** (jountaa juurensa sanasta variable) on varattu sana jota käytetään merkitsemään osaa missä [[Variable|muuttujat]] ja niiden [[Type|tietotyypit]] on määritelty. Kun sitä käytetään [[Procedure/fi|aliohjelman]] tai [[Function|funktion]] määrittelyssä niin **var** ilmoittaa että kyseessä on [[Variable parameter/fi|muuttujaparametri]]. | |
| 2 | + | ||
| 3 | + | Muuttujat on määritelty tyypillisesti [[Program|ohjelman]], [[Procedure/fi|aliohjelman]], [[Function|funktion]] tai [[Unit|käännösyksikön (unit)]] alussa. | |
| 4 | + | ||
| 5 | + | ``` pascal | |
| 6 | + | var | |
| 7 | + | age: integer; | |
| 8 | + | ``` | |
| 9 | + | ||
| 10 | + | Jos käytetään samantyyppisiä muuttujia niin ne voidaan ryhmitellä niin että ne erotellaan [[Comma|pilkulla]]. | |
| 11 | + | ||
| 12 | + | ``` pascal | |
| 13 | + | var | |
| 14 | + | FirstName, LastName, address: string; | |
| 15 | + | ``` | |
| 16 | + | ||
| 17 | + | ## Katso myös | |
| 18 | + | ||
| 19 | + | - [[Local variables/fi|Paikallinen muuttuja]] | |
| 20 | + | - [[Global variables]] | |
| 21 | + | - [[Variable parameter/fi|Muuttujaparametri]] | |
| 22 | + | - [[doc:ref/refse19.html|Variable declaration]] | |
| 23 | + | - [[doc:ref/refse21.html|Thread Variables]] | |
| 24 | + | ||
| 25 | + | --- | |
| 26 | + | *From the Free Pascal wiki, page "Var/fi", as it stood on 2020-03-03 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).* |
