Sign in Join
Wiki copytemporary

Finally/fi: what changed

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

Title: Finally/fi

OldNewLine
1+[[Reserved word/fi|Varattu sana]] `finally` määrittää [[Block|lohkon]], jota tulisi aina käsitellä, riippumatta siitä, onko virhe tapahtunut vai ei.
2+
3+Esimerkki:
4+
5+``` pascal
6+begin
7+ ...
8+ try
9+ ... // Erilaisisa toimintoja
10+ finally
11+ ... // Lopputehtävät, joka tulisi tehdä myös virhetapauksissa
12+ end;
13+ ...
14+end;
15+```
16+
17+Toinen esimerkki (tässä esimerkissä `finally` lohko suoritetaan aina):
18+
19+``` pascal
20+begin
21+ ...
22+ try
23+ try
24+ ... // toiminnot joita tarkistellaan
25+ except // virheen käsittely
26+ ...
27+ end;
28+ finally // aina käsiteltävät toiminnot
29+ ...
30+ end;
31+ ...
32+end;
33+```
34+
35+## Katso myös
36+
37+- [[Try/fi|Try]]
38+- [[Except/fi|Except]]
39+- [[Avoiding implicit try finally section/fi|Epäsuoran try finally lohkon välttäminen]]
40+
41+---
42+*From the Free Pascal wiki, page "Finally/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).*

Back to history