
GeoBASIC Reference Manual
2.GeoBasic Constructs
TPS1100-Version 1.30
2-23
♦
The implicit precedence of the expression in the left column is shown in the
right column explicitly.
expression
precedence made explicit
a + 3 * b
a + (3*b)
a / b * c
(a/b) * c
a ^ 3 ^ b
a^(3^b)
i \ j \ k
(i \ j) \ k
x or y and z
x or (y and z)
x and y = z
x and (y = z)
a * F( -b + 1) / 2
(a * ( F( (-b) + 1) ) ) / 2
where
F
is a function (see Section 2.7 on
Routines; this example is only included for completeness);
♦
Now we show some examples for the type conversion.
Expression value
result
type
7 / 3
2.33333333
1
Double
7 \ 3
2
Integer
7 mod 3
1
Integer
"Geo" + "BASIC"
"GeoBASIC"
String
2.5.1 Type
Compatibility
Note that not all types of operands can be combined with all operations. The rules
are as follows.
2.5.1.1 Addition, subtraction, multiplication (
+
,
-
,
*
):
Both operands must be of a numeric type (
Integer
,
Double
, or any of the
various specialities of
Double
). If both are of the same type, the result is also of
that type, otherwise it is of type
Double
.
Note
The
+
operator is also used for string concatenation, see below.
1
The actual value depends on the hardware.
Содержание 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 ...