Alan Fregtman
unread,Jul 19, 2012, 1:17:57 PM7/19/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to XSI Mailing List
Hey guys,
At the risk of looking stupid, I'm wondering if anyone knows a cool
way of procedurally generating an array from a given length that
results in:
#0: 1
#1: 10
#2: 100
#3: 1000
#4: 10000
#5: ...
and so on.
The reason I used the term "self-referential" is because with a
repeat/while loop I can generate easily with an "algorithm"
referencing the previous item in its own array, like so:
10*(#0)=(#1) = 10*1=10
10*(#1)=(#2) = 10*10=100
10*(#2)=(#3) = 10*100=1000
10*(#3)=(#4) = 10*1000=10000
I suppose it could also be called "recursive", somewhat.
Seems to me there must be a simpler way to do this without a loop,
right? Maybe more coffee is the answer...
Any clues appreciated.
Cheers,
-- Alan