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

Function EXP_SSHORT_ordinal

src/gpre/exp.cpp:447–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445//
446
447SSHORT EXP_SSHORT_ordinal(bool advance_flag)
448{
449 const bool negate = (MSC_match(KW_MINUS));
450
451 if (gpreGlob.token_global.tok_type != tok_number)
452 CPR_s_error("<number>");
453
454 const SLONG n = atoi(gpreGlob.token_global.tok_string);
455 if (negate && n > -1L * MIN_SSHORT)
456 PAR_error("Numeric value out of range");
457 else if (!negate && n > (SLONG) MAX_SSHORT)
458 PAR_error("Numeric value out of range");
459
460 if (advance_flag)
461 PAR_get_token();
462
463 return (SSHORT) (negate ? -n : n);
464}
465
466
467//____________________________________________________________

Callers 5

EXP_castFunction · 0.85
SQL_par_field_dtypeFunction · 0.85
act_declare_filterFunction · 0.85
par_arrayFunction · 0.85
PAR_blob_subtypeFunction · 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