1 06/10/80  ioa_ Control Strings
  2 
  3   Calls to the ioa_ subroutine and to the format_line command/active function
  4 require a control_string argument. This is a character string consisting of
  5 text to be copied and ioa_ control codes. Control codes are always identified
  6 by a leading circumflex character (^). Control codes are replaced by strings
  7 of literal characters and by values of later arguments to ioa_ or format_line.
  8 
  9 
 10 List of control codes:
 11 (The letters N, M, and D stand for integers and specify field length.
 12  Any of these integers can be replaced by the control string ^v, which
 13  takes the value of the corresponding argument to ioa_.)
 14 
 15 ^d
 16 ^Nd
 17    replaced by a character string representation of the corresponding numeric
 18    argument. If N is specified, padded with leading spaces to a length of
 19    N characters. Negative numbers have a leading minus sign.
 20 ^i
 21 ^Ni
 22    the same as ^d, for compatibility with FORTRAN and PL/I formats.
 23 
 24 
 25 ^f
 26 ^Nf
 27 ^N.Df
 28 ^.Df
 29    replaced by the character string representation of the corresponding
 30    floating-point argument. If N is specified, padded with leading spaces.
 31    If D is specified, rounded to D digits after the decimal point.
 32 ^e
 33 ^Ne
 34    edits the corresponding numeric argument, or character string representing
 35    a number, in floating-point exponential format:  {-}n.ddddePnn  where P is
 36    + or -. Full precision is shown. If N is specified, padded on the right.
 37 
 38 
 39 ^o
 40 ^No
 41    edits the corresponding fixed-point binary unscaled argument in octal.
 42    Format is the same as for ^d.
 43 ^w
 44 ^Nw
 45    edits the first machine word of the corresponding argument in octal, with
 46    leading zeros shown. If N is omitted, 12 is assumed. If N>12, padded with
 47    leading spaces. If N<12, first 12-N zero digits are suppressed.
 48 ^a
 49 ^Na
 50    edits the corresponding character string argument in ASCII, ignoring
 51    trailing spaces. If N is specified, padded with trailing spaces.
 52 
 53 
 54 ^b
 55 ^Nb
 56 ^N.Db
 57 ^.Db
 58    converts the corresponding bit-string argument to character form.
 59    D is the byte size in bits (0<D<5). The default for D is one.
 60    D=1 outputs the string in binary, D=2 in quarternary (base 4), D=3 in octal,
 61    D=4 in hexadecimal. If N is specified, truncated on the right or padded on
 62    the right with spaces.
 63 ^A
 64    edits an acc string (ALM ASCII with count) pointed to by the corresponding
 65    pointer argument. Trailing spaces are not omitted.
 66 
 67 
 68 ^p
 69 ^Np
 70    edits the corresponding pointer, entry variable, or label variable argument
 71    as:  sss|ooo(bb)  where sss = segment number, ooo = octal offset, and
 72    bb = decimal bit offset. If N is specified, padded on the right with spaces.
 73 ^|
 74 ^N|
 75    is replaced by one or N formfeed characters.
 76 ^/
 77 ^N/
 78    is replaced by one or N newline characters.
 79 ^-
 80 ^N-
 81    is replaced by one or N horizontal tab characters.
 82 
 83 
 84 ^x
 85 ^Nx
 86    is replaced by one or N space characters.
 87 ^^
 88 ^N^
 89    is replaced by one or N circumflex characters.
 90 ^s
 91 ^Ns
 92    ignores the corresponding argument, or N arguments.
 93 ^(
 94 ^N(
 95    starts an iteration loop, ended by a corresponding ^). If N is specified,
 96    repeats the loop N times. Otherwise, repeats it until the argument list is
 97    exhausted. Iterations can be nested up to four deep.
 98 
 99 
100 ^)
101    see "^(" directly above.
102 ^[
103    starts an if/then/else or case selection group, ended by the matching ^]
104    and divided internally into clauses by occurrences of ^; control codes.
105    If the corresponding argument is a fixed binary number N, the Nth clause
106    is expanded as the next portion of the control string. If the corresponding
107    argument is a nonzero bit string, the first clause is expanded. If it is
108    an all-zero bit string, the second clause is expanded, or the control string
109    is omitted if there is no second clause. The arguments "true" and "false"
110    are equivalent to "1"b and "0"b. Nesting can be up to four deep.
111 ^]
112    see "^[" directly above.
113 
114 
115 ^;
116 ^N;
117    delimit clauses inside ^[ ^] groups. The ^N; control code is equivalent
118    to N repetitions of ^;.
119 ^Nt
120 ^N.Mt
121    inserts enough space characters to reach column N. If M is specified, it
122    is the minimum number of spaces to be placed in the output string.
123 
124 
125 Notes:
126   When no field width is specified, a field size is used that is large enough
127 to contain the edited data. If the field size specified is too small, it is
128 ignored in favor of a large enough field size.
129 
130 An invalid control code, an isolated circumflex character (^), or a control
131 code requiring an argument when there are no more arguments left, is inserted
132 unchanged into the edited line.
133 
134 A control code whose type does not match the type of the corresponding
135 argument is replaced by a string of asterisks.
136 
137 If an argument corresponding to a control code is an array (ioa_ subroutine
138 case), elements of the array are taken to match successive control codes.
139 When the array is exhausted, the next argument is processed. Arrays are scanned
140 in row major order.
141 
142 
143 Examples: For examples, see the MPM Subroutines manual.