See Also: File I/O Commands, get_Current_Input_Channel, Get_Channel_Position, Get_Current_Output_Channel, Sequential File I/O
To retrieve the number of the sequential file channel currently being used for input.
Get_Current_Input_Channel To {variable}
variable A variable that will hold the default input channel.
The Get_Current_Input_Channel returns the default input channel into the specified variable, variable. Readln and other sequential input commands read from the default input channel.
Integer iDefaultChannel
// Retrieve the current default input channel.
Get_Current_Input_Channel To iDefaultChannel
Showln "The current input channel is " iDefaultChannel
Using get_Current_Input_Channel causes the current input channel number to change to the mentioned channel, and does not close the previously opened device on that channel. This technique is useful when the channel dependent variables (such as SeqEOF) need to be processed.
Caution: Unexpected behavior can result from mixing sequential I/O code that uses channels with code that does not, since sequential I/O code that does not use explicit channel numbers will use the default channel or the last channel explicitly specified. We recommend always explicitly using channel numbers.