User manual

ASURO - 57
-
If we want to place a comment between programming lines, the set of comment words or lines
starts with “/*” and ends with “*/ ”. A single line may also be de ned to be a comment by starting
the line with “//“
3
. Transforming programming lines into comments is often used to exclude parts
of the program from being processed. The compiler will ignore all comments. Correctly inserted
comments will never cause problems in program execution.
9.1.2. Variables and Datatypes
In programming, variables are being used as container elements for data and they may be
de ned,  lled, read or changed in the course of the program. In order to use a variable, it has
to be declared at  rst. In declarations, variables will be assigned to types and they also may be
provided with an initial value. Types de ne which kind of data are to be stored inside the variable
(integer numbers, positive integers, real numbers, etc....).
Variables are referenced by names, which have to begin with a letter (underscore “_” will be
counted as a letter as well) and may also contain numbers, but none of the other special
characters. Capital letters and noncapital letters will be discerned. As an example: x and X
reference to different variables. Normally capital letters are being used for constants
(which cannot be changed in program  ow, e.g. th number PI = 3.1415) and small letters are being
used for variables.
The following names are reserved words and cannot be used as names for variables:
auto default oat long sizeof union
break do for register static unsigned
case double goto return struct void
char else if short switch volatile
const enum int signed typedef while
continue extern
The following data types will be used for ASURO programming:
Type Range of values Remarks
char -128 ... +127
a (8 bit long) byte, may store a character
from the alphabet
unsigned char 0 ... 255
unsigned characters, may store positive
values only.
int -32768 .. +32767
two byte values in the range
-32768 .. +32767
unsigned int 0 ... 65535
positive integers in the range 0 ... 65535
oat
real numbers
3
According to C++ Standards “//” is a comment mark. In fact the compiler for ASURO is a
C++-Compiler and will understand “//” as a comment mark. “//” as a comment mark may
however cause problems in other compilers.
C for ASURO