Using variable values within other variables (Language Help)

by Lockjaw, Tuesday, June 05, 2012, 17:53 (2746 days ago) @ Jim

That didn't quite work Jim, but it put me on the right path. Here's what I did (oh, and I lied - it's only an eight digit number):

wcheck = 11148470
t = float(wcheck)/10^8
dcsum = 0
for ddi = 1 to 7
dcsum = dcsum + t%10
t = t-(t%10)
if t>0 then
next ddi
print dcsum

Thanks for heading me in the right direction! I'd still like to find a way to use variable values as part of another variable though, like this:

for i=1 to 10
d(i) = i
next i

The end result I want is

d1 = 1
d2 = 2

Any way to do this?

Complete thread:

 RSS Feed of thread

powered by my little forum