Previous: , Up: The Output Library   [Index]


13.2.3 The _form Function

<prefix>_form

void <prefix>_form(text s, ...);

Outputs the filled out s form.

The form is filled according the formatting directives.

By default, formatting directives are replaced with the next argument in the arguments list. Some formatting directive classes allow specifying which arguments should be used. If such an indication is included with the formatting directive, the indicated argument becomes the current one and the next one to be used will default to the one following it. The first argument after form corresponds the position 1.

Only arguments of types in a limited set are shown in the output. The types set includes the intrinsic types and the byte data, date and time types. Unless otherwise specified, if the type of the processed argument is not in the allowed set no output corresponding the formatting directive occurs.

See The Byte Data Library.

See The Date And Time Library.

The recognized formatting directives are:

Where the formatting directive does not say otherwise, the numeric types are formatted in base 10. The reals are formatted with as many decimal digits as significant.

Examples:

Format and ArgumentsOutput
"A ~ B ~ C ~", 1, .5, "TWO"
A 1 B .5 C TWO
"*~3 *~2 *~1", -888, 707z, "eastern"
*eastern *707 *-888
"[%d][%f][%s]", 1001, -.25, "ocean"
[1001][-.25][ocean]
"%7d.%-7f.%7s", 1 << 16, 111, "blue"
  65536.111    .   blue
"// - // - //", 1, 2, 3
1 - 2 - 3
"/f4/ - /x8/ - /w8/", 128, 256, 512
0128 - 400 -      512
"/f4f/ - /x8x2/ - /w8ww6/", 128, 256, 512
128 - 100000000 -    512
"/3b4f16x2/ . /2p6/ . /1s.w8/", "X", -.03125, 511
0000,0001,1111,1111 . -.03125  . .......X
"/f~x~/.%d", 8, 16, 65535, 9.0
0000ffff.9
"/1s_w~4x~3/.%d", 65535, 9.0, 8, 16
__________177777.9
"/f4c/", 0x61696d65
aime
"[~]", now()
[2021-06-01 10:25:45]
"/iY/ /1imf2/ /1f2id/", date().solve(1994, 7, 8)
1994 07 08

Previous: Byte Data Output Functions, Up: The Output Library   [Index]