Re: Append

new topic     » goto parent     » topic index » view thread      » older message » newer message
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 blink

HTH,
Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu