Erase ( Deletes The Array From Memory ) - Mitsubishi QD51 Programming Manual

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
ERASE
Instruction
• Deletes the array defined by the DIM instruction from memory.
ERASE
Syntax
array variable
ERASE A, B$
Examples
• The ERASE instruction deletes the array that was defined by the DIM instruction from
Description
memory.
• The array, which was deleted by the ERASE instruction, can be declared again by the DIM
instruction.
• All data, which was stored in the array deleted by the ERASE instruction, is lost.
• A "Redimensioned array" error occurs if the array is declared again by the DIM instruction
without being deleted by the ERASE instruction.
Program Example
1 ' Deletes by the ERASE instruction and redefines by the same variable name
10 DIM A(99)
20 DIM A(199)
RUN
Redimensioned array in 20
OK
15 ERASE A
LIST
1 ' Deletes by the ERASE instruction and redefines by the same variable name10 DIM A(99)
10 DIM A(99)
15 ERASE A
20 DIM A(199)
OK
RUN
OK
11 - 62
ERASE
<array variable> [ <, array variable> ... ]
• • • •
• • • •
REMARK
See the DIM and CLEAR instructions.
Enter the array variable specified by the DIM
instruction.
Deletes array variables A and B$.
MELSEC-Q
11 - 62

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents