IF question.


Closed Thread
Results 1 to 6 of 6

Thread: IF question.

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Look hard at your logic.

    IF PinZero = 0 then Out1 When this is true, you never make it to the 2nd comparison
    since Out1 returns you right back to Loop.

    If this evaluates as false, then the 2nd comparison will be checked, but then it will always
    be false, because PinZero has to be 1 to fall-through to the next comparison.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2
    Join Date
    Jan 2005
    Location
    Puerto Rico
    Posts
    133


    Did you find this post helpful? Yes | No

    Thumbs up

    code Example:

    if (ThrottleUp=1) then
    if (ThrottleDn=1) then
    if (TrimOK=2) then
    if (AutoRun=1) then
    GoSub EnablePump 'Set required PWM/Timer2 registers
    GoSub EnableGlow
    PumpMath=0
    RunStatus =0
    Evt1 = 0
    goto AutoStart
    endif
    endif
    endif
    endif
    My Hobbies is PicBasic PRO

Similar Threads

  1. ADCIN question
    By Greg McFadden in forum General
    Replies: 4
    Last Post: - 16th September 2008, 03:53
  2. AN Question for "word" variable read The serial port
    By redfoen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th December 2007, 18:39
  3. Remote PIC input question
    By Adrian in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st September 2007, 16:44
  4. Question for a math guru
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 22nd November 2006, 10:45
  5. Please answer my first question
    By John_001 in forum Off Topic
    Replies: 1
    Last Post: - 15th September 2006, 07:49

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts