Skip to content

Write_Hex

Include: Use System\FileSystem.pkg

See Also: Write, Write_Line, Write_Block, Read_Hex, Sequential Channels

Purpose

Writes text as hex-encoded output.

Syntax

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

Behavior

Write_Hex converts the supplied value to text first, then writes that text hex-encoded.

For example, Write_Hex Channel hFile "012345" stores text that Read_Line sees as 303132333435, and Read_Hex reads back as 012345.

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 "hex.txt"
Write_Hex Channel hFile "012345"
Close_Output Channel hFile
Send Seq_Release_Channel hFile