HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions

READX

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

NM and CM callable.

Reads an ASCII string from $STDINX into an array.

Syntax

    I16           CA       I16V

   length:=READX(message,msglength);

Functional Return

length

16-bit signed integer (assigned functional return)

The length of the ASCII string that was read. If msglength is positive, the length specified is in half words; if negative, the length specified is in bytes.

Parameters

message

character array (required)

Returns the ASCII characters that were read.

msglength

16-bit signed integer by value (required)

Returns the length of message. If msglength is positive, it specifies the length in half words; if negative, it specifies the length in bytes. When the record is read, the first msglength characters are input. If msglength is >= record size of message, the entire record is transmitted.

NOTE: Passing a value >message can cause user data corruption or a CCL (1) bounds violation if the system could be corrupted by the call.

Operation Notes

The READX intrinsic reads an ASCII string from $STDINX into an array. This is similar to calling the FREAD intrinsic against the file $STDINX. However, the READX intrinsic is limited in its usefulness in that the full capability of the file system is not available to you. For example, FILE commands are not allowed. Also, you cannot use certain file intrinsics because the filenum parameter, obtained from either the FOPEN/HPFOPEN intrinsic, is not normally available to users of the READX intrinsic.

Basic line editing, such as cancellation of lines and backspacing, are performed automatically by the I/O driver. If the input device is a terminal in full-duplex mode with the ECHO facility on, or if the terminal is in half-duplex mode, the characters read are printed.

READX interprets EOD, EOF, or in a job, EOJ, JOB, or DATA as an end-of-file indicator.

If $STDIN is redirected, only the file's actual EOF is interpreted as the valid EOF indicator.

Condition Codes

CCE (2)

Request granted.

CCG (0)

An EOD, EOF, or in a job, EOJ, JOB, or DATA command was encountered.

CCL (1)

Request denied. A physical I/O error occurred. Further error analysis through the FCHECK intrinsic is not possible.

Related Information

Intrinsics

None

Commands

None

Manuals

Accessing Files Programmer's Guide (32650-90017)

Feedback to webmaster