Shop OBEX P1 Docs P2 Docs Learn Events
How to copy an array — Parallax Forums

How to copy an array

TCTC Posts: 1,019
edited 2013-05-13 18:16 in Propeller 1
Hello All,

I need to find a way to copy an array.
@flag := @G_Cmd

I know there has to be a way. What I have is not allowed. Please help.
Thanks
TC

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-13 18:14
    Use BYTEMOVE, WORDMOVE, or LONGMOVE depending on the size of the array elements

    BYTEMOVE(@flag,@G_Cmd,15)

    This will move 15 bytes from the array G_Cmd to the array flag.
  • TCTC Posts: 1,019
    edited 2013-05-13 18:16
    Wonderful, Thank you. I knew there was an easy way to do it.
Sign In or Register to comment.