Recent Changes - Search:
Email iofreak@yahoo.com with comments and/or suggestions.

Aibo General

Aibo Development

Wiki Help

Aibo Links

R-Code » RET

RET Statement

Return from a CALLed subroutine label (set context value version.) On return, the system variable Context is then set to the specified value.

Note When a value of 0 is specified, the context value from the time of the original subroutine CALL is restored.

Models

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

Syntax

RET:val

The RET statement syntax has the following parts:

PartDescription
valThe user defined variable name or constant value the system variable Context is set to on return.

Example(s)


   // Perform a different action depending on mood
   CALL:GetMood
   CASE:1:PLAY:ACTION:EMOTION_ANGRY1_SIT
   CASE:2:PLAY:ACTION:SIT
   CASE:3:PLAY:ACTION:EMOTION_JOY2_SIT
   ...

:GetMood  // Determine mood based on hunger
      IF:Batt_Rest:<:33:THEN
         RET:1 // Not really happy
      ENDIF

      IF:Batt_Rest:>:66:THEN
         RET:3 // very happy
      ENDIF

      RET:2 // normal
 

Edit - History - Print - Recent Changes - Search - Site Terms of Use
Page last modified on February 11, 2006, at 05:49 PM CST