Skip to content

Write

Include: Use System\FileSystem.pkg

See Also: Direct_Output, Append_Output, Write_Line, Write_Block, Write_Hex, Read, Sequential Channels

Purpose

Writes text to a sequential output file without adding a separator or line terminator.

Syntax

Write [Channel {ChannelNumber}] {Value} ...

Behavior

Write converts each supplied value to text using normal DataFlex string conversion and writes the text. It does not insert spaces, commas, or a line terminator.

Write Channel hFile "A" "B" writes AB unless the program supplies spacing.

Use Seq_New_Channel when opening files in application code; see Sequential Channels.

Example

Handle hFile

Get Seq_New_Channel to hFile
Direct_Output Channel hFile FILE "test1.txt"
Write Channel hFile "A" " " "B"
Close_Output Channel hFile
Send Seq_Release_Channel hFile