
Code Conversion Algorithms
|
585
test results in true, then the variable adjust is assigned the value 1; otherwise, it is as-
signed the value . In this example, the variable
c2 is 191, which is not less than 159,
so the variable
adjust is assigned the value .
e variable 4.
rowOffset is initialized by testing a condition. is condition is whether
the value of the variable
c1 is less than 16. If its value is less than 16, rowOffset is
initialized to 112. Otherwise, it is initialized to 176. Because
c1 is less than 16 in the
example,
rowOffset is initialized to 112.
e variable 5.
cellOffset is initialized by testing one or more conditions. e rst
condition is whether the variable
adjust is equal to 1. If this rst condition is not
met, the variable
cellOffset is initialized to 126. If this rst condition is met, another
condition is tested. If the variable
c2 is greater than 127, cellOffset will be initialized
to 32, and to 31 otherwise. Because
c1 is not equal to 1 in the example, cellOffset is
initialized to 126.
e object to which 6.
*p1 points is assigned the value of subtracting rowOffset from c1
(138 − 112 = 26), performing a le-shi, which is equivalent to multiplying a number
by two (26 × 2 = 52), then nally subtracting
adjust (52 − = 52).
e object to which 7.
*p2 points is assigned the value of subtracting cellOffset from
itself (191 − 126 = 65).
In addition,