Hi Tony, Not entirely sure what you're referring to when you talk about a OneDDualArrayTblValue - i.e. what's the context? This is not a table (in the SKILL sense), it's a list of lists. You could insert the value something like this: data='((("width") ((0.0 0.0) ) ) ( 0.01 ((0.01 0.02) ) 0.02 ((0.02 0.03) ) 0.04 ((0.05 0.06) ) 0.05 ((0.06 0.07) (0.07 0.07) ) 0.06 ((0.04 0.02) ) 0.07 ((0.03 0.02) (0.06 0.04) ) 0.08 ((0.02 0.02) ) ) ) newRow='(0.03 ((0.02 0.04) (0.05 0.05) ) ) tableList=cadr(data) position=0 rplacd(data foreach(mapcan elem tableList if(evenp(position++) && newRow && elem>car(newRow) then prog1( append1(newRow elem) newRow=nil ) else list(elem) ) ) ) This is a bit clunky - the mapcan is just a way of iterating over the original list and either keeping the original value, or splicing in the new "row". I'm then using rplacd to insert it in place. Regards, Andrew.
↧