Using variable values within other variables (Language Help)
Sorry it took a few days to respond.
Under UBUNTU/LINUX the code works just as you like it. As an old programmer I do not trust the modulo operator if either side is a floating point. :) I guess there could be a rounding or floating point problem.
I would implement this as a string of digits so there would be no way of getting all "floaty" on us.
# wcheck = 44444444
# wcheck$ = string(wcheck) # different variable - same name almost but a string
wcheck$ = "21312312312345342341234324"
dcsum = 0
for i = 1 to length(wcheck$)
dcsum = dcsum + int(mid(wcheck$,i,1))
- Using variable values within other variables - Lockjaw, 2012-06-04, 23:52
- Using variable values within other variables - Jim, 2012-06-05, 15:38