Shop OBEX P1 Docs P2 Docs Learn Events
absurd issue — Parallax Forums

absurd issue

lenny1337lenny1337 Posts: 26
edited 2008-02-25 23:54 in Propeller 1
heres a new one

· if i == ((toR - fromR)/snap)
······· j++
······· Range[noparse][[/noparse]j-1]· := ping[noparse][[/noparse]1].centimeters(FPING_PIN)········· ' Get Range In centimeters
······· PC_Text.dec(Range[noparse][[/noparse]j-1])················'normal output'
······· PC_Text.out($0D)
······· if (Range[noparse][[/noparse]j-1] <= buffer)
·········· frontobs := (Range[noparse][[/noparse]j-1])
·········· PC_Text.dec(Range[noparse][[/noparse]j-1])··········· '255 output'
·········· PC_Text.out($0D)
······· i~
······· j~


my output is normal, normal, normal, then when range[noparse][[/noparse]j-1] <= buffer, output becomes 255, 255,255, 255, 255, 255, 255, 255, 255, 255 - range is obviously a byte...but what's going on?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lenny Bogdanov
Systems Concept Center

Comments

  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-02-25 05:56
    That is probably because '<=' is an assignment operator. Did you mean to use '=<' which is the less than or equal to operator? smile.gif
  • lenny1337lenny1337 Posts: 26
    edited 2008-02-25 07:20
    oops.

    dammit.

    i missed it every time.

    thank you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lenny Bogdanov
    Systems Concept Center

    Post Edited (lenny1337) : 2/25/2008 7:25:58 AM GMT
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-25 08:59
    Just BTW: Why do you increment "J" and use "J-1" all the time later?
  • simonlsimonl Posts: 866
    edited 2008-02-25 19:13
    Probably because he's doing the j++ at the beginning? If it was at the end it wouldn't be necessary. (I think!)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • simonlsimonl Posts: 866
    edited 2008-02-25 19:15
    OT: That's strange - how come deSilva's post has a timestamp of "Posted Today 12:59 AM (GMT -8)" and mine says "Posted Today 11:13 AM (GMT -8)" !?! (Unless I've got PropII and used it to invent time travel? MWAH HA HA HA! LOL)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • dfletchdfletch Posts: 165
    edited 2008-02-25 19:34
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif

    Maybe that's not such a hot idea tongue.gif

    Look closer at those times you said were weird.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Join us in the Un-Official Propeller IRC channel: irc.freenode.net #propeller
    Newbies, oldies, programmers, math professors, and everyone in-between welcome!
    Propeller IRC howto
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-25 23:54
    In Europe we do not call it 12:59 AM but 0:59 which would make it more obvious smile.gif
Sign In or Register to comment.