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

Function gen_for

src/gpre/languages/ftn.cpp:2321–2350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2319//
2320
2321static void gen_for(const act* action)
2322{
2323 gen_s_start(action);
2324 gpre_req* request = action->act_request;
2325 request->req_top_label = next_label();
2326 request->req_btm_label = next_label();
2327 if (action->act_error || (action->act_flags & ACT_sql))
2328 printa(COLUMN, "IF (ISC_STATUS(2) .NE. 0) GOTO %d\n", request->req_btm_label);
2329
2330 printa("", "%-6dCONTINUE", request->req_top_label);
2331
2332 SCHAR s[MAX_REF_SIZE];
2333 gen_receive(action, request->req_primary);
2334 if (action->act_error || (action->act_flags & ACT_sql))
2335 printa(COLUMN, "IF (%s .EQ. 0 .OR. ISC_STATUS(2) .NE. 0) GOTO %d\n",
2336 gen_name(s, request->req_eof, true), request->req_btm_label);
2337 else
2338 printa(COLUMN, "IF (%s .EQ. 0) GOTO %d\n",
2339 gen_name(s, request->req_eof, true), request->req_btm_label);
2340
2341 const gpre_port* port = action->act_request->req_primary;
2342 if (port)
2343 {
2344 for (const ref* reference = port->por_references; reference; reference = reference->ref_next)
2345 {
2346 if (reference->ref_flags & REF_fetch_array)
2347 gen_get_or_put_slice(action, reference, true);
2348 }
2349 }
2350}
2351
2352
2353//____________________________________________________________

Callers 1

FTN_actionFunction · 0.70

Calls 6

next_labelFunction · 0.85
gen_s_startFunction · 0.70
printaFunction · 0.70
gen_receiveFunction · 0.70
gen_nameFunction · 0.70
gen_get_or_put_sliceFunction · 0.70

Tested by

no test coverage detected