Data Types And Lengths; Assigning Variable Names And Function Names; Data Expressions - Casio FX-890P Owner's Manual

Casio personal computer owner's manual
Table of Contents

Advertisement

Finally, the printf() statement displays the value of "xy" which is the result, no matter
which arithmetic operation is performed.

6.1.3 Data types and lengths

The following table shows the data types and their respective lengths for the
interpreter. These are almost identical on all computers, except for the integer (int)
that may change.
Type declaration
char
short
int
long
float
double

6.1.4 Assigning variable names and function names

All variables must be declared before they can be used within a program. The
following rules apply for variables, constants defined using the #define statement,
and function names.
• The first character of a variable name must be an alphabetic character (A-Z, a-z),
or an underline (_).
• Second and subsequent characters in a variable may be an alphabetic character,
underline, or number. The computer differentiates between upper case and lower
case letters when matching variable names.
• Reserved words cannot be used as variable names, though a part of a variable
name may be a reserved word.
• The length of a variable name is unlimited, but only the first eight characters are
used to discriminate one name from another. This means that "abc12345" and
"abc12344" will be considered as the same variable, since the initial eight
characters of either name are the same.

6.1.5 Data expressions

Character constants
Characters for the constant type char should be enclosed within single quotation
marks as shown below:
'C'
'8'
'¥n'
Just as many larger computers, the unit represents characters using ASCII codes,
with some exceptions (see character table page 12).
In addition, the computer uses control characters such as (NL), (HT), (BS), (CR)
which are expressed in C as escape sequences (using the ¥ symbol, when ANSI C
uses \ symbol)
Interpreter
8-bit integer
16-bit integer
16-bit integer
32-bit integer
32-bit single precision floating point
64-bit double precision floating point
104

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Z-1grZ-1

Table of Contents