Getting the "," in the middle


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Steve_88 View Post
    untested and not thought out
    debug dec2 VA/10,",",dec1 VA//10,13,10
    The above post works fine...
    Here's another version of the same thing, again, documented in the PBP manual...
    va = 54321
    debug (va dig 5), "," , (va dig 4) , "," , (va dig 3) , "," , (va dig 2) , "," , (va dig 1) , "," , (va dig 0) ,13 , 10

    output would be
    5,4,3,2,1

    I'm sure you could modify the above to get what you want.

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Thanks Steve_88,skimask

    about the DIG command i wasn't using the () ... that's why it didn't worked

    cheers

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Hi all,

    i recently descovered a little bug in my code.

    The result value was working just fine and i was getting it in the xx,x format.
    This works well until i reach 99,9șC. After this i get the 4th digit in and the result ( instead of 110,5șC for example ) is 10,5șC .

    This is due to the way the code is handling the value and sending it out.

    Code:
    'code for AD
    adcin temp,va
    tempe=(va*/2500 )>>2
    
    'code to output value retrieved from eeprom
    debug dec2 RA/10,",",dec1 RA//10,13,10
    How can i get the "," in there with 3 digits but keeping it when it reaches the 4th ?


    EDIT:

    This is what i i'm thinking:
    Code:
    debug dec3 RA/10,",",dec1 RA//10,13,10
    Any idea ?
    Thanks
    Last edited by ruijc; - 30th March 2008 at 14:19.

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hello rujic
    Last edited by Acetronics2; - 30th March 2008 at 15:06. Reason: have to read before answering !!!
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. RB0 + Internal Pullup + Interrupt
    By Freman in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 10th August 2009, 11:11
  2. pins in arrays?
    By scorpion in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th September 2005, 08:18
  3. pic with 3.3v
    By mischl in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th July 2005, 18: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