Shop OBEX P1 Docs P2 Docs Learn Events
Genius Needed! — Parallax Forums

Genius Needed!

idbruceidbruce Posts: 6,197
edited 2011-01-12 21:53 in Propeller 1
llllllllllllllllllllllllllllll

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-01-11 19:48
    Bruce,

    From my looking at it, I agree things don't seem to add up.

    Debugging suggestion..

    Ad the pst (parallax serial terminal object) and see what FirstDigitMonth actually looks like with a

    pst.dec(FirstDigitMonth)
    pst.newline

    between your input and if statement.

    OBC


    .
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-01-11 19:53
    You should use IF FirstDigitMonth <> 13 AND FirstDigitMonth <> 0
  • idbruceidbruce Posts: 6,197
    edited 2011-01-11 19:53
    Oldbitcollector

    I wish I could, but the prop and keypad are mounted on my machine and away from the computer. I am doing uploads with a portable device using PropellerLoader.

    Bruce
  • David BetzDavid Betz Posts: 14,519
    edited 2011-01-11 19:53
    I think you want AND not OR. You only want to execute the body of the IF if FirstDigitMonth is neither 13 nor 0. In fact, your IF statement is always true since any value is either not 13 or not 0.
  • RossHRossH Posts: 5,549
    edited 2011-01-11 19:55
    The expression "FirstDigitMonth <> 13 OR FirstDigitMonth <> 0" evaluates to true for any given number.

    Ross.

    EDIT: David, you beat me to it!
  • idbruceidbruce Posts: 6,197
    edited 2011-01-11 19:58
    Thanks everyone for all the replies

    Okay I agree it should be an AND. My Bad.

    Bruce

    PS I will be back if that does not fix it :)
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-01-11 20:02
    Nice Didn't see that here... Would have driven me bat-nuts too. :)

    Good group of logic thinkers here.

    OBC
  • idbruceidbruce Posts: 6,197
    edited 2011-01-11 20:04
    Good Job Guys

    Thank you VERY much. That one would have had me going for a little while.

    Bruce
  • lardomlardom Posts: 1,659
    edited 2011-01-12 17:37
    OBC, Orrville. Sorry, I couldn't resist.
  • idbruceidbruce Posts: 6,197
    edited 2011-01-12 21:53
    :) Yep My bad
Sign In or Register to comment.