GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing man.openbsd.org — strtonum(3) - OpenBSD manual pages NAME
SYNOPSIS
long long
DESCRIPTIONThe
The string may begin with an arbitrary amount of whitespace (as
determined by isspace(3)) followed by a single optional
‘ The remainder of the string is converted to a long long value according to base 10. The value obtained is then checked against the
provided minval and maxval
bounds. If errstr is non-null,
RETURN VALUESThe EXAMPLESUsing int iterations; const char *errstr; iterations = strtonum(optarg, 1, 64, &errstr); if (errstr != NULL) errx(1, "number of iterations is %s: %s", errstr, optarg); The above example will guarantee that the value of iterations is between 1 and 64 (inclusive). ERRORS
If an error occurs, errstr will be set to one of the following strings:
SEE ALSOatof(3), atoi(3), atol(3), atoll(3), sscanf(3), strtod(3), strtol(3), strtoul(3) STANDARDS
HISTORYThe |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |