Integers
The object type INTEGER is the basic one of SYMMETRICA . Let us
first consider the following program that serves for the generation
of an INTEGERobject:
#include "def.h"
#include "macro.h"
main()
{
INT b = 5L;
OP a;
anfang();
a = callocobject();
m_i_i(b,a);
println(a);
freeall(a);
ende();
}
Here is a short explanation: SYMMETRICA uses the type INT for
integervalues, INT is an integer, which is always four bytes long.
It is in most cases of the type long of C. Therefore you have to
write 5L, say, in order to specify a 4-byte integer. This is a
problem of C and not of SYMMETRICA . In the above program
you have, after entering a=callocobject(), an empty object a, which
becomes an INTEGERobject with value 5 by the command m_i_i(b,a).
Then the object is printed to the terminal, using the standard
routine println(). We are now going to describe this basic routine
to some detail, others will follow.
harald.fripertinger "at" uni-graz.at, May 26,
2011