Serves for organizing cycles
syntax
CODE:
loop () // without parameter (loop)
{
messagebox ("closed loop");
}
{
messagebox ("closed loop");
}
CODE:
loop () messagebox ("closed loop"); // without parameter (loop)
CODE:
loop (5) // executes 5 times
{
messagebox ("will execute 5 times");
}
{
messagebox ("will execute 5 times");
}
CODE:
loop (5) messagebox ("will execute 5 times"); // execute 5 times
in the form of parameters are allowed numbers, variables, functions that return numbers
CODE:
loop (findimage (-1, # Image_0 [0] [0], 0, # PosX_0 [0], # PosY_0 [0], 0, 0, 1366, 768, -1) +5)
{
messagebox ("will execute how many returned findimage + 5");
}
{
messagebox ("will execute how many returned findimage + 5");
}
==========================
CODE:
loop ()
{
messagebox ("closed loop");
}
{
messagebox ("closed loop");
}
similarly
CODE:
l:
messagebox ("closed loop");
goto l;
messagebox ("closed loop");
goto l;
CODE:
loop (5) // executes 5 times
{
messagebox ("will execute 5 times");
}
{
messagebox ("will execute 5 times");
}
similarly
CODE:
for (int l=0; l <5; l ++)
{
messagebox ("will execute 5 times");
}
{
messagebox ("will execute 5 times");
}