
GeoBASIC Reference Manual
2.GeoBasic Constructs
TPS1100-Version 1.30
2-19
integer constant. Parts of a string may be accessed and manipulated through
standard functions (See 2.7.2.1 Standard Function Calls.)
String variables are handled differently if they were declared in global and local
scopes. If a string variable is declared globally, then it will be initialised only once,
after the program has been loaded. After that point the variable will not be touched
again from the environment and it keeps the value the last time assigned to it. A
local string variable will be initialised each time the surrounding subroutine (or
function) is entered.
Note
The declaration of a variable does not assign any value to it. The value
of a variable that is read before the first assignment to it has been
performed is undefined.
Examples:
♦
First we declare and initialise variables of simple types.
DIM iSum
AS Integer
DIM dDistance AS Distance
DIM dHz
AS Angle
iSum
=
0
dDistance =
0.0
dHz
= 100.0
♦
Then we declare variables composite types.
DIM StartPoint AS CartesianPointType
DIM BaseLine
AS LineType
DIM PointArray AS PointArrayType
♦
Arrays can be declared directly.
DIM NameList
( 8 )
AS String * 50
DIM AngleMatrix ( 5 , 20 ) AS Angle
DIM PointArray2 ( 5 )
AS CartesianPoint
Note
If all bounds and the element type of two array variables match, they are
considered to be of the same type, hence they can be assigned to each
other. For example, the variables
PointArray
and
PointArray2
can be assigned to each other.
Содержание 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 ...