Rockwell-automation 1746-BAS BASIC LANGUAGE User Manual Page 77

  • Download
  • Add to my manuals
  • Print
  • Page
    / 280
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 76
1 Publication 1746-RM001A-US-P
Chapter
6
Assignment Functions
This chapter describes and illustrates commands that assign storage, reset data
storage, and values to variables within the BASIC program or from the command
line. Table 6.1 lists the corresponding mnemonics.
CLEAR
Purpose
Use the CLEAR statement to set all variables equal to 0 and reset all BASIC evoked
interrupts and stacks. This means that after the CLEAR statement is executed, an
ONTIME statement must be executed before the module acknowledges the
internal timer interrupts. ERROR trapping with the ONERR statement also does
not occur until an ONERR [ln num] statement is executed.
The CLEAR statement does not affect the free running clock that is enabled by the
CLOCK1 statement. CLOCK0 is the only module statement that can disable the
free running clock.
CLEAR also does not reset the memory that has been allocated for strings, so it is
not necessary to enter the STRING [exp], [expr] statement to re-allocate memory
for strings after the CLEAR statement is executed. In general, CLEAR is used to
erase all variables.
Syntax
CLEAR
Table 6.1 Chapter Reference Guide
If you need (to) Use this mnemonic Page
Clear variables, interrupts & strings. CLEAR 6-1
Clear interrupts. CLEARI 6-3
Clear all stacks. CLEARS 6-3
Data read by Read statement. DATA 6-4
Allocate memory for array variables. DIM 6-4
Assign a variable or a string a value (LET is optional). LET 6-5
RESTORE read pointer. RESTORE 6-7
Page view 76
1 2 ... 72 73 74 75 76 77 78 79 80 81 82 ... 279 280

Comments to this Manuals

No comments