Close_Input

See Also: File I/O Commands, Close_Output, Direct_Input, Channel command component, Sequential File I/O

Purpose

To close a sequential input file.

Syntax

Close_Input [Channel {channel-no}]

If {channel-no} is not specified, channel 0 will be assumed.

What It Does

Close_Input closes files opened for input by the Direct_Input command.

Example

Here is a small procedure that reads a sequential file (hello.txt) to the end of the file. It uses Close_Input to close the text file.

Procedure OnClick

    String sBuffer

    Direct_Input "hello.txt"

    Showln "Contents of Hello.Txt"

    While (Not (Seqeof))

        // Read from the text file.

        Readln sBuffer

        Showln sBuffer

    Loop

    Close_Input  // Close the sequential input file, hello.txt

End_Procedure

Notes