EasyManuals Logo
Home>IBM>Laptop>5100

IBM 5100 Basic Reference Manual

IBM 5100
187 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #100 background imageLoading...
Page #100 background image
i96
TAB
Function
The TAB (expression) function allows you
to
align columns
of
data. When (expres-
sion)
is
a non-integer, it
is
truncated. Thus, TAB(n) starts
the
next
output
in
column
n
of
the
line. If
the
current position in
the
line
is
greater
than
n, data
is
put
on
the
next
line
in
position n. TAB(n) can be followed by a comma
or
semicolon with
the
same result.
If
n
is
greater
than
the
line length, data
is
put
at
position X after
computation
of
the
following, where n =
the
TAB expression and L = line length:
x =
n-L
*INT((n-1)/L)
For example, if line length
= 64 and
the
TAB(n) = 70,
the
integer value
((70-1 )/64)
=:
1
is
multiplied by 6(70-64). Thus,
output
begins
in
position 6
of
the
next line. This formula only applies where L
= 1
to
9999.
Print Line Buffer Operation
The print line buffer
is
a temporary storage location where
the
characters for each
print line are placed. After
all
data for a print line has been placed
in
the
buffer,
the
data line
is
printed.
A buffer-position pointer
is
used
to
keep
track
of
the
next
available position where
a character (or digit) can be placed
in
the
buffer.
The
movement
of
the
buffer-position
pointer before, during, and after moving an expression into
the
buffer depends on
the
type
of
expression
to
be printed and
the
delimiter following it
in
the
PRINT
statement.
The position
of
the
buffer-position pointer can be moved forward by using
the
TAB
function. See
the
PRINT statement examples
that
follow.
The following examples show how various arithmetic values would be printed
or
displayed. The symbol
16
represents a blank character, which always appears in
the
sign position
of
a positive number.
Value Given Value Printed
0123
16123
00123
16123
-1234.5 -1234.5
135999999999 16135999999999
Note
About
PRINT
If
there
is
no printer attached
to
the
5100, executing
the
PRINT FLP
statement
stops
the
pr9gram unless
the
P = 0 (printer = display)
option
was specified
in
the
RUN
command.
/
\
.~.

Table of Contents

Other manuals for IBM 5100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM 5100 and is the answer not in the manual?

IBM 5100 Specifications

General IconGeneral
BrandIBM
Model5100
CategoryLaptop
LanguageEnglish

Related product manuals