* *
*
* * News
 • Daily news
 • Archived news

Columns
 • WildCard
 • Qbasic Articles
 • QB Comic!

Learning center
 • QB Books
 • Qbasic Lessons!
 • Qbasic FAQ
 • Newbies Section
 • Qbasic Tutorials

* *
*
*
*
*  
.FREEFILE Function Programming Example.

  QuickSCREEN      Details     Example      Contents      Index
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
FREEFILE Function Programming Example
The example below uses FREEFILE to obtain a file number for
opening a file:
 
INPUT "Enter file name ", Filename$
Filenum = FREEFILE
OPEN Filename$ FOR OUTPUT AS Filenum
PRINT Filename$;" opened as File #"; Filenum
 
Sample Output
 
Enter file name: DATA.DAT
 
DATA.DAT opened as File # 1
* * ** * * * *