MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / cond

Function cond

libraries/AP_Scripting/lua/src/lparser.c:1177–1184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1175
1176
1177static int cond (LexState *ls) {
1178 /* cond -> exp */
1179 expdesc v;
1180 expr(ls, &v); /* read condition */
1181 if (v.k == VNIL) v.k = VFALSE; /* 'falses' are all equal here */
1182 luaK_goiftrue(ls->fs, &v);
1183 return v.f;
1184}
1185
1186
1187static void gotostat (LexState *ls, int pc) {

Callers 2

whilestatFunction · 0.85
repeatstatFunction · 0.85

Calls 2

exprFunction · 0.85
luaK_goiftrueFunction · 0.85

Tested by

no test coverage detected