SENDX Statement

The SENDX statement sends data to the specified line, converting ASCII hexadecimal code into its character equivalent.

Format

SENDX expr TO line-expr [THEN

   statements

END] [ELSE

   statements

END]

Description

The SENDX statement translates the data from its ASCII hexadecimal format into its equivalent characters and sends the resulting data to the specified line. See SEND Statement for more information on the syntax of SENDX.

By using SENDX instead of SEND, strings containing segment marks (CHAR(255)) may be sent to another line. Using SENDX, object code may be sent to a remote system. Also, card readers and bar code readers may need certain characters that Pick cannot send except in hexadecimal form.

Since the @ function serves only to generate the command sequences for terminal manipulation, it cannot be used directly in a SENDX statement because the resulting command sequences are not in ASCII hexadecimal format. However, to simulate the properties of the @ function for a SENDX statement, the characters it generates may be translated into hexadecimal format to produce the expected results.

To translate data from its ASCII characters into hexadecimal format, use the OCONV function with the MX conversion code. To send ASCII characters directly, use the SEND statement. See SEND Statement for more information.

Example

To send STRING in hexadecimal format to line 3, the code would read:

STRING = OCONV(STRING , "MX")

SENDX STRING TO 3 ELSE

   PRINT "COULD NOT SEND STRING"

END

See Also

Statement and Function Reference