Canon Cat Reference Manual page 83

Hide thumbs Also See for Cat:
Table of Contents

Advertisement

Variables
A variable
is
a
name
to
which you
assign
a
numeric
value.
Name
simply
means
a
combination of
letters,
or
letters
and
numbers.
A
variable
name
can be
up to
3l
characters
long.
If
you use
a
name
longer
than 31 characters, the Cat
will
beep
and
[EXPLAIN]
will
tell
you
the name is
too long.
The Cat already
uses
the
following
letter combinations
as
functions,
so
you
cannot
use
them
as
variable
names:
LetterCombination
Meaning
abs
average
avg
int
sqrt
sum
sumdisplay
use
usedisplay
absolute
value
average
of
a
column
of
numbers
abbreviation
of
average
integer
portion
of
a
number
square
root
sum
of
a
column of
numbers
sum
of
a
column
after
rounding
to
the
precision
shown
relative
address
to
another
number
relative
address after
rounding
to
the
precision
shown
Do
not
use
a
permanent
space
when typing a
variable
name.
Permanent
space
is
the
uppercase
character
on
lrABl.
To define
a
variable, type
the name,
type
a
colon,
then
type
the expression that defines the
variable.
For
example:
Avar:l+1
Typing, highlighting,
and using
ICALC]
on the
above
expression
would
assign the value
of
l+l
(or
2) to
the
vaiable Avar
("Avar"
is short
for "a
variable").
Variable
names
are
case-sensitive:
"Avar"
and
"avar" would
be
two
different
variables.
Variable
names must
begin with
a
letter,
but may
contain
letters and
the
digits
1,2,3,
4, 5,
6,7,8,9,
and
0
in
combination.
Variables apply throughout
the
entire text,
not
just
inside the
document where
you
created
them.
Once you assign
a
value
to
a
variable
name,
you
can
use
the
name
in calculations.
For
example, you
can assign the
value 5.00 to the word
price by typing,
highlighting,
and using
[CALCI
on
"price:5.00". You
can
then
use
price in
calculations:
"price
*
10"
gives
the
result
"50.00".
When
you change
the
value
of
"price"
to,
say,
*2.5O*,
all
expressions
involving
"price"
everywhere throughout
the
text
will
also change:
"50.00"
automatically
changes
to
"25.00".

Advertisement

Table of Contents
loading

Table of Contents