
GeoBASIC Reference Manual
2.GeoBasic Constructs
2-34 TPS1100-Version
1.30
ParameterSpecification ::= [ "
BYVAL
" ] ParameterName "
AS
"
DataTypeName
Body
::= { CVTDeclaration | LabelDeclaration }
CodePart
CVTDeclaration
::= ( ConstantDeclaration |
VariableDeclaration |
TypeDeclaration )
CodePart ::=
StatementSequence
ExitStatement
::= ( LoopExit | RoutineExit )
RoutineExit ::=
"
EXIT
" ( "
SUB
" | "
FUNCTION
" )
Routines that will be called from the TPS-1100-System, so-called
modules
, must
be declared with the keyword
GLOBAL
. They must be parameter-less subroutines
(
not
functions), and they should return an error code in the predefined integer
variable
Err
. (See also Section 2.3.2.1 on The Variable
Global subroutine may have a length up to 18 characters.
The names of the parameters in the parameter list can be used inside the routine
like variables of the specified type. When the routine is called (executed), actual
variables or expressions will be substituted for them. A parameter specified as
byVal
must not be a structure or an array and can be replaced by a variable or an
expression; the parameter behaves like a variable initialised to the value of the
expression. Parameters
not
specified as
byVal
must be replaced by a variable (of
the correct type); any manipulations performed on the parameter are actually
performed on the substituted variable.
Functions usually have one or more parameters; if a function has no parameters,
the parentheses must still be written. On the other hand, if a subroutine has no
parameters, the parentheses may be omitted.
The declaration part of a routine contains local declarations of constants, types,
variables, and labels, which will not be known outside the routine.
The code part of a routine contains the statements which are executed when the
routine is called.
The code part of a function should contain at least one assignment statement of the
form
FunctionName
=
Expression
When control returns to the point of call, the value last assigned to the function
name will be the value returned by the function. If no such assignment is made
before control returns, the return value of the function is undefined.
Содержание 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 ...