Opening Files or Devices FreeFile Gets an available file number that can be used to read or write from files or devices. OpenBinds a file number to a physical file to provide reading and writing capabilities. Open ComBinds a file number to a communications port. Open ConsBinds a file number to the standard input and output streams. Open ErrBinds a file number to the standard input and error streams. Open LptBinds a file number to a printer device. Open PipeBinds a file number to the input and output streams of a process. Open ScrnBinds a file number directly to the console. CloseUnbinds a file number from a file or device. ResetUnbinds all active file numbers. File I/O modesInput (File Mode) File access privilegesText data can be read from the file. OutputText data can be written to the file. AppendText data is added to the end of a file when output. BinaryArbitrary data can be read from or written to the file. RandomBlocks of data of certain size can be read from and written to the file. Access Character encodingAn overview of file access privileges. Read (File Access)Binary data can only be read from the file. Write (File Access)Binary data can only be written to the file. Read Write(File Access)Binary data can be read from and written to the file. | Reading from and Writing to Files or Devices Input # File Position and other InfoReads a list of values from a file or device. Write #Writes a list of values to a file or device. Input()Reads a number of characters from a file or device. Winput()Reads a number of wide characters from a file or device. Line Input #Reads a line of text from a file or device. Print #Writes text data to a file or device. Print # UsingWrites formatted text data to a file or device. Put #Writes arbitrary data to a file or device. Get #Reads arbitrary data from a file or device. LOF Gets the length (in bytes) of a file. LOCGets the file position of the last read or write operation. EOFReturns true if all of the data has been read from a file. Seek (Statement)Sets the file position of the next read or write operation. Seek (Function)Gets the file position of the next read or write operation. LockRestricts read or write access to a file or portion of a file. UnlockRemove read or write restrictions from a previous Lock command. |