Can PBP understand negative numbers?


Closed Thread
Results 1 to 4 of 4

Hybrid View

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


    Did you find this post helpful? Yes | No

    Smile - values (example)

    PumpMath = (Throttle - ThrottleMin) * 100 / RadioScalefactor

    if (PumpMath > 101) or (PumpMath < 0) then
    PumpMath=0
    endif

    if (CurrentStep + 1 < PumpMath) and (PumpMath < 100) Then
    IF (CurrentStep < PumpMath) Then
    CurrentStep = CurrentStep + 1
    EndIF

    IF (CurrentStep > PumpMath) Then
    CurrentStep = CurrentStep - 1
    EndIF
    endif

    if (CurrentStep - 1 > PumpMath) and (PumpMath >0) Then
    IF (CurrentStep < PumpMath) Then
    CurrentStep = CurrentStep + 1
    EndIF

    IF (CurrentStep > PumpMath) Then
    CurrentStep = CurrentStep - 1
    EndIF
    endif

  2. #2
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Smile

    THANKS! I think I figured it out!

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. Replies: 4
    Last Post: - 15th April 2009, 01:54
  3. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  4. Multiplying large numbers
    By jhonea1 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 14th April 2006, 17:41
  5. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30

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