Advanced Arrays


Closed Thread
Results 1 to 3 of 3

Thread: Advanced Arrays

  1. #1
    Join Date
    May 2009
    Location
    USA
    Posts
    16

    Default Advanced Arrays

    I'm a bit confused about arrays, I'm trying to initialize an array at runtime from saved EEPROM data, but I don't really understand how to edit what I need.

    Code:
    Users		var word[10]
    Here is my array of users, but PBP won't let me
    Code:
    Users[10].bit0 = 0 (syntax not supported)
    However
    Code:
    Users.bit0 = 0
    compiles fine. And
    Code:
    Users.byte3 = 0
    does not. Is there any easy way I can access each byte of the Users array within a for loop? If all else fails I could rewrite it using this http://www.picbasic.co.uk/forum/showthread.php?t=2444 but It'd be nice to see what the compiler is up to
    Why is the email address verification case sensitive?

  2. #2
    Join Date
    May 2009
    Location
    USA
    Posts
    16


    Did you find this post helpful? Yes | No

    Default

    It seems that everything is explained here and google is a much better search engine than vBulletin apparently

    http://www.picbasic.co.uk/forum/showthread.php?t=544

    Code:
    For i = 0 to 19
    	read i, Users.Lowbyte(i)
    Next i
    Compiles without a problem, I'm hoping that this will load the first 20 EEPROM bytes into the 10 words I have, correct?
    Last edited by GoldStar; - 16th May 2009 at 07:03.
    Why is the email address verification case sensitive?

  3. #3
    sinoteq's Avatar
    sinoteq Guest


    Did you find this post helpful? Yes | No

    Default Faq

    Hi
    If you dig deep enough in the FAQ section by selecting "Show all threads from the beginning" you will find a Melanie artwork called Bits, Bytes Words and Arrays. Or you click here http://www.picbasic.co.uk/forum/showthread.php?t=544

    This will give you all the answers you'll need for accessing an array and other neat tricks that will come in handy later in life.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Beginner trying to use arrays
    By captain in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 3rd November 2007, 07:20
  3. SerOut and Arrays
    By shawn in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th July 2005, 17:32
  4. word arrays and eeprom
    By Acetronics2 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 9th January 2005, 07:36
  5. storing arrays and reading arrays
    By Yue in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 5th March 2004, 22:03

Members who have read this thread : 1

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