Share this page

# Example: strtol

The following example converts the first number it reads in string, str, to a long integer. It reads the rest of the string into end_string.

        #include <string.h>
        long l;
        char * end_string, * str = "-569357608END HERE";
        l = strtol(str, &end_string, 10);
        lr_output_message ("long=%ld followed by %s", l, end_string);

    Example: Output:
    Action.c(11): long=-569357608 followed by END HERE

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: