Skip to main content
agilandeswari
Visitor II
September 7, 2015
Question

how to use 64 bit data type in stm8s003

  • September 7, 2015
  • 2 replies
  • 2411 views
Posted on September 07, 2015 at 12:00

how to use 64 bit data type in stm8s003f3? if i use unsigned long long its not takeing and giving error.

#st
    This topic has been closed for replies.

    2 replies

    luca239955_stm1_st
    Associate
    September 7, 2015
    Posted on September 07, 2015 at 12:22

    which compiler?

    If it's Cosmic, the long long (64 bits) datatype is not implemented for the STM8, since it would be very heavy for such a small core to handle such a large datatype.

    Regards.

    Philipp Krause
    Senior II
    September 9, 2015
    Posted on September 09, 2015 at 19:03

    64-bit integers were introduced in the ISO C99 standard, which, as far as I know, is supported by SDCC and IAR C, but not the other compilers.

    In C99 on STM8 you can use long long, unsigned long long, uint16_t int64_t, uint_fast64_t, uint_least64_t, int_fast64_t, int_least64_t.

    Philipp