Shop OBEX P1 Docs P2 Docs Learn Events
What does ## mean in P2 spin? — Parallax Forums

What does ## mean in P2 spin?

I have a simple question…what does ## mean in P2 spin language? In P1, we had a # that meant something like an actual value, and not an address…Ex add Time, #9 would add the value 9 to the variable Time, but I don’t’ remember seeing a ## with the P1.

Comments

  • whickerwhicker Posts: 749
    edited 2020-12-30 22:31
    Since you don't remember seeing it on the P1, you might understand the limitation of #, that being it can only range in value from 0-511.

    Using ## means to insert an additional instruction to allow use of a 32-bit immediate number, instead of 9-bit immediate.
  • Perfect...thank you.

    It has been awhile since I have done P1 programming, so I have a lot of 'rust' to knock off and new instructions to learn with the P2.
Sign In or Register to comment.