FREEFILE: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
(Created page with "The FREEFILE function returns a LONG value that is an unused file access number. {{PageSyntax}} : fileHandle& = FREEFILE {{PageDescription}} * FREEFILE values should be given to unique variables so that each file has a specific variable value assigned to it. * Once the number is assigned in an OPEN statement, the file number can later be used to read, write or CLOSE that file. * File numbers CLOSEd are made available to FREEFILE for re...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
* [[FREEFILE]] values should be given to unique variables so that each file has a specific variable value assigned to it.
* [[FREEFILE]] values should be given to unique variables so that each file has a specific variable value assigned to it.
* Once the number is assigned in an [[OPEN]] statement, the file number can later be used to read, write or [[CLOSE]] that file.
* Once the number is assigned in an [[OPEN]] statement, the file number can later be used to read, write or [[CLOSE]] that file.
* File numbers [[CLOSE]]d are made available to [[FREEFILE]] for reuse immediately.  
* File numbers [[CLOSE]]d are made available to [[FREEFILE]] for reuse immediately.
* [[FREEFILE]] returns are normally sequential starting with 1. Only file numbers in use will not be returned.
* [[FREEFILE]] returns are normally sequential starting with 1. Only file numbers in use will not be returned.
* [[OPEN]] each file number after each [[FREEFILE]] return or the values returned may be the same.
* [[OPEN]] each file number after each [[FREEFILE]] return or the values returned may be the same.
<!-- redundant * [[OPEN COM]] statements cannot use any number assigned to files already OPEN. -->





Latest revision as of 00:37, 29 January 2023

The FREEFILE function returns a LONG value that is an unused file access number.


Syntax

fileHandle& = FREEFILE


Description

  • FREEFILE values should be given to unique variables so that each file has a specific variable value assigned to it.
  • Once the number is assigned in an OPEN statement, the file number can later be used to read, write or CLOSE that file.
  • File numbers CLOSEd are made available to FREEFILE for reuse immediately.
  • FREEFILE returns are normally sequential starting with 1. Only file numbers in use will not be returned.
  • OPEN each file number after each FREEFILE return or the values returned may be the same.


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage