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

Function evlAsciiChar

src/jrd/SysFunction.cpp:2125–2144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2123
2124
2125dsc* evlAsciiChar(thread_db* tdbb, const SysFunction*, const NestValueArray& args,
2126 impure_value* impure)
2127{
2128 fb_assert(args.getCount() == 1);
2129
2130 Request* request = tdbb->getRequest();
2131
2132 const dsc* value = EVL_expr(tdbb, request, args[0]);
2133 if (request->req_flags & req_null) // return NULL if value is NULL
2134 return NULL;
2135
2136 const SLONG code = MOV_get_long(tdbb, value, 0);
2137 if (!(code >= 0 && code <= 255))
2138 status_exception::raise(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range));
2139
2140 impure->vlu_misc.vlu_uchar = (UCHAR) code;
2141 impure->vlu_desc.makeText(1, ttype_none, &impure->vlu_misc.vlu_uchar);
2142
2143 return &impure->vlu_desc;
2144}
2145
2146
2147dsc* evlAsciiVal(thread_db* tdbb, const SysFunction*, const NestValueArray& args,

Callers

nothing calls this directly

Calls 7

EVL_exprFunction · 0.85
MOV_get_longFunction · 0.85
raiseFunction · 0.85
GdsClass · 0.85
makeTextMethod · 0.80
getCountMethod · 0.45
getRequestMethod · 0.45

Tested by

no test coverage detected