Futurebasic/Language/Reference/clear index

Clear Index

Syntax
To allocate, increase or decrease memory for  arrays: 1.      2.

To release the memory used by existing  arrays: 3.  4.

Description
Use syntax (1) or (2) to allocate memory for an  string array, and to specify whether the array shall consist of fixed-length or variable-length cells for the strings. Using fixed-length cells provides greater speed but may require more memory. Using variable-length cells provides more efficient use of memory, but processing may be slower. You must use Syntax (1) or (2) to allocate memory for an  array before the array will function.

Use Syntax (1) to specify the total number of bytes to be allocated for a variable-cell-length  array. The  parameter indicates which of the ten available   arrays (numbered 0 through 9) to allocate space for. If you omit this parameter, space will be allocated for  array #0.

Use Syntax (2) to specify the number of elements to be allocated for a fixed-cell-length  array. The  parameter should be in the range (1..256); it fixes the size of the cells. You can store a string of up to characters in such a cell. The  parameter indicates which   array (0 - 9) to allocate space for.

You can also use Syntax (1) or (2) to increase or decrease the amount of memory allocated for an existing array. This is sometimes useful if you find you need more (or less) memory than you originally allocated. If you increase the memory allocation, none of the existing strings in the array will be affected. If you want to decrease the memory allocation without affecting the existing strings, make sure you don't specify too small a number; you can use the  function to determine how much memory the existing strings occupy.

Use Syntax (3) or (4) to release the memory previously allocated for one or more  arrays. Syntax (3) releases the memory occupied by all existing  arrays. Syntax (4) empties each string in an  array without releasing memory occupied by the array. If you omit the  parameter, then   array #0 is used.