This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

64 Bits integer numbers

How can we manage a 64 bits integer
number to convert it to ASCCII value for LCD display.

Does SPRINTF work with 'double' data type

reguards.

Parents
  • Does SPRINTF work with 'double' data type

    Please read the manual! (jst clik on SPRINTF in your code & press F1!)

    No, because C51 does not have a 'double' data type!

    But do you really need it in an arithmetic data type?
    ie, do you actually need to do any maths with it?
    If it's just an ID number, presumably not; so why not just store it as a string?

    As you're comtemplating sprintf, I assume you're not tight on space?
    But if you are, could you store it in a BCD format; 2 decimal digits to each byte?

Reply
  • Does SPRINTF work with 'double' data type

    Please read the manual! (jst clik on SPRINTF in your code & press F1!)

    No, because C51 does not have a 'double' data type!

    But do you really need it in an arithmetic data type?
    ie, do you actually need to do any maths with it?
    If it's just an ID number, presumably not; so why not just store it as a string?

    As you're comtemplating sprintf, I assume you're not tight on space?
    But if you are, could you store it in a BCD format; 2 decimal digits to each byte?

Children