Shop OBEX P1 Docs P2 Docs Learn Events
lookup table for BS2 — Parallax Forums

lookup table for BS2

dbjdbj Posts: 75
edited 2007-03-22 22:44 in BASIC Stamp
· Could you do a lookup table that each time it receives a command to lookup a valid number it will use that number until the next number is received. Then the first number becomes invalid and the second number is used until the next code is entered, and when the last number in the lookup table is used it returns too the·first number in the table.
···················································· Thanks

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2007-03-22 13:11
    Yes. But you haven't given us enough detail to say more than that.

    The "LOOKUP" command sounds good for this.
  • dbjdbj Posts: 75
    edited 2007-03-22 22:44
    ·Well what·I would like to do would be a security lock that you could have a set of known codes and when you give out say the first code 1234 witch is the first in the lookup table, that code would·work the lock until the next code in the table was·entered, say 1342 then it would·cancel out the previous code and·work until the third code was entered, and·would run threw the lookup table and loop back to the·first code when the last one was entered. Some how you would have to set a flag so that the current code would be valid until the next code in the table is entered.
Sign In or Register to comment.