11 - 62 11 - 62
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
ERASE
Instruction
ERASE
• Deletes the array defined by the DIM instruction from memory.
ERASE <array variable> [ <, array variable> … ]
Syntax
array variable
• • • •
Enter the array variable specified by the DIM
instruction.
Examples
ERASE A, B$
• • • •
Deletes array variables A and B$.
Description
• The ERASE instruction deletes the array that was defined by the DIM instruction from
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
REMARK
See the DIM and CLEAR instructions.
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...