AT&T 6300 Programmer's Manual page 69

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

Variable Types
TYPE CONVERSION
When necessary, GWBASIC will convert a
numeric constant from one type to another.
The following rules and examples should be
observed.
• If
a numeric constant of one type is set equal
to a numeric variable of a different type, the
number will be stored as the type declared in
the variable name.
(If
a string variable is set
equal to a numeric value or vice versa, a "Type
mismatch" error occurs.)
Example:
10 A%=23.42
20 PRINT A%
RUN
23
Ok
• During expression evaluation, all of the
operands in an arithmetic or relational
operation are converted to the same degree of
precision, (Le., that of the most precise operand).
Also, the result of an arithmetic operation is
returned to this degree of precision.
3-11

Advertisement

Table of Contents
loading

Table of Contents