Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VFMT_$READ2                       Domain/OS                        VFMT_$READ2


NAME
     vfmt_$read2 - formatted read from standard input

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/vfmt.h>

     void vfmt_$read2(
          char *control_string,
          short *field_count,
          status_$t *status,
          void *a1, *a2)

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/vfmt.ins.pas';

     procedure vfmt_$read2(
          in control_string: univ vfmt_$string_t;
          out field_count: integer;
          out status: status_$t;
          var a1, a2: univ vfmt_$generic_unsigned_arg);

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/vfmt.ins.ftn'

           integer*2 nchar
           parameter (nchar = 128)

           integer*4 status
           integer*2 field_count
           character control_string*(nchar)
           integer*4 a1, a2

           call vfmt_$read2(control_string, field_count, status, a1, a2)

DESCRIPTION
     Vfmt_$read2 reads an ASCII line from standard input, formatted in fields
     as defined by control_string, into two destination variables.

     control_string
          A VFMT format string defining the input fields to be decoded.

     field_count
          The number of input fields decoded into the destination variables.

     status
          The completion status.

     a1, a2
          Destination variables to receive the decoded input.

NOTES
     A string field in control_string requires two destination variables:  a
     character array to receive the value of the string, and a 2-byte integer
     variable to receive the number of bytes in the decoded string.

     The length of a string field can be defined in control_string with the M
     option or, if the M option is not present, by passing a maximum string
     length in the destination variable intended to receive the string length.
     Regardless of whether there is an M option associated with the string
     field, the value returned in the destination variable is the minimum of
     the actual length of the string supplied by vfmt_$read2 and the maximum
     string length specified in the call.

SEE ALSO
     vfmt_$read10, vfmt_$read5.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026