Seq_New_Channel¶
Include: Use System\FileSystem.pkg
See Also: Seq_Release_Channel, Sequential Channels, Direct_Input, Direct_Output, Append_Output, Close_Input, Close_Output
Purpose¶
Returns an available sequential I/O channel for input or output operations.
Syntax¶
Get Seq_New_Channel to {ChannelNumber}
Return value¶
Returns an available channel number. If no channel is available, it returns DF_SEQ_CHANNEL_NOT_AVAILABLE.
Seq_New_Channel reserves the returned channel until it is released with Seq_Release_Channel. See Sequential Channels for details.
Example¶
Use System\FileSystem.pkg
Handle hFile
Get Seq_New_Channel to hFile
If (hFile <> DF_SEQ_CHANNEL_NOT_AVAILABLE) Begin
Direct_Output Channel hFile FILE "test1.txt"
Write_Line Channel hFile "This is some text."
Close_Output Channel hFile
Send Seq_Release_Channel hFile
End