MAKE INTERVAL
Call MAKE INTERVAL to create a new Interval. Intervals are functions that can be called periodically with START INTERVAL. In order to properly set up an Interval you have to follow these steps:
1) Create a function that "Registers" the interval.
For example:
1: Function Register_TestInterval(Id)
2: Make Interval Id
3: TestInterval(Id)
4: Endfunction
In line 2 the interval is created. Line 4 calls the TestInterval once. In that function you can check whether this call comes from this register function and exit eventually.
2) Create the actual Interval function
In our register function we called our Interval "TestInterval". Now it's time to declare this function:
1: Function TestInterval(Id)
2: If Interval Reg Call(Id) Then ExitFunction
3: rem Place your code here
4: Endfunction
3) Register the Interval
With this step our interval will be registered. Simply put
Register_TestInterval(1)
at the top of your code. Now you are ready to execute the interval 1 with START INTERVAL.
ARGUMENTS:
* Interval Number = A free Interval number between 1 and 256.
SYNTAX
MAKE INTERVAL Interval Number
RELATED INFO
View Intervals Index
View STYX Index
View STYX Main File