
GeoBASIC Reference Manual
2.GeoBasic Constructs
2-38 TPS1100-Version
1.30
of them. For a list of the available standard functions, see Section Standard
functions.
2.7.2.2 External Routine Calls
GeoB
ASIC
provides interfaces to external functions, e.g. system routine calls to get
a distance. Such routines can be called like any user defined subroutine. They can
takes value and reference parameters of any known type. A speciality of external
routines is the fact that they return an error code, which is stored in the predefined
variable
Err
upon return (see Section 2.3.2 on Declaration of Variables). Special
actions may be taken by the GeoB
ASIC
module if the error code is not RC_OK;
details are given in the following Section 2.8 on Error Handling.
2.8 ERROR
HANDLING
Syntax:
LabelDeclaration ::=
"
LABEL
" HandlerLabel
OnErrorStatement ::=
"
ON ERROR
" ( "
RESUME NEXT
" |
"
GOTO
" ( HandlerLabel | "
0
" ) )
HandlerLabel ::=
Name
ErrorLabel
::= HandlerLabel "
:
"
An
ErrorLabel
is used to mark a part of the code and is written on a separate
line before the first statement that is to be executed as part of that particular error
handler (see also Section 2.6 on Statements). All labels must be declared in the
routine in which they label a statement, i.e. the scope of the label is the routine
code. An
"ON ERROR GOTO
label" statement must appear in the same routine as
the specified label. The other two "
ON ERROR
" statements may appear anywhere.
The predefined variable
Err
is used to signal run-time errors; its value changes in
one of three ways.
1) An external TPS-1100 system software routine is called. Upon return
Err
is always set to the routine's return code. Normally this is 0 (= OK); a non-
zero value means that an error has occurred during the execution of the
external routine.
2) A run-time error occurs during the execution of GeoB
ASIC
code (e.g.
division by zero, illegal instruction).
3) The GeoB
ASIC
module explicitly assigns a value to
Err
.
Содержание tps1100
Страница 1: ...GeoBASIC FOR TPS1100 User Manual Version 2 10 1997 2001 Leica Geosystems AG Heerbrugg Switzerland ...
Страница 150: ...GeoBASIC FOR TPS1100 Reference Manual Version 2 10 1997 2001 Leica Geosystems AG Heerbrugg Switzerland ...
Страница 411: ...GeoBASIC Reference Manual 6 System Functions TPS1100 Version 1 30 6 7 6 5 35 CSV_LibCallAvailable 6 213 ...
Страница 620: ...TPS1100 Version 2 10 6 1 ...
Страница 621: ......
Страница 623: ...TPS1100 Version 2 10 6 1 ...
Страница 624: ......
Страница 1053: ...TPS1100 Version 1 30 E 1 Appendix E GEOFONT ...
Страница 1154: ...GeoBASIC Reference Manual Appendix J List of Predefined Identifiers TPS1100 Version 1 30 J 9 TMC_SetOffsetDist 6 128 ...