
GeoBASIC Reference Manual
2.GeoBasic Constructs
2-14 TPS1100-Version
1.30
TYPE DIM StringArrayType ( 35 ) AS String*10 END
TYPE DIM ArrayArrayType
(
5 ) AS DoubleArrayType END
The last example shows that arrays can be nested: the five elements of
ArrayArrayType
are arrays itself. But there is also a direct way of
declaring multidimensional arrays.
TYPE DIM MatrixType ( 5 , 20 ) AS Angle END
A variable of
MatrixType
will denote a 5 by 20 matrix of angles (floating
point).
♦
In closing let us compare the access to elements of the two multidimensional
arrays.
DIM ArrayArray AS ArrayArrayType
DIM Matrix
AS MatrixType
ArrayArray(1)( 1) =
1.0
ArrayArray(1)(20) =
20.0
ArrayArray(5)(20) = 100.0
Matrix( 1,
1 )
=
1.0
Matrix( 1, 20 )
=
20.0
Matrix( 5, 20 )
= 100.0
2.2.4
Declaration of Structures
A structure (a structured type, also known as a "record" in other languages)
consists of a number of values of possibly
different
types and is declared as
follows:
Syntax:
TypeDeclaration ::=
"
TYPE
" Name
{ ElementName "
AS
"
DataTypeName }
"
END
" [ Name ]
•
A variable of type "Name" will consist of elements (fields, components) which
can be accessed by their element name as given in the type declaration (see
Section 2.4 on Variables).
Содержание 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 ...