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

CX51 strtoul library routine

CX51 not support strtoul library routine !

unsigned long x;
unsigned char c[]="12345678"

x = strtoul (c,NULL,10);

returned zero ?

Parents
  • If you select device P89C669 or other
    MX , this code not working (return FF..),
    If select no MX device working correctly !!

    #include <REG51M.H>
    #include <string.h>
    #include <stdlib.h>

    void main (void)
    {
    unsigned long v;

    unsigned char x[]="12345678";

    while (1)
    {
    v=strtoul("1234",NULL,10);
    }
    }

Reply
  • If you select device P89C669 or other
    MX , this code not working (return FF..),
    If select no MX device working correctly !!

    #include <REG51M.H>
    #include <string.h>
    #include <stdlib.h>

    void main (void)
    {
    unsigned long v;

    unsigned char x[]="12345678";

    while (1)
    {
    v=strtoul("1234",NULL,10);
    }
    }

Children
No data