MCPcopy Index your code
hub / github.com/assaultcube/AC / whilea

Function whilea

source/src/command.cpp:1062–1078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1060COMMANDN(loop, loopa, "sis");
1061
1062void whilea(char *cond, char *body)
1063{
1064 loop_level++;
1065 int its = 0;
1066 while(execute(cond))
1067 {
1068 execute(body);
1069 loop_skip = false;
1070 if(loop_break)
1071 {
1072 loop_break = false;
1073 break;
1074 }
1075 if(++its > CSLIMIT_ITERATION) { cslimiterr("loop iterations"); return; }
1076 }
1077 loop_level--;
1078}
1079COMMANDN(while, whilea, "ss");
1080
1081COMMANDF(break, "", () { if(loop_level) loop_skip = loop_break = true; });

Callers

nothing calls this directly

Calls 2

executeFunction · 0.85
cslimiterrFunction · 0.85

Tested by

no test coverage detected