static void compile(grib_action* act, grib_compiler *compiler) { grib_action_set* a = (grib_action_set*)act; fprintf(compiler->out,"%s = grib_action_create_set(ctx,",compiler->var); fprintf(compiler->out,"\"%s\",", a->name); grib_compile_expression(a->expression, compiler); fprintf(compiler->out,",%d);\n", a->nofail); }
static void compile(grib_action* act, grib_compiler *compiler) { grib_action_if* a = (grib_action_if*)act; char t[80]; char f[80]; if(a->block_true) grib_compile_action_branch(a->block_true, compiler,t); else strcpy(t,"NULL"); if(a->block_false) grib_compile_action_branch(a->block_false, compiler,f); else strcpy(f,"NULL"); fprintf(compiler->out,"%s = grib_action_create_if(ctx,",compiler->var); grib_compile_expression(a->expression, compiler); fprintf(compiler->out,",%s,%s,%d);\n", t,f,a->transient); }