IBM Lotus Symphony
|
Vráti kód chyby identifikujúci chybu, ku ktorej došlo počas vykonávania programu.
Err
Typ Integer
Funkcia Err sa používa v rutinách ošetrenia chýb na určenie chyby a opravnej akcie.
sub ExampleError
on error goto ErrorHandler REM Set up error handler
Dim iVar as Integer
Dim sVar As String
REM Chyba spôsobená neexistujúcim súborom
iVar = Freefile
Open "\file9879.txt" for Input as #iVar
Line Input #iVar, sVar
Close #iVar
exit sub
ErrorHandler:
MsgBox "Chyba" & Err & ": " & Error$ + chr(13) + "V riadku : " + Erl + chr(13) + Now , 16 ,"došlo k chybe"
end sub