Recent Changes - Search:
Email with comments and/or suggestions.

Aibo General

Aibo Development

Wiki Help

Aibo Links


ONCALL Statement

Registers/cancels an interrupt processing routine. An interrupt routine is called when the specified condition statement is met. Conditional specification methods are the same as IF.


ERS-210 ERS-220 ERS-31x ERS-7


ONCALL:val1:op:val2:label[:resume type:resume label]


The ONCALL statement syntax has the following parts:

val1Variable or constant.
opA valid boolean operator (=, ==, <>, !=, <, <=, >, >=, &, |, ^, &&, || ).
val2Variable or constant.
labelSubroutine label.
resume typeOptional. Resume Type:
0 - Return to statement that generated the interrupt.
1 - After returning to the statement that generated the interrupt, goto resume label.
2 - Return to location of ONCALL statement.
3 - After returning to the location of the ONCALL statement, goto resume label.
4 - Return to the beginning of the program (entire stack is cleared).
5 - After returning to beginning of program, goto resume label.
resume labelOptional. Subroutine label.
numberWhen specified, cancels the last number ONCALLs that have been registered. Must be a negative number.

In 2 - 5, above, all previous ONCALL registrations after the corresponding ONCALL are deleted. In the case of 3 and 5, however, ONCALL commands registered at the same level as the return position are preserved.



      // Rest of program

    PRINT:"50% Battery Power Remaining (or less)"


Once the interrupt is registered, the conditional is evaluated after each subsequent line in the program executes. Nested interrupts are not allowed and are ignored. ONCALL is affected by the subroutine's nesting. An ONCALL registered in a subroutine becomes invalid when execution leaves that subroutine.

Edit - History - Print - Recent Changes - Search - Site Terms of Use
Page last modified on February 10, 2006, at 09:21 PM CST