Shop OBEX P1 Docs P2 Docs Learn Events
quick array question — Parallax Forums

quick array question

eagletalontimeagletalontim Posts: 1,399
edited 2009-01-24 19:30 in General Discussion
If I set :

temparray VAR Byte(16)

Does that mean I have 17 places to store to or 15? I am guessing it is 15 since 0 is the beginning, hence 0 to 15 is 16 numbers

Comments

  • BeanBean Posts: 8,129
    edited 2009-01-24 19:11
    You have 16 elements numbered 0 thru 15.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ·The next time you need a hero don't look up in the sky...Look in the mirror.


    ·
  • eagletalontimeagletalontim Posts: 1,399
    edited 2009-01-24 19:12
    ok, thanks [noparse]:)[/noparse]
  • Mark HubersMark Hubers Posts: 19
    edited 2009-01-24 19:13
    I think both are wrong. It's 16. when setting space with the VAR command you getting the numbers of elements you stated. so VAR Byte(16) will give you 16 elements but start at 0 and end at 15.
  • Mark HubersMark Hubers Posts: 19
    edited 2009-01-24 19:16
    Bean bet me to it. [noparse];)[/noparse]
  • eagletalontimeagletalontim Posts: 1,399
    edited 2009-01-24 19:30
    another quick question off topic....sorry [noparse]:([/noparse]

    would this cause any conflicts?

    tmpW1 = 300 + values1(14)
    COUNT IRpulse, tmpW1, tmpW1
    temp1 = tmpW1_LSB
    



    I have an extremely intense coded program and I am limited to variables. I can only have one word variable after all other variables used.
Sign In or Register to comment.