Tagging code

Urbiscript provides mechanism of code tagging. Each piece of code can be name and then paused, resumed or stopped. This mechanism is extremely useful for infinite loops working in the background, which could not be stop until Urbi engine is working.

myTag:loop
{
echo ("in loop");
sleep(1);
},//it is infinite loop working in background, printing "in loop" every second
myTag.freeze;//pauses the execution of the code - tag can be now resumed
myTag.unfreeze;//resumes execution of the code, which was previously paused by freeze
myTag.stop;//stops execution of the code - tag can not be resumed, but you can define new code assigned to the tag:
myTag:loop
{
echo ("in new loop");
sleep(1);
},//new loop starts working in background, printing "in new loop" every second

More examples you can find in the URBI documentation LINK.

 

 

EMYS and FLASH are Open Source and distributed according to the GPL v2.0 © Rev. 0.8.0, 27.04.2016

FLASH Documentation