Get Array Sub Indices > Integer to Scalar > Exponent (Base = 10)

gray

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Alan Fregtman
Sent: Thursday, July 19, 2012 01:18 PM
To: XSI Mailing List
Subject: ICE self-referential array building, without a loop?

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

<<attachment: winmail.dat>>

Reply via email to