Math problem


Results 1 to 8 of 8

Thread: Math problem

Threaded View

  1. #4
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102


    Did you find this post helpful? Yes | No

    Default

    I changed the code to

    Code:
    	Second_First = Second_Value - First_Value
    
    
    	IF Second_First.15=1 THEN
    		Difference_First_Second = First - Second
            	Difference_Third_Second = Third - Second
        	ELSE
    		Difference_First_Second = Second - First
            	Difference_Third_Second = Second - Third
        	ENDIF
    
    Result:
    
    			Is	Should
    First			1386	1386
    Second			771	771
    Third			882	882
    Point_One		449	449
    Point_Two		1663	1663
    Steps_First_Second	3	380
    Steps_Third_Second	14	68
    Calculation: Value stored by WRITE:

    Value1 Value2
    Byte0 Byte1

    Value(Like First, Second etc.) = Byte1*256 + Byte0
    Last edited by selbstdual; - 18th February 2007 at 20:20.

Similar Threads

  1. Line Graph, math problem...
    By TerdRatchett in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th May 2009, 04:20
  2. Math problem with string result
    By Lotondo in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 15th November 2006, 10:06
  3. PicBasic Pro Math Problem??
    By Glen65 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th March 2006, 04:36
  4. Math Formula / Variable Problem! Help!
    By bwarp in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th February 2006, 07:59
  5. Math problem...with picbasic pro
    By pcaccia in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th October 2005, 19:28

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