PDA

View Full Version : substracting arrays?


proteus2002
04-04-2005, 08:33 PM
i guess this is an easy question but i am stuck on this

lets say you have two arrays like
array1 = #(1,2,3,4,5,6)
array2 = #(2,3,4)

how can i substract array2 from array1 to get this
newarray = #(1,5,6)

greetings proteus

ofer_z
04-04-2005, 08:37 PM
i guess this is an easy question but i am stuck on this

lets say you have two arrays like
array1 = #(1,2,3,4,5,6)
array2 = #(2,3,4)

how can i substract array2 from array1 to get this
newarray = #(1,5,6)

greetings proteus

if you need the subtractoin only for simple arrays of numbers you can use this:

( (array1 as bitArray) - (array2 as bitArray) ) as array



hOpe this helps,
o

proteus2002
04-04-2005, 08:38 PM
thanks for the fast reply
incredible fast
thanks will check it out

CGTalk Moderation
04-04-2005, 08:38 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.