HPlogo SORT-MERGE/XL Programmer's Guide > Chapter 3 Input and Output by Record

Record Input

MPE documents

Complete PDF
Table of Contents
Index

Record input is useful for sorting information that is entered interactively or produced internally by a program. To input records to SORT/XL you use the HPSORTINPUT intrinsic.

MERGE/XL does not allow record input. The syntax of HPSORTINPUT is:

  HPSORTINPUT (status, buffer, length);

The buffer parameter contains the record to be input.


NOTE: The buffer parameter is a character (byte) array. If your record contains other data types, you must build buffer byte by byte.

The length parameter contains the length of the record.


NOTE: This value must not be greater than the value of the reclength parameter in the HPSORTINIT intrinsic.

An example of using HPSORTINPUT follows:

  var
    status : INTEGER;
    buffer : packed array [1..80] of CHAR;
    length : INTEGER;
       .
       .
       .
  HPSORTINPUT (status, buffer, length);

To use record input:
  • The reclength parameter in HPSORTINIT must be specified.

  • The inputfiles parameter in HPSORTINIT must not be specified.




Using Record Input and Output


Example of Record Input