| 419 | // |
| 420 | |
| 421 | SLONG EXP_SLONG_ordinal(bool advance_flag) |
| 422 | { |
| 423 | const bool negate = (MSC_match(KW_MINUS)); |
| 424 | |
| 425 | if (gpreGlob.token_global.tok_type != tok_number) |
| 426 | CPR_s_error("<number>"); |
| 427 | |
| 428 | const SLONG n = atoi(gpreGlob.token_global.tok_string); |
| 429 | char buffer[32]; |
| 430 | sprintf(buffer, "%" SLONGFORMAT, n); |
| 431 | if (strcmp(buffer, gpreGlob.token_global.tok_string) != 0) |
| 432 | PAR_error("Numeric value out of range"); |
| 433 | |
| 434 | if (advance_flag) |
| 435 | PAR_get_token(); |
| 436 | |
| 437 | return negate ? -n : n; |
| 438 | } |
| 439 | |
| 440 | |
| 441 | //____________________________________________________________ |
no test coverage detected