Forum > General
Try...except statement
(1/1)
stansbkg:
I am running
Free Pascal IDE for win32 for i386
Version 1.0.12
Compiler version 3.0.2
I wish to use the "try...except" statement.
But I get the compiler error: Identifier not found "try"
What needs to be done?
howardpc:
You may need to share the section of faulty code.
Perhaps you forgot to complete the Pascal statement before "try" with a semicolon?
rvk:
--- Quote from: stansbkg on November 13, 2017, 08:15:47 pm ---I wish to use the "try...except" statement.
But I get the compiler error: Identifier not found "try"
--- End quote ---
You are in plain FPC or TP-mode.
If you want to use try/except/finally you need to add the following line under your program-line.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$mode objfpc}It switched to ObjFPC mode which supports try/except/finally.
https://www.freepascal.org/docs-html/prog/progap4.html#progse75.html
Navigation
[0] Message Index