ICE self-referential array building, without a loop?

55 views
Skip to first unread message

Alan Fregtman

unread,
Jul 19, 2012, 1:17:57 PM7/19/12
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

Stephen Blair

unread,
Jul 19, 2012, 1:22:55 PM7/19/12
to soft...@listproc.autodesk.com
Those are powers of 10, so plug an Build Index Array into an Exponent node and ...
winmail.dat

Alan Fregtman

unread,
Jul 19, 2012, 1:29:57 PM7/19/12
to soft...@listproc.autodesk.com
Ahhhh! Completely forgot about the Exponent node. Thanks Stephen!

Grahame Fuller

unread,
Jul 19, 2012, 1:30:40 PM7/19/12
to soft...@listproc.autodesk.com
Get Array Sub Indices > Integer to Scalar > Exponent (Base = 10)

gray

-----Original Message-----
From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] 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?

winmail.dat
Reply all
Reply to author
Forward
0 new messages