EXT#

A function or statement which either get or sets the total length of the file whose file handle is its argument or the total amount of unused RAM.

File Length

In its normal usage, EXT# can be used to get or set the length of a file.

length=EXT#f_num
EXT#f_name=length

The file must have been opened before EXT# can be used to get or set its length.

If you want to write extra data at the end of an existing file, you should open the file with OPENUP and then set the file pointer to the end of the existing data:

PTR#f_num=EXT#f_num

When a file is resized the file pointer is moved to the end of the file if it would have otherwise pointed past the end of the file.

Unused RAM

You can retrieve the amount of unused RAM in bytes by passing -1 to the EXT# function. Unused RAM is RAM outside BBC BASIC's memory map that is not currently being used by the TI-OS.

Syntax

<n-var>=EXT#(<numeric>)

EXT#(<numeric>)=<numeric>

Associated Keywords