Shop OBEX P1 Docs P2 Docs Learn Events
Using Pointers in Spin — Parallax Forums

Using Pointers in Spin

Mark SwannMark Swann Posts: 124
edited 2008-09-07 17:10 in Propeller 1
In a Spin function that recieves a pointer parameter, how do you use that pointer to access the memory it is pointing to?

Mark

Comments

  • TimmooreTimmoore Posts: 1,031
    edited 2008-09-07 16:41
    byte[noparse][[/noparse]ptr], word[noparse][[/noparse]ptr], long[noparse][[/noparse]ptr] references the memory as byte, word, long. byte[noparse][[/noparse]ptr+i] also works for indexing
  • Mark SwannMark Swann Posts: 124
    edited 2008-09-07 17:10
    Timmoore said...
    byte[noparse][[/noparse]ptr], word[noparse][[/noparse]ptr], long[noparse][[/noparse]ptr] references the memory as byte, word, long. byte[noparse][[/noparse]ptr+i] also works for indexing
    Thanks,

    Mark
Sign In or Register to comment.