Shop OBEX P1 Docs P2 Docs Learn Events
lookup,lookdown def error — Parallax Forums

lookup,lookdown def error

El PaisaEl Paisa Posts: 375
edited 2006-05-20 23:47 in Propeller 1
I think there is an error in the definition of LOOKUP/Z and LOOKDOWN/Z.
The examples (monitor.spin) shown one way but·Propeller Manual Preliminary Draft v0.4·, Page 4-89 shows another.
Which is correct?

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-20 12:57
    There is a typo in the docs·-- this:·
    · index := lookdown(value, 25, 300, 2_510, 163, 17, 8_000, 3)
    should be:
    · index := lookdown(value : 25, 300, 2_510, 163, 17, 8_000, 3)
    A colon follows the search value, not a comma.· Please note for future reference that what you find in our actual·program examples is probably correct as we have run those programs.· And in this case, the keyword definition describes the syntax correctly, the error was introduced by typing a simple example in the text of the document.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Stan671Stan671 Posts: 103
    edited 2006-05-20 23:47
    Similarly on page 4-91, the example should read:

    Temp := lookup(Index : 25, 300, 2_510, 163, 17, 8_000, 3)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Stan Dobrowski
Sign In or Register to comment.