
GeoBASIC Reference Manual
2.GeoBasic Constructs
2-12 TPS1100-Version
1.30
The first element of the array now contains the value
20
10
2
=
.
♦
We can also use variables for the index; assume we had declared an integer
variable
iIndex
.
DIM iIndex AS Integer
iIndex = 2
MyFirstArray( iIndex ) = 5
♦
And even more complicated, the index variable may of course be an indexed
variable.
iIndex = 1
MyFirstArray( iIndex ) = MyFirstArray( MyFirstArray(
iIndex ) )
Note
For keeping track of value changes it is often convenient to draw a table
with pencil and paper. But as a rule, a program should always be written
and commented so well that is immediately clear what is done when
reading the program.
State
MyFirstArray(1)
MyFirstArray(2)
iIndex
1 10
20
–
2 2
20
–
3 2
20
2
4 2
5
2
5 2
5
1
6 5
5
1
♦
Array variables of the same type can be assigned as a whole, no matter how
complex they are. This is equivalent to assigning all elements separately.
DIM A1 AS MyFirstArrayType
DIM A2 AS MyFirstArrayType
A1(1) = 1
A1(2) = 2
A2 = A1
'equivalent to
'
A2(1) = A1(1)
Содержание 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 ...