April 20, 2024, 07:40:21 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Moving array details

Started by Andy, January 25, 2021, 01:33:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

If I have a UDT like this:

type Undos2
     int Pos[1000]
     int PosBK[1000]
     int PosAK[1000]
     int PosEK[1000]
     int LineNo[1000]
     int Offset[1000]
     string Typed[1000]
     string Was[1000]
     int Colour[1000]
     int Press[1000]
     int Length[1000]
     int DeleteLine[1000]
     int NewLine[1000]
     int FirstVis[1000]
endtype
def Undo2[MaxTabs]as Undos2

and I want to copy Undo2[1] to Undo2[2], is there a way to do this quickly without having to write lots of lines of code?

e.g. something like copyarray(Undo2[1],Undo2[2]) ?

Just wondering about it as I can now move tabs around and I need to copy my undo / redo details.

Thanks,
Andy.

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

Looks like I forgot something simple here, it was in testing as simple as

Undo[1] = Undo[2]

Or have I got that wrong?

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.