The outputsdict dictionary is primarily used to support outputs , but its contents may be of use to an application that wishes to extend or modify formatted printing.
There is an entry in outputsdict for each Onyx type. Each entry renders objects that correspond to its name using optional flags stored in a dictionary. The following flags are supported for all types:
The following additional flags are supported for integers:
The following additional flags are supported for reals:
Input(s) Op/Proc/Var Output(s) |
Description |
array flags arraytype string |
Create formatted string from array. |
boolean flags booleantype string |
Create formatted string from boolean. |
class flags classtype string |
Create formatted string from class. |
condition flags conditiontype string |
Create formatted string from condition. |
dict flags dicttype string |
Create formatted string from dict. |
file flags filetype string |
Create formatted string from file. |
fino flags finotype string |
Create formatted string from fino. |
handle flags handletype string |
Create formatted string from handle. |
instance flags instancetype string |
Create formatted string from instance. |
integer flags integertype string |
Create formatted string from integer. |
mark flags marktype string |
Create formatted string from mark. |
mutex flags mutextype string |
Create formatted string from mutex. |
name flags nametype string |
Create formatted string from name. |
null flags nulltype string |
Create formatted string from null. |
operator flags operatortype string |
Create formatted string from operator. |
pmark flags pmarktype string |
Create formatted string from pmark. |
real flags realtype string |
Create formatted string from real. |
regex flags regextype string |
Create formatted string from regex. |
regsub flags regsubtype string |
Create formatted string from regsub. |
stack flags stacktype string |
Create formatted string from stack. |
string flags stringtype string |
Create formatted string from string. |
thread flags threadtype string |
Create formatted string from thread. |
onyx:0> outputsdict begin onyx:0> [1 [2 3] 4] onyx:1> dup <$w 9 $p `_' $r 0> arraytype print `\n' print flush __-array- onyx:1> dup <$w 9 $p `_' $r 1> arraytype print `\n' print flush [1 -array- 4] onyx:1>
onyx:0> outputsdict begin onyx:0> false onyx:1> dup <$n 3> booleantype print `\n' print flush fal onyx:1> dup <$n 7> booleantype print `\n' print flush false onyx:1>
onyx:0> outputsdict begin onyx:0> vclass onyx:1> <$w 30 $p `.' $j $c> classtype print `\n' print flush ...........-class-............ onyx:0>
onyx:0> outputsdict begin onyx:0> condition onyx:1> <$w 15 $p `_' $j $c> booleantype print `\n' print flush __-condition-__ onyx:0>
onyx:0> outputsdict begin onyx:0> <$foo `foo'> <$w 30 $p `.' $j $r> dicttype print `\n' print flush ..................<$foo `foo'> onyx:0>
onyx:0> outputsdict begin onyx:0> stdin onyx:1> <$w 30 $p `.' $j $c> filetype print `\n' print flush ............-file-............ onyx:0>
onyx:0> outputsdict begin onyx:0> ( onyx:1> <$w 30 $p `.' $j $c> finotype print `\n' print flush ............-fino-............ onyx:0>
onyx:0> outputsdict begin onyx:0> taggedhandle onyx:1> <$w 30 $p `.' $j $l handletype print `\n' print flush =tagged=...................... onyx:0>
onyx:0> outputsdict begin onyx:0> vinstance onyx:1> <$w 30 $p `.' $j $c> instancetype print `\n' print flush ..........-instance-.......... onyx:0>
onyx:0> outputsdict begin onyx:0> 42 <$w 6 $p `_' $j $c $s $-> integertype print `\n' print flush __42__ onyx:0> 42 <$w 6 $p `_' $j $c $s $+> integertype print `\n' print flush _+42__ onyx:0> `0x' print 42 <$w 6 $p `0' $b 16> integertype print `\n' print flush 0x00002a onyx:0>
onyx:0> outputsdict begin onyx:0> mark onyx:1> <$w 30 $p `.' $j $c> marktype print `\n' print flush ............-mark-............ onyx:0>
onyx:0> outputsdict begin onyx:0> mutex onyx:1> <$w 30 $p `.' $j $c> mutextype print `\n' print flush ...........-mutex-............ onyx:0>
onyx:0> outputsdict begin onyx:0> $foo onyx:1> <$w 30 $p `.' $j $c> nametype print `\n' print flush .............$foo............. onyx:0>
onyx:0> outputsdict begin onyx:0> null onyx:1> <$w 30 $p `.' $j $c> nulltype print `\n' print flush .............null............. onyx:0>
onyx:0> outputsdict begin onyx:0> ~realtime onyx:1> <$w 30 $p `.' $j $c> operatortype print `\n' print flush .........--realtime--......... onyx:0>
onyx:0> outputsdict begin onyx:0> { ~x Error $undefined ostack: (-pmark- $x) dstack: (-dict- -dict- -dict- -dict- -dict-) cstack: () estack/istack trace (0..1): 0: -file- 1: --start-- onyx:3> pop pop resume onyx:1> <$w 30 $p `.' $j $c> pmarktype print `\n' print flush ...........-pmark-............ onyx:0>
onyx:0> outputsdict begin onyx:0> 6.022e23 <$d 4> realtype print `\n' print flush 602200000000000027262976.0000 onyx:0> 6.022e23 <$d 4 $e true> realtype print `\n' print flush 6.0220e+23 onyx:0> 6.022e23 <$d 0 $e true> realtype print `\n' print flush 6e+23 onyx:0> 6.022e23 <$d 4 $w 40 $p `0'> realtype print `\n' print flush 00000000000602200000000000027262976.0000 onyx:0>
onyx:0> outputsdict begin onyx:0> `' regex onyx:1> <$w 30 $p `.' $j $c> regextype print `\n' print flush ...........-regex-............ onyx:0>
onyx:0> outputsdict begin onyx:0> `' `' regsub onyx:1> <$w 30 $p `.' $j $c> regsubtype print `\n' print flush ...........-regsub-........... onyx:0>
onyx:0> outputsdict begin onyx:0> (1 (2 3) 4) onyx:1> dup <$w 9 $p `_' $r 0> stacktype print `\n' print flush __-stack- onyx:1> <$w 9 $p `_' $r 1> stacktype print `\n' print flush (1 -stack- 4) onyx:0>
onyx:0> outputsdict begin onyx:0> `A string' onyx:1> <$w 30 $p `.' $j $c> stringtype print `\n' print flush ...........A string........... onyx:0>
onyx:0> outputsdict begin onyx:0> () {} thread onyx:1> <$w 30 $p `.' $j $c> threadtype print `\n' print flush ...........-thread-........... onyx:0>