array and highbyte lowbyte


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79

    Default array and highbyte lowbyte

    Hello,
    Question that I cannot find an answer for. If I have an array like this.

    Memory VAR WORD[7]

    B0 VAR BYTE
    B1 VAR BYTE

    And I want to take 1 element out and break it into 2 byte what is the proper syntex.

    This
    B0 = Memory[1.highbyte]
    B1 = Memory[1.lowbyte]

    Or This

    B0 = Memory.highbyte[1]
    B1 = Memory.lowbyte[1]

    both examples compile

    Thanks
    Shawn

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    http://www.picbasic.co.uk/forum/cont...rds-and-Arrays

    You do realize that "Memory VAR WORD[7]" has 14 BYTES?
    So are you really wanting to take a WORD VAR, non array, and splitting it into two BYTES?
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts