The Formatted ASCII Output with List Parameter ($FAOL) service provides
an alternate way to specify input parameters for a call to the $FAO
system service. The formats for both $FAO and $FAOL are shown in the
Format section.
You can specify a maximum of 17 parameters on the $FAO macro. If more
than 17 parameters are required, use the $FAOL macro.
This service does not check the length of the argument list and
therefore cannot return the SS$_INSFARG (insufficient arguments) error
status code. If the service does not receive a sufficient number of
arguments (for example, if you omit required commas in the call), you
might not get the desired result.
$FAO directives can appear anywhere in the control string. The general
format of an $FAO directive is as follows:
The exclamation point (!) specifies that the following characters are
to be interpreted as an $FAO directive, and the characters DD
represent a 1- or 2-character $FAO directive.
You can specify repeat counts and output field lengths as variables by
using a number sign (#) in place of an absolute numeric value:
Numeric FAO output directives (B, W, L, Q, I, A, H, J) can include the
indirect directive @. This immediately precedes the directive (@DD),
and indicates that the next parameter is the address of the value
instead of the value itself. This directive must be used with any
directive that can produce a quadword output when using $FAOL;
otherwise, $FAOL creates a 64-bit sign-extended value. This includes
the Q, A, I, H, and J directives.
To ensure that addresses and integers are displayed properly on the
system, use the following conventions when using the $FAO and $FAOL
system services:
  Table SYS-36 $FAO Directives
  
    | Directive  | 
    Description  | 
  
  
    | Directives for Character String Substitution  | 
  
  
    | 
      !AC
     | 
    
      Inserts a counted ASCII string. It requires one parameter: the address
      of the string to be inserted. The first byte of the string must contain
      the length (in characters) of the string.
     | 
  
  
    | 
      !AD
     | 
    
      Inserts an ASCII string. It requires two parameters: the length of the
      string and the address of the string. Each of these parameters is a
      separate argument.
     | 
  
  
    | 
      !AF
     | 
    
      Inserts an ASCII string and replaces all nonprintable ASCII codes with
      periods (.). It requires two parameters: the length of the string and
      the address of the string. Each of these parameters is a separate
      argument.
     | 
  
  
    | 
      !AS
     | 
    
      Inserts an ASCID string. It requires one parameter: the address of a
      character string descriptor pointing to the string. $FAO assumes that
      the descriptor is a CLASS_S (static) or CLASS_D (dynamic) string
      descriptor. Other descriptor types might give incorrect results.
     | 
  
  
    | 
      !AZ
     | 
    
      Inserts a zero-terminated (ASCIZ) string. It requires one parameter:
      the address of a zero-terminated string.
     | 
  
  
    | Directives for Zero-Filled Numeric Conversion  | 
  
  
    | 
      !OB
     | 
    
      Converts a byte value to the ASCII representation of the value's octal
      equivalent. It requires one parameter: the value to be converted. $FAO
      uses only the low-order byte of the longword parameter.
     | 
  
  
    | 
      !OW
     | 
    
      Converts a word value to the ASCII representation of the value's octal
      equivalent. It requires one parameter: the value to be converted. $FAO
      uses only the low-order word of the longword parameter.
     | 
  
  
    | 
      !OL
     | 
    
      Converts a longword value to the ASCII representation of the value's
      octal equivalent. It requires one parameter: the value to be converted.
     | 
  
  
    | 
      !OQ
     | 
    
      Converts on Alpha and I64 systems a quadword to the ASCII
      representation of its octal equivalent. Must use the indirect directive
      @ to output the quadword value for $FAOL; otherwise, a 64-bit
      sign-extended value is written to the output buffer. It receives one
      parameter: the address of the value to be converted. This directive
      cannot be used from DCL.
     | 
  
  
    | 
      !OA
     | 
    
      Converts an address to the ASCII representation of its octal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit sign-extended value is written to
      the output buffer. It receives one parameter: the address of the value
      to be converted.
      1
     | 
  
  
    | 
      !OI
     | 
    
      Converts an integer to the ASCII representation of its octal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit sign-extended value is written to
      the output buffer. It receives one parameter: the address of the value
      to be converted.
      1
     | 
  
  
    | 
      !OH
     | 
    
      Converts an address to the ASCII representation of its octal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 64-bit sign-extended value is written to
      the output buffer. It receives one parameter: the address of the value
      to be converted.
      2
     | 
  
  
    | 
      !OJ
     | 
    
      Converts an integer to the ASCII representation of its octal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 64-bit sign-extended value is written to
      the output buffer. It receives one parameter: the address of the value
      to be converted.
      2
     | 
  
  
    | 
      !XB
     | 
    
      Converts a byte value to the ASCII representation of the value's
      hexadecimal equivalent. It requires one parameter: the value to be
      converted. $FAO uses only the low-order byte of the longword parameter.
     | 
  
  
    | 
      !XW
     | 
    
      Converts a word value to the ASCII representation of the value's
      hexadecimal equivalent. It requires one parameter: the value to be
      converted. $FAO uses only the low-order word of the longword parameter.
     | 
  
  
    | 
      !XL
     | 
    
      Converts a longword value to the ASCII representation of the value's
      hexadecimal equivalent. It requires one parameter: the value to be
      converted.
     | 
  
  
    | 
      !XQ
     | 
    
      Converts on Alpha and I64 systems a quadword to the ASCII
      representation of its hexadecimal equivalent. Must use the indirect
      directive @ to output the quadword value for $FAOL; otherwise, a 64-bit
      sign-extended value is written to the output buffer. It receives one
      parameter: the value to be converted. This directive cannot be used
      from DCL.
     | 
  
  
    | 
      !XA
     | 
    
      Converts an address to the ASCII representation of its hexadecimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit sign-extended value is written to
      the output buffer. It receives one parameter: the address of the value
      to be converted.
      1
     | 
  
  
    | 
      !XI
     | 
    
      Converts an integer to the ASCII representation of its hexadecimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit sign-extended value is written to
      the output buffer. It receives one parameter: the address of the value
      to be converted.
      1
     | 
  
  
    | 
      !XH
     | 
    
      Converts an address to the ASCII representation of its hexadecimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 64-bit sign-extended value is written to
      the output buffer. It receives one parameter: the address of the value
      to be converted.
      2
     | 
  
  
    | 
      !XJ
     | 
    
      Converts an integer to the ASCII representation of its hexadecimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 64-bit sign-extended value is written to
      the output buffer. It receives one parameter: the address of the value
      to be converted.
      2
     | 
  
  
    | 
      !ZB
     | 
    
      Converts an unsigned byte value to the ASCII representation of the
      value's decimal equivalent. It requires one parameter: the value to be
      converted. $FAO uses only the low-order byte of the longword parameter.
     | 
  
  
    | 
      !ZW
     | 
    
      Converts an unsigned word value to the ASCII representation of the
      value's decimal equivalent. It requires one parameter: the value to be
      converted. $FAO uses only the low-order word of the longword parameter.
     | 
  
  
    | 
      !ZL
     | 
    
      Converts an unsigned longword value to the ASCII representation of the
      value's decimal equivalent. It requires one parameter: the value to be
      converted.
     | 
  
  
    | 
      !ZQ
     | 
    
      Converts on Alpha and I64 systems an unsigned quadword to the ASCII
      representation of its decimal equivalent. Must use the indirect
      directive @ to output the quadword value for $FAOL; otherwise, a 64-bit
      zero-extended value is written to the output buffer. It receives one
      parameter: the value to be converted. This directive cannot be used
      from DCL.
     | 
  
  
    | 
      !ZA
     | 
    
      Converts an unsigned address to the ASCII representation of its decimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit value is written to the output
      buffer. It receives one parameter: the address of the value to be
      converted.
      1
     | 
  
  
    | 
      !ZI
     | 
    
      Converts an unsigned integer to the ASCII representation of its decimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit value is written to the output
      buffer. It receives one parameter: the address of the value to be
      converted.
      1
     | 
  
  
    | 
      !ZH
     | 
    
      Converts an unsigned address to the ASCII representation of its decimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 64-bit zero-extended value is written to
      the output buffer. It receives one parameter: the address of the value
      to be converted.
      2
     | 
  
  
    | 
      !ZJ
     | 
    
      Converts an unsigned integer to the ASCII representation of its decimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 64-bit zero-extended value is written to
      the output buffer. It receives one parameter: the value to be converted.
      2
     | 
  
  
    | Directives for Blank-Filled Numeric Conversion  | 
  
  
    | 
      !UB
     | 
    
      Converts an unsigned byte value to the ASCII representation of the
      value's decimal equivalent. It requires one parameter: the value to be
      converted. $FAO uses only the low-order byte of the longword parameter.
     | 
  
  
    | 
      !UW
     | 
    
      Converts an unsigned word value to the ASCII representation of the
      value's decimal equivalent. It requires one parameter: the value to be
      converted. $FAO uses only the low-order word of the longword parameter.
     | 
  
  
    | 
      !UL
     | 
    
      Converts an unsigned longword value to the ASCII representation of the
      value's decimal equivalent. It requires one parameter: the value to be
      converted.
     | 
  
  
    | 
      !UQ
     | 
    
      Converts on Alpha and I64 systems an unsigned quadword to the ASCII
      representation of its decimal equivalent. Must use the indirect
      directive @ to output the quadword value for $FAOL; otherwise, a 64-bit
      value is written to the output buffer. It receives one parameter: the
      address of the value to be converted. This directive cannot be used
      from DCL.
     | 
  
  
    | 
      !UA
     | 
    
      Converts an unsigned address to the ASCII representation of its decimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit value is written to the output
      buffer. It receives one parameter: the address of the value to be
      converted.
      1
     | 
  
  
    | 
      !UI
     | 
    
      Converts an unsigned integer to the ASCII representation of its decimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit value is written to the output
      buffer. It receives one parameter: the address of the value to be
      converted.
      1
     | 
  
  
    | 
      !UH
     | 
    
      Converts an unsigned address to the ASCII representation of its decimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 64-bit value is written to the output
      buffer. It receives one parameter: the address of the value to be
      converted.
      2
     | 
  
  
    | 
      !UJ
     | 
    
      Converts an unsigned integer to the ASCII representation of its decimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 64-bit value is written to the output
      buffer. It receives one parameter: the address of the value to be
      converted.
      2
     | 
  
  
    | 
      !SB
     | 
    
      Converts a signed byte value to the ASCII representation of the value's
      decimal equivalent. It requires one parameter: the value to be
      converted. $FAO uses only the low-order byte of the longword parameter.
     | 
  
  
    | 
      !SW
     | 
    
      Converts a signed word value to the ASCII representation of the value's
      decimal equivalent. It requires one parameter: the value to be
      converted. $FAO uses only the low-order word of the longword parameter.
     | 
  
  
    | 
      !SL
     | 
    
      Converts a signed longword value to the ASCII representation of the
      value's decimal equivalent. It requires one parameter: the value to be
      converted.
     | 
  
  
    | 
      !SQ
     | 
    
      Converts on Alpha and I64 systems a signed quadword to the ASCII
      representation of its decimal equivalent. Must use the indirect
      directive @ to output the quadword value for $FAOL; otherwise, a 32-bit
      value is written to the output buffer. It receives one parameter: the
      address of the value to be converted. This directive cannot be used
      from DCL.
     | 
  
  
    | 
      !SA
     | 
    
      Converts a signed address to the ASCII representation of its decimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit value is written to the output
      buffer. It receives one parameter: the address of the value to be
      converted.
      1
     | 
  
  
    | 
      !SI
     | 
    
      Converts a signed integer to the ASCII representation of its
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit value is written to the output
      buffer. It receives one parameter: the address of the value to be
      converted.
      1
     | 
  
  
    | 
      !SH
     | 
    
      Converts a signed address to the ASCII representation of its decimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit value is written to the output
      buffer. It receives one parameter: the address of the value to be
      converted.
      2
     | 
  
  
    | 
      !SJ
     | 
    
      Converts a signed integer to the ASCII representation of its decimal
      equivalent. Must use the indirect directive @ to output the quadword
      value for $FAOL; otherwise, a 32-bit value is written to the output
      buffer. It receives one parameter: the address of the value to be
      converted.
      2
     | 
  
  
    | Directives for Output String Formatting  | 
  
  
    | 
      !/
     | 
    
      Inserts a new line, that is, a carriage return and line feed. It takes
      no parameters.
     | 
  
  
    | 
      !_
     | 
    
      Inserts a tab. It takes no parameters.
     | 
  
  
    | 
      !^
     | 
    
      Inserts a form feed. It takes no parameters.
     | 
  
  
    | 
      !!
     | 
    
      Inserts an exclamation point. It takes no parameters.
     | 
  
  
    | 
      !%S
     | 
    
      Inserts the letter
      S if the most recently converted numeric value is not 1. An
      uppercase
      S is inserted if the character before the !%S directive is an
      uppercase character; a lowercase
      s is inserted if the character is lowercase.
     | 
  
  
    | 
      !%T
     | 
    
      Inserts the system time. It takes one parameter: the address of a
      quadword time value to be converted to ASCII. If you specify 0, the
      current system time is inserted.
     | 
  
  
    | 
      !%U
     | 
    
      Converts a longword integer UIC to a standard UIC specification in the
      format [xxx,yyy], where
      xxx is the group number and
      yyy is the member number. It takes one parameter: a longword
      integer. The directive inserts the surrounding brackets ([ ]) and comma
      (,).
     | 
  
  
    | 
      !%I
     | 
    
      Converts a longword to the appropriate alphanumeric identifier. If the
      longword represents a UIC, surrounding brackets ([ ]) and comma (,) are
      added as necessary. If no identifier exists and the longword represents
      a UIC, the longword is formatted as in !%U. Otherwise it is formatted
      as in !XL with a preceding !%X added to the formatted result.
     | 
  
  
    | 
      !%D
     | 
    
      Inserts the system date and time. It takes one parameter: the address
      of a quadword time value to be converted to ASCII. If you specify 0,
      the current system date and time is inserted.
     | 
  
  
    | 
      !n%C
     | 
    
      Inserts a character string when the most recently evaluated argument
      has the value
      n. (Recommended for use with multilingual products.)
     | 
  
  
    | 
      !%E
     | 
    
      Inserts a character string when the value of the most recently
      evaluated argument does not match any preceding !n%C directives.
      (Recommended for use with multilingual products.)
     | 
  
  
    | 
      !%F
     | 
    
      Makes the end of a plurals statement.
     | 
  
  
    | 
      !n<
     | 
    
      See description of next directive (!>).
     | 
  
  
    | 
      !>
     | 
    
      This directive and the preceding one (!n<) are used together to
      define an output field width of
      n characters within which all data and directives to the right
      of !n< and to the left of !> are left-justified and blank-filled.
      It takes no parameters.
     | 
  
  
    | 
      !n*c
     | 
    
      Repeats the character
      c in the output string
      n times.
     | 
  
  
    | Directives for Parameter Interpretation  | 
  
  
    | 
      !--
     | 
    
      Causes $FAO to reuse the most recently used parameter in the list. It
      takes no parameters.
     | 
  
  
    | 
      !+
     | 
    
      Causes $FAO to skip the next parameter in the list. It takes no
      parameters.
     |