Format statements, Data format, Integers – Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 39

Advertising
background image

Operating Functions

Chapter 5

5–2

You may put more than

one statement on a line, if separated by a

colon

(:). You can use only one statement number per line.

You can enter lower case characters

in the COMMAND mode. Any

keywords, commands, variable and array names entered in lower case
change to upper case when stored

in memory.

You can use format

statements within the print statement. The format

statements

include TAB( (|expr|), SPC([expr]), USING(special

symbols), and CR (carriage return with no line feed).

You can represent the following range of numbers in

the BASIC module:

+1E–127

to +.99999999E+127

There are eight

significant digits. Numbers are internally rounded

to

fit this precision. You can enter and display numbers in four

formats: integer,

decimal, hexadecimal and exponential.

Example:

129, 34.98, 0A6EH, 1.23456E+3

In the BASIC module,

integers are numbers that range from 0 to 65

535 or OFFFFH. You

can enter all integers in either decimal or

hexadecimal

format. You indicate a hexadecimal number by placing the

character

“H” after the number (e.g. 170H). If the hexadecimal number

begins

with A – F, then it must be preceded by a zero (i.e. You must enter

A567H as OA567H). When an

operator, such as .AND. requires an

integer, the BASIC module truncates

the fraction portion of the number

so it fits the integer format. We refer

to integers and line numbers as:

[integer] – [ln-num]

5.2.2
Statements (continued)

5.2.3
Format Statements

5.2.4
Data Format

5.2.5
Integers

Advertising