Difference between revisions of "Except"

From Free Pascal wiki
Jump to navigationJump to search
(Created page with "{{Except}} <syntaxhighlight lang="pascal" enclose="none">except</syntaxhighlight> is a reserved word that is only used in conjunction with try. E...")
 
Line 3: Line 3:
 
<syntaxhighlight lang="pascal" enclose="none">except</syntaxhighlight> is a [[Reserved word|reserved word]] that is only used in conjunction with [[Try|try]].
 
<syntaxhighlight lang="pascal" enclose="none">except</syntaxhighlight> is a [[Reserved word|reserved word]] that is only used in conjunction with [[Try|try]].
  
[[Exceptions|exception]] handling: [[Try|<syntaxhighlight lang="pascal" enclose="none">try</syntaxhighlight>]] …
+
[[Exceptions|exception]] handling:  
[[Except|<syntaxhighlight lang="pascal" enclose="none">except</syntaxhighlight>]]  
+
 
<syntaxhighlight lang="pascal" enclose="none">on</syntaxhighlight> … <syntaxhighlight lang="pascal" enclose="none">do</syntaxhighlight>
+
<syntaxhighlight lang="pascal">
also requires auxiliary [[Keyword|keywords]] [[On|<syntaxhighlight lang="pascal" enclose="none">on</syntaxhighlight>]] and [[Do|<syntaxhighlight lang="pascal" enclose="none">do</syntaxhighlight>]].
+
  try
 +
    …
 +
  except
 +
    on … do …
 +
  end;
 +
</syntaxhighlight>
 +
 
 +
also requires auxiliary [[Keyword|keywords]] [[On|<syntaxhighlight lang="pascal" enclose="none">on</syntaxhighlight>]], [[Do|<syntaxhighlight lang="pascal" enclose="none">do</syntaxhighlight>]], and [[End|<syntaxhighlight lang="pascal" enclose="none">end;</syntaxhighlight>]].

Revision as of 09:50, 17 March 2019

Deutsch (de) English (en) suomi (fi)

except is a reserved word that is only used in conjunction with try.

exception handling:

  try
     
  except 
    on  do  
  end;

also requires auxiliary keywords on, do, and end;.