rajitha_nair01 wrote:i dont have a screen shot for the same
Good, since you ought not to waste space with screen shots, but rather copy and paste from your emulator, enclosing the text so added in Code tags.
since i am not able to run this code can you pls explain what are we doig here:
COMPUTE WS-DIVISOR = WS-RESULT * 10 ** WS-E-DIGITS +
Note also the two previous lines from Mr. Sample's code:
COMPUTE WS-E-NUM = FUNCTION NUMVAL (WS-E) .
COMPUTE WS-E-DIGITS = FUNCTION LOG10 (WS-E-NUM) .
After validating the variable left from the prior (fourth) division, the number of digits in that result, less one, is gotten by the LOG10 function. The result of that division is multiplied by 10^(# of digits
- 1) (effectively moving it left that many positions) and the remaining digits are added (i.e.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day