FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

DISK I/O

Determine a free file ID


This is what I use to find an available file number when using the OPEN statement:

CLEAR LOCAL MODE
DIM fnum
LOCAL FN FindUnusedFileRef
fnum = 1
WHILE USR _Fileaddr(fnum)
INC(fnum)
WEND
END FN = fnum

Derek