Clears the current workspace. All objects in the workspace are erased, most system variables revert to their default settings, and the name of the workspace reverts to CLEAR WS.
)CLEAR CLEAR WS
)CLEAR
also optionally changes the workspace size. You can specify a parameter which is the workspace size you want. It must be an integer, and can be specified
in bytes, or followed by K or KB for kilobytes, M or MB for megabytes, or G or
GB for gigabytes. The valid range is
50 KB to 2 GB (for 32-bit versions of APLX), or up to a theoretical maximum of 8580934592 GB for APLX64.
Depending on the operating
system and its configuration, and the amount of memory already in use by APLX
tasks, you are likely to be limited in the maximum size of workspace which you
can allocate. Thus you may not get the
full size requested. In practice also, if the workspace you allocate is larger than the physical RAM in your system, then performance may become be very poor.
For example:
)CLEAR 1000000 WS Size = 976KB CLEAR WS )CLEAR 1024KB WS Size = 1.0MB CLEAR WS )CLEAR 100M WS Size = 100MB CLEAR WS )CLEAR 2G WS Size = 484MB CLEAR WS
Note that in the last example, the
user requested 2GB but the operating system allocated only 484MB.
Example valid only in APLX64:
)CLEAR 16G WS Size = 16GB CLEAR WS