
GeoBASIC Reference Manual
2.GeoBasic Constructs
2-20 TPS1100-Version
1.30
2.3.2.1 The Variable Err
The predefined integer variable
Err
can in principle be accessed like any other
integer variable. Its main purpose, however, is to contain the error code returned
by an external routine called from a GeoB
ASIC
module. Furthermore, at
termination of the module's execution, the current contents of
Err
will be passed
back to the system as the module's return code. For details on error handling, see
Section 2.8 on Error Handling.
2.4 VARIABLES
This section describes the access to variables. Their declaration is described in
Section 2.3.2.
Simple variables are accessed by their name. Composite variables (strings, arrays,
and structures) can also be accessed by their name, but only for the operations of
assignment (see Section 2.6.1.1 on The Assignment Statement) or parameter
passing (see Section 2.7.2 on Routine Calls). Often, however, their individual
constituents will be selected and operated one by one of the operations available
for data of that type.
Syntax:
Variable
::= VariableName { Selector }
Selector
::= ( ArraySelector | FieldSelector )
ArraySelector ::=
"
(
" SubscriptExpression
{ "
,
" SubscriptExpression } "
)
"
FieldSelector ::=
"
.
" ElementName
SubscriptExpression ::= IntegerExpression
An element of a one-dimensional array is accessed with a subscript expression
given between parentheses. The expression must be of type
Integer
and must
evaluate to a value between 1 and the upper bound of the array (bounds inclusive).
Note
There is no check performed whether the subscript is within bounds,
neither at compile time nor at run time.
To access an element of a multidimensional array, as many subscript expressions
are needed as there are dimensions.
An element (field) of a structure is accessed by its name.
Examples for valid variable access (assuming appropriate type definitions)
Содержание 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 ...