
REPORT
3.
Use
an
arithmetic
op eration
that
results
in
zero.
F
or
example:
R4,SUBTRACT,QUANTITY
(where
QUANTITY
is
equal
to
the
contents
of
R4)
If
y
ou
divide
the
con
ten
ts
of
a
register
b
y
zero,
the
result
is
zero.
Results
of
in
teger
division
are
truncated.
Register
and
Data
Types
Only
n
umeric
t
yp e
data
can
b e
used
in
register
op erations.
The
following
IMA
GE
data
item
t
yp es
are
allo w
ed:
whole
n
um
b ers
or
in
tegers
( I1,I2,I4,J1,J2,J4,K1,K2,Z n
,
and
P n
)
real
n
um
b ers
( R2 )
extended
precision
real
n
um
b ers
( R4 ).
The
maxim
um
length
of
P
and
Z
data
t
yp es
that
a
register
statement
can
handle
is
20.
Y
ou
can
mix
data
t
yp es
in
a
register
op eration.
F
or
example,
y
ou
can
add
an
in
teger
to
a
real
n
um
b er.
QUER
Y
determines
the
data
t
yp e
of
the
register
con
ten
t
b
y
assigning
an
order
of
precedence
to
the
data
t
yp es,
as
follo
ws:
HIGHEST
R4
(Extended
precision
t
yp e
data)
R2
(Real
t
yp e
data)
LOWEST
I1,I2,I4,J1,J2,J4,K1,K2,Z
n,P n
(In
tegers
and
pac
k
ed
decimal
n
um
b ers)
The
new
register
con
ten
t
alwa
ys
has
a
data
t
yp e
whic
h
is
the
higher
of
the
t
w
o
op erand
t
yp es:
the
old
register
con
ten
t
or
the
data
element
.
F
or
example,
if
Register
2
is
loaded
with
an
in
teger
and
then
m
ultiplied
b
y
a
real
t
yp e
data
item,
the
con
ten
t
of
R2
will
b e
t
yp e
real.
R2,L,"3"
R2,M,PERCENT
(where
the
value
of
PERCENT
is
25.6)
All
registers
start
with
a
default
t
yp e
of
pac
k
ed
decimal.
When
y
ou
issue
the
REPOR
T
command,
QUER
Y
cycles
through
all
register
statements
(b efore
executing
the
command)
and
assigns
eac
h
register
the
highest
t
yp e
that
the
register
will
hold
during
the
rep ort.
This
ensures
the
correct
t
yping
of
a
register,
in
case
its
t
yp e
c
hanges
during
the
rep ort.
F
or
example:
R1,LOAD,DECITEM
Register
1
is
t
yp e
pac
k
ed
decimal
R2,LOAD,REALITEM
Register
2
is
t
yp e
real
(R2)
R1,ADD,R2
Register
1
b ecomes
t
yp e
real
(R2)
Because
Register
1
is
added
with
Register
2
later
in
the
rep ort,
it
is
t
yp ed
as
real,
instead
of
the
initial
default
of
pac
k
ed
decimal.
When
the
rst
LO
AD
in
to
Register
1
is
p erformed,
DECITEM
will
b e
con
v
erted
in
to
a
real
and
loaded
in
to
Register
1.
If
Register
1
is
prin
ted
with
a
detail
statement,
it
will
b e
display
ed
as
a
R2
data
t
yp e.
Y
ou
can
con
v
ert
a
register
to
t
yp e
R4
either
b
y
loading
it
(or
b
y
p erforming
an
arithmetic
op eration
on
it)
with
a
data
item
of
t
yp e
R4.
Y
ou
can
also
con
v
ert
a
register
to
R4
b
y
loading
it
with
a
real
n
umeric
literal
that
has
more
than
6
digits.
Zeros
preceding
the
decimal
p oint
or
the
most
signicant
digit
will
b e
ignored,
except
in
the
case
of
all
zeros.
F
or
example,
all
of
the
follo wing
con
v
ert
Register
1
in
to
an
R4
data
t
yp e:
3-124
QUERY/V
COMMANDS
Содержание QUERY
Страница 10: ......
Страница 17: ...Figure 1 1 ORDERS Data Base Structure Figure 1 2 Sample Entry Values INTRODUCING QUERY V 1 7 ...
Страница 20: ...Figure 1 3 IMAGE QUERY Environments 1 10 INTRODUCING QUERY V ...
Страница 36: ......
Страница 165: ...REPORT G1 GROUP TITLE 11 END QUERY V COMMANDS 3 129 ...
Страница 199: ...XEQ TF TOTAL DUE 9 SPACE B2 SKIP A TF R0 70 E2 S PURCH DATE END QUERY V COMMANDS 3 163 ...
Страница 200: ......
Страница 244: ......
Страница 278: ......
Страница 279: ...G ASCII CHARACTER SET This appendix is not available in this edition ASCII CHARACTER SET G 1 ...
Страница 280: ......