Begin/fi: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Begin/fi
| Old | New | Line | |
|---|---|---|---|
| 1 | + | [[Reserved word/fi|Varattua sanaa]] `begin` käytetään ilmaisemaan suorituslohkon alkua [[Function/fi|funktiossa (function)]], [[Method/fi|metodissa]] [[Object|olion]], [[Procedure/fi|aliohjelman (procedure)]], [[Program/fi|ohjelman (program)]], olion [[Property|property:ssa]] tai sitä käytetään määrittämään kootun [[statement/fi|lauseen]] alku. | |
| 2 | + | ||
| 3 | + | Funktiossa, metodeissa, aliohjelmassa, ohjelmassa tai ominaisuudessa sitä käytetään kaikkien [[Const/fi|vakioiden (const)]], [[Type/fi|tyyppien (type)]] ja [[Var/fi|muuttujien (var)]]- määrittelyjen jälkeen ennen ensimmäistä suoritettavaa lausetta. Se lopetetaan aina [[End/fi|end]] lauseella: | |
| 4 | + | ||
| 5 | + | ``` pascal | |
| 6 | + | program Project1; | |
| 7 | + | var (..); | |
| 8 | + | begin | |
| 9 | + | (..); | |
| 10 | + | end. | |
| 11 | + | ``` | |
| 12 | + | ||
| 13 | + | Kootuissa lauseissa `begin` aloittaa sen ja koottu lause päättyy `end` lauseeseen: | |
| 14 | + | ||
| 15 | + | ``` pascal | |
| 16 | + | if (..) then | |
| 17 | + | begin | |
| 18 | + | (..) | |
| 19 | + | end | |
| 20 | + | else | |
| 21 | + | begin | |
| 22 | + | (..) | |
| 23 | + | end; | |
| 24 | + | ``` | |
| 25 | + | ||
| 26 | + | Jokainen `begin` pitää sulkea `end`-sanalla. | |
| 27 | + | ||
| 28 | + | --- | |
| 29 | + | *From the Free Pascal wiki, page "Begin/fi", as it stood on 2022-08-06 after a change by Kai Burghardt, 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).* |
