| United States-English |
|
|
|
![]() |
Accessing Files Programmer's Guide: HP 3000 MPE/iX Computer Systems > Chapter 8 Writing to a FileWriting Messages to the System Console |
|
Two intrinsics are available that allow you to print a character string directly from your program to the system console:
Example 8-4 is an HP Pascal/iX program segment that illustrates how your program can call the PRINTOP intrinsic to transmit a message from a character array in your program to the System Console. Example 8-4. Writing a Message to the System Console
The PRINTOP intrinsic transmits a maximum of 56 ASCII characters to the system console. Longer messages are truncated to 56 characters. For more information about PRINTOP intrinsic parameters, refer to the MPE/iX Intrinsics Reference Manual (32650-90028). The PRINTOPREPLY intrinsic can be used to transmit a message from an array in your program to the system console and to request that a reply be returned. The message that you send must be no longer than 50 characters in length. PRINTOPREPLY can return a maximum of 31 ASCII characters to your program. For example, a program could ask the system operator if the line printer contains a certain type of form. If the response is affirmative, the program could then write information on these forms. Example 8-5 is an HP Pascal/iX code segment containing a PRINTOPREPLY intrinsic call. The program is asking the system operator if the line printer device LP contains the correct forms. The program is requesting that the system operator respond with a simply YES or NO response. The program takes appropriate action based upon the characters returned in reply. Example 8-5. Writing a Message to the System Console and Requesting a Reply
The actual length of the System Operator's reply is returned to expected_length. For more information about PRINTOREPLY intrinsic parameters, refer to the MPE/iX Intrinsics Reference Manual (32650-90028). |
|||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||