Shop OBEX P1 Docs P2 Docs Learn Events
Look Up Table — Parallax Forums

Look Up Table

ArchiverArchiver Posts: 46,084
edited 2001-02-25 19:46 in General Discussion
I using a Stamp in an application where I need a big look up table.· I am using the "Lookup" instruction to make the table but table is much to big to fit onto one line.· Is there a way that you can continue an instruction onto multiple lines?

Thanks,

Justin

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-02-25 19:46
    [font=arial,helvetica]In a message dated 2/25/01 1:21:38 PM Central Standard Time,
    jlafolle@htonline.com writes:


    I using a Stamp in an application where I need a big look up table. ·I am
    using the "Lookup" instruction to make the table but table is much to big
    to fit onto one line. ·Is there a way that you can continue an instruction
    onto multiple lines?



    From an efficiency standpoint, it may be easier to embed your table in DATA
    statements and then use READ to grab data from the table. ·The Stamp 2 is
    neat in that DATA statements can be addressed with offsets.

    Define your table(s) like this

    Table1 ··DATA ···1, 15, 37, 45
    Table2 ··DATA ···14, 22, 6, 99

    Then you can do this....

    READ (Table1 + 3), x ···········' x = 45
    READ (Table2 + 2), y ···········' y = 6
    READ (Table1 + 6), z ···········' z = 6


    -- Jon Williams
    -- Dallas, TX



    [/font]
Sign In or Register to comment.