Omron C200H-ASC11 Manual page 128

Ascii units
Hide thumbs Also See for C200H-ASC11:
Table of Contents

Advertisement

Character Variable Space Allocations
Dynamic (Free) Method
• The maximum length specified for the character variable content using
the OPTION LENGTH command cannot be exceeded. If the maximum is
exceeded, the amount of data over the limit will not be stored in the string
variable "truncated."
• For the static method, once the variable type is specified under a particu-
lar variable name, that variable cannot be changed to a different type
under the same name during execution of the program.
• For the static method, the DEF (variable type declaration) command can-
not be executed more than once for the same variable name during the
program.
• For the static method, at compile time, the memory size for the array vari-
able is allocated statically, based on the number of subscripts. Therefore,
only a fixed number of DIM command subscripts can be specified.
Numeric expressions or numeric variables cannot be specified. (For the
dynamic method, it is possible to alter the number of subscripts as
required by using numeric expressions or numeric variables during the
program to specify the number of subscripts.)
While executing the BASIC program, the space for each character variable in
the BASIC program is reserved dynamically in user memory.
Setting
The OPTION LENGTH command is not used.
Content
Only the required amount of user memory is used. If the size of the variable
becomes larger during the execution of the BASIC program, the space that
had been reserved will be released once and then reserved again. (The
released area will become free area of that size.)
If the allocation cannot be made when trying to reserve the space again, due
to insufficient user memory capacity, an error will be generated and the pro-
gram will be stopped. In such cases, it is necessary to change the program
and the way in which the character variables are used, or use the ON ERROR
command to free some memory.
BASIC program
execution
Note The ASCII Unit is operated differently, depending on which of the two above
methods is used. The differences are as follows:
• The compile time is longer for the static method than for the dynamic
method.
• Conversely, when substituting character variables in the dynamic method,
user memory release or allocation processing may be generated. There-
fore, the execution time for commands is sometimes longer than for the
static method.
While executing the BASIC
program, the space for each
character variable in the BASIC
program is reserved dynamically
in user memory.
Section 7-2
User memory
Variable area
Variable area
119

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200h-asc21C200h-asc31

Table of Contents