Owner`s manual

106
Floating-point constants and double precision floating-point constants
Decimal values can be defined as float type or double type constants using the
format shown below. Exponents are indicated by the letter “E” or “e”.
Example: 3.1416 -1.4141 1.0e-4 1.23456E5
The following shows the ranges of float and double.
float 0, ±1e-63 - ±9.99999e+63
double 0, ±1e-99 - ±9.999999999e+99
String constants
String constants are contained in double quotation marks. The structure of character
strings is basically the same as for an ANSI compiler, with a 0 (null) being affixed at
the end. The following shows an example of character string:
“How do you do?”
6.1.6 Storage classes
Storage classes are used to specify the memory storage area for a declared variable,
as well that to specify the scope (range that program can read from / write to).
The following table shows the storage classes, as well as the variables that are
available for each class.
Storage class
Variables
auto
Used for short-term storage within a program. This is the default
case and “auto” can be omitted
static
Reserves area throughout execution of program. Values accessed
and acted upon throughout entire program.
register
High frequency access. Variables, which are effective for
increasing speed of execution by allocating values to
microprocessor registers. Most compilers optimize automatically
the executable code using registers for the most accessed
variables, but it may still make sense to specify “register”. The C
interpreter treats “auto” and “register” variables the same way.
extern
File-external or function external global variables. With the
interpreter, file-external can be another program area.
The extern statement is key to tell a compiler that the variable is
already defined elsewhere, and that it should not book any space
for it. When linking the various modules and libraries, the variable
will get its address.
With the interpreter, it is possible to declare in various program
areas the same global variable twice without creating an error. It is
nevertheless a good habit to use the “extern” statement for all
declarations but one.
The only mandatory use of “extern” is when you refer within a
function to an extern global variable. Without an extern statement,
the interpreter would create a local variable with the same name as
the global variable, but superseding it within the function.