HTBasic Help
×
Menu
Index

SCRATCH

Clears user memory.
 
 SCRATCH [ A|ALL | B|BIN | C|COM | KEY [key-number] |
         R|RECALL ]
 
Usage:
SCRATCH
SCRATCH KEY 2
SCRATCH C
Example: SCRATCH.BAS
Description:
SCRATCH allows you to clear the BASIC program, program variables, COM variables, softkey macro definitions and the recall buffer. The following paragraphs explain each variation of SCRATCH:
SCRATCH
Deletes the current BASIC program and any variables not in COM.
SCRATCH A or ALL
SCRATCH A clears the BASIC program, all variables, including those in COM and all softkey macro definitions. Internal parameters are set to their default, start-up values. SCRATCH ALL is synonymous with SCRATCH A.
SCRATCH B or BIN
In HTBasic, SCRATCH B is equivalent to SCRATCH A. In HP BASIC, it deletes all BINs except the CRT driver in use. In HTBasic, BINs are used for device drivers which can't be SCRATCHed. SCRATCH B is synonymous with SCRATCH BIN.
SCRATCH C or COM
SCRATCH C clears all variables including those in COM, but leaves the BASIC program and the softkey macro definitions intact. SCRATCH COM is synonymous with SCRATCH C.
SCRATCH KEY [key-number]
Without the optional key number, this command clears all the softkey macro definitions. With the key number, only the specified key is cleared. The key-number may be a numeric expression which is rounded to an integer and must be in the range zero through twenty-three.
SCRATCH R or RECALL
SCRATCH R clears the keyboard RECALL buffer. SCRATCH RECALL is synonymous with SCRATCH R.
See Also: