Re: Append
- Posted by petelomax Sep 25, 2014
- 1686 views
buzzo said...
Need help understanding append
I have to suggest adding
with trace trace(1)
at the top of your program, or replace all those prints with ?pc like so:
object pc = {{},{}} ?pc -- {{},{}} pc[1] = "1234" ?pc -- {"1234",{}} pc[2] = "2345" ?pc -- {"1234","2345"} pc = append(pc,pc) ?pc -- {"1234","2345",{"1234","2345"}} pc[2][1] = "3456" ?pc -- {"1234",{"3456",51,52,53},{"1234","2345"}} -- aka {"1234",{"3456",'3','4','5'},{"1234","2345"}} pc[2][2] = "4567" ?pc -- {"1234",{"3456","4567",52,53},{"1234","2345"}} -- aka {"1234",{"3456","4567",'4','5'},{"1234","2345"}}
buzzo said...
pc = append(pc,pc)
I suspect the statement you really wanted there was
pc = {pc,pc}
but I cannot be entirely certain from the limited information given
HTH,
Pete