Language Reference


FREE Statement

  • FREE matrices;

  • FREE / <keep-matrices>;

The FREE statement releases memory associated with matrices. The matrices specified in the FREE statement lose their values; the memory becomes available for other uses. After the FREE statement executes, the matrix is empty. The NROW function and the NCOL function returnĀ 0. However, any printing attributes (assigned by the MATTRIB statement ) are not released.

The FREE statement is used mostly in large applications or under tight memory constraints to make room for more data (matrices) in the workspace.

For example, the following statement frees the matrices a, b, and c:

free a b c;

If you want to free all matrices, specify a slash (/) after the keyword FREE. If you want to free all matrices except a few, then list the ones you do not want to free after the slash. For example, the following statement frees all matrices except d and e:

free / d e;

For more information, see the discussion of workspace storage in ChapterĀ 23.