MAINSAIL Language Manual, Section 47.49

previous   next   top   contents   index   framed top   this page unframed


47.49. store

Figure 47–41. store (GENERIC)
$BUILTIN
PROCEDURE   store       (CHARADR c;
                         
INTEGER v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
INTEGER v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
ADDRESS v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
POINTER v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
BITS v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
STRING v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
REAL v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
LONG INTEGER v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
LONG REAL v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
LONG BITS v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
BOOLEAN v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
CHARADR v;
                         
OPTIONAL INTEGER dspl);

$BUILTIN
PROCEDURE   store       (ADDRESS a;
                         
$PROCVAR v;
                         
OPTIONAL INTEGER dspl);

store is used to store a value into a memory or character address.

The forms in which an ADDRESS is the first parameter store the value v into the memory location given by displace(a,dspl). If a is NULLADDRESS or unaligned (see Section 3.9), if dspl is not a multiple of the size of the smallest MAINSAIL data type, or if displace(a,dspl) is undefined, the effect of store is undefined. The form in which a CHARADR is the first argument stores the character code v at the character address given by displace(c,dspl). If c is NULLCHARADR or displace(c,dspl) is undefined, the effect of store is undefined.

Even if v is an explicitly sized value (see Section 3.12), store always stores a value of the size of v's base type. Use $storeSized (see Section 47.52) to control the number of bytes stored for a given value.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 47.49