Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VFMT_$ENCODE2                     Domain/OS                      VFMT_$ENCODE2


NAME
     vfmt_$encode2 - formatted write to a string

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

     void vfmt_$encode2(
          char *control_string,
          char *string_buffer,
          int &buffer_size,
          int *string_length,
          ...)

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

     procedure vfmt_$encode2(
          in control_string: univ vfmt_$string_t ;
          out string_buffer: univ vfmt_$string_t;
          in buffer_size: integer;
          out string_length: integer;
          in a1, a2: univ vfmt_$generic_signed_arg);

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

           integer*2 nchar
           parameter (nchar = 128)

           integer*2 buffer_size, string_length
           character control_string*(nchar), string_buffer*200
           integer*4 a1, a2

           call vfmt_$encode2(control_string, string_buffer,
          &                   buffer_size, string_length,
          &                   a1, a2)

DESCRIPTION
     Vfmt_$encode2 encodes up to two source variables into an ASCII string
     whose format is defined by control_string, and writes the result into
     string_buffer.

     control_string
          A VFMT format string defining how to format the source variables.

     string_buffer
          A buffer allocated to receive the formatted string supplied by
          vfmt_$encode2.

     buffer_size
          The number of bytes allocated at string_buffer to receive the for-
          matted string.  Vfmt_$encode2 will not write more than buffer_size
          bytes into string_buffer.

     string_length
          The number of bytes that vfmt_$encode2 wrote into string_buffer.

     a1, a2
          Up to two source variables containing data to encode into ASCII.

NOTES
     A string field in control_string requires two source variables:  a char-
     acter array containing the value of the string, and a 2-byte integer
     variable specifying the number of bytes in the string.

SEE ALSO
     vfmt_$encode, vfmt_$encode10, vfmt_$encode5.

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