f* written by James Greene on February 2, 2002 f* TRIPLEJ Inc. f* TRIPLEJ46@hotmail.com f* 920-757-5089 f* N433 Foxwood Drive f* Appleton, WI 54914 f********************************************************* f* program lists all 256 possible binary values for a character f********************************************************* fqsysprt o f 132 printer d ds inz d bin 1 2b 0 d biny 1 2 d binary s 1 dim(256) d makeup s 8 dim(256) d binx s 1 d w s 3 0 d x s 3 0 d y s 3 0 d z s 3 0 d wm1 s 3 0 d xm1 s 3 0 d ym1 s 3 0 d zm1 s 3 0 c except header c eval bin = *zero c do 256 x c move biny binx c testb '0' binx 20 c testb '1' binx 21 c testb '2' binx 22 c testb '3' binx 23 c testb '4' binx 24 c testb '5' binx 25 c testb '6' binx 26 c testb '7' binx 27 c eval binary(x) = binx c eval makeup(x) = '00000000' c if *in20 c eval %subst(makeup(x):1:1) = '1' c endif c if *in21 c eval %subst(makeup(x):2:1) = '1' c endif c if *in22 c eval %subst(makeup(x):3:1) = '1' c endif c if *in23 c eval %subst(makeup(x):4:1) = '1' c endif c if *in24 c eval %subst(makeup(x):5:1) = '1' c endif c if *in25 c eval %subst(makeup(x):6:1) = '1' c endif c if *in26 c eval %subst(makeup(x):7:1) = '1' c endif c if *in27 c eval %subst(makeup(x):8:1) = '1' c endif c eval bin = x C enddo c dou w = 64 c eval w = w + 1 c eval x = w + 64 c eval y = x + 64 c eval z = y + 64 c eval wm1 = w - 1 c eval xm1 = x - 1 c eval ym1 = y - 1 c eval zm1 = z - 1 c except detail c enddo c eval *inlr = *on oqsysprt E header 1 o 12 'decimal' o 18 'value' o 26 'binary' o 42 'decimal' o 48 'value' o 56 'binary' o 72 'decimal' o 78 'value' o 86 'binary' o 102 'decimal' o 108 'value' o 116 'binary' oqsysprt E detail 1 o wm1 Z 10 o binary(w) 16 o makeup(w) 27 o xm1 Z 40 o binary(x) 46 o makeup(x) 57 o ym1 Z 70 o binary(y) 76 o makeup(y) 87 o zm1 Z 100 o binary(z) 106 o makeup(z) 117
================================== MORE INFORMATION ON THIS TOPIC ==================================
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
This was first published in April 2002