How to make a word as decimal in if then else statement


Closed Thread
Results 1 to 17 of 17

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Your question is not so clear ...

    so : could you post the line ( or snippet ) you try to write and which doesn't work or compile ???

    I think you try to test CHARACTERS in a string ... but can you confirm ?

    Alain
    ************************************************** ***********************
    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 " !!!
    *****************************************

  2. #2
    Join Date
    Jan 2011
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    Thanks for replying...

    Well. Thiis will work but reply's on LCD as a ASCII code:

    Code:
    Print at 2, 1, Temp ; Read temp from a dS1820
    and this will works to convert the ASCII code to a normal celcius:

    Code:
    Print at 2, 1, DEC Temp ; Read temp from a dS1820
    Now i want to do an if then else statement on the Temp var. If I only take this code:

    Code:
    IF Temp = ... THEN
    the Temp var will only reads the ASCII code, but I want the source to read the celcius in the if statement, and not the ASCII code...

    I hope this makes it clearer.

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


    Did you find this post helpful? Yes | No

    Default

    Are you sure you posted on the right forum ???

    I'm not ...

    Alain
    ************************************************** ***********************
    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 " !!!
    *****************************************

  4. #4
    Join Date
    Jan 2011
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    I am not sure... As I said... my english is not really good :P But if somebody can move it for me.. please

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jeroeni View Post
    I am not sure... As I said... my english is not really good :P But if somebody can move it for me.. please
    Are you using Pic Basic (PRO) ?
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Jan 2011
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    Yeah, I'm using the pro version.

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


    Did you find this post helpful? Yes | No

    Default

    Your lines look to be an uncontrolled mix of Basic and C languages ...

    So, it will be rather difficult to help you ...

    BTW "Jeroen" ... that reminds me something...
    what's your mother language ???

    I'd bet Dutch ...

    Alain
    ************************************************** ***********************
    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 " !!!
    *****************************************

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