Shop OBEX P1 Docs P2 Docs Learn Events
Can you Declare a 2 Byte Variable in Pbasic — Parallax Forums

Can you Declare a 2 Byte Variable in Pbasic

GuidoGuido Posts: 195
edited 2007-12-16 16:31 in BASIC Stamp
Is it possible to Declare a 2 Byte Variable in Pbasic?

Example:

Temp······Variable······ Byte(2)

Thank You
Guido

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-12-16 15:01

    Temp· VAR· Word
    makes a 2-byte variable

    Temp· VAR· Byte(2)
    makes an array with two byte elements

    rhino·· VAR···· Word·············' A 16-bit variable
    head··· VAR···· rhino.HIGHBYTE···' Higher 8 bits of rhino
    tail··· VAR···· rhino.LOWBYTE··· ' Lower 8 bits of rhino


    Post Edited (PJ Allen) : 12/16/2007 3:08:51 PM GMT
  • GuidoGuido Posts: 195
    edited 2007-12-16 16:31
    Thanks PJ That's exacatly what I meant!!!
Sign In or Register to comment.