Shop OBEX P1 Docs P2 Docs Learn Events
simple syntax question — Parallax Forums

simple syntax question

nick bernardnick bernard Posts: 329
edited 2005-08-09 17:50 in General Discussion
is this legit?
lookup temp1, "0123456789ABCDEF",temp1

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If I lived back in the wild west days, instead of carrying a six-gun in my holster, I'd carry a soldering iron. That way, if some smart-aleck cowboy said something like "Hey, look. He's carrying a soldering iron!" and started laughing, and everybody else started laughing, I could just say, "That's right, it's a soldering iron. The soldering iron of justice." Then everybody would get real quiet and ashamed, because they had made fun of the soldering iron of justice, and I could probably hit them up for a free drink. - Jack Handy

Comments

  • BeanBean Posts: 8,129
    edited 2005-08-05 19:57
    Hmmm, I don't think so.
    I think you'll have to use,
    LOOKUP temp1, "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F",temp1

    If you mean is it okay to have the same variable 1st and last... Yes that is okay.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    Product web site: www.sxvm.com

    "One experiment is worth a thousand theories"
    ·
  • nick bernardnick bernard Posts: 329
    edited 2005-08-05 19:59
    you're right been, i had to change my table. thanks man

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If I lived back in the wild west days, instead of carrying a six-gun in my holster, I'd carry a soldering iron. That way, if some smart-aleck cowboy said something like "Hey, look. He's carrying a soldering iron!" and started laughing, and everybody else started laughing, I could just say, "That's right, it's a soldering iron. The soldering iron of justice." Then everybody would get real quiet and ashamed, because they had made fun of the soldering iron of justice, and I could probably hit them up for a free drink. - Jack Handy
  • BeanBean Posts: 8,129
    edited 2005-08-05 20:02
    Nick, LOVE the pic by the way.
    Talk about deer in the headlights look.
    I bet "The Odd One" really fits [noparse];)[/noparse]
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    Product web site: www.sxvm.com

    "One experiment is worth a thousand theories"
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-05 21:21
    Nick,

    Here's another approach -- the one I tend to use:

    HexVals: 
      DATA "01234567890ABCDEF" 
    
    ... 
     
    
      READ HexVals + temp1, temp1
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • nick bernardnick bernard Posts: 329
    edited 2005-08-09 17:00
    both approaches read from the eeprom right?
    how many bytes can i fit in the eeprom for a lookup table?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If I lived back in the wild west days, instead of carrying a six-gun in my holster, I'd carry a soldering iron. That way, if some smart-aleck cowboy said something like "Hey, look. He's carrying a soldering iron!" and started laughing, and everybody else started laughing, I could just say, "That's right, it's a soldering iron. The soldering iron of justice." Then everybody would get real quiet and ashamed, because they had made fun of the soldering iron of justice, and I could probably hit them up for a free drink. - Jack Handy
  • BeanBean Posts: 8,129
    edited 2005-08-09 17:04
    Nick,
    Jon's method is more memory effiecent(sp). You can store 2K values for the SX28 and 4K values for the SX48/52.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    Product web site: www.sxvm.com

    "One experiment is worth a thousand theories"
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-09 17:25
    Bean (Hitt Consulting) said...
    Nick,
    Jon's method is more memory effiecent(sp). You can store 2K values for the SX28 and 4K values for the SX48/52.
    Bean.
    Bean,

    ·· That is of course, assuming you don't use any program space!· =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • nick bernardnick bernard Posts: 329
    edited 2005-08-09 17:50
    thanks guys!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If I lived back in the wild west days, instead of carrying a six-gun in my holster, I'd carry a soldering iron. That way, if some smart-aleck cowboy said something like "Hey, look. He's carrying a soldering iron!" and started laughing, and everybody else started laughing, I could just say, "That's right, it's a soldering iron. The soldering iron of justice." Then everybody would get real quiet and ashamed, because they had made fun of the soldering iron of justice, and I could probably hit them up for a free drink. - Jack Handy
Sign In or Register to comment.