MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / EXP_SLONG_ordinal

Function EXP_SLONG_ordinal

src/gpre/exp.cpp:421–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419//
420
421SLONG 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//____________________________________________________________

Callers 1

act_set_generatorFunction · 0.85

Calls 4

MSC_matchFunction · 0.85
CPR_s_errorFunction · 0.85
PAR_get_tokenFunction · 0.85
PAR_errorFunction · 0.70

Tested by

no test coverage detected