| 2123 | |
| 2124 | |
| 2125 | dsc* 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 | |
| 2147 | dsc* evlAsciiVal(thread_db* tdbb, const SysFunction*, const NestValueArray& args, |
nothing calls this directly
no test coverage detected