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

Aibo General

Aibo Development

Wiki Help

Aibo Links

R-Code » ARG

ARG Statement

Extracts the value of a subroutine argument into a variable.

Note The same number of arguments must be retrieved as were pushed before the CALL statement. The order in which arguments are retrieved is first-in/first-out, this opposite of normal stack operations (first-in/last-out.)

Models

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

Syntax

ARG:variable

The ARG statement syntax has the following parts:

PartDescription
variableAutomatic variables arg1, arg2, arg3 or user declared variables from LOCAL or GLOBAL statements.

Example(s)


   // Calling code

   ...
   PUSH:10
   PUSH:20
   PUSH:30
   CALL:mysub:3
   ...

:mysub // Subroutine

   ARG:arg1  // arg1 <- 10
   ARG:arg2  // arg2 <- 20
   ARG:arg3  // arg3 <- 30
   ...
 

Remarks

arg1, arg2, arg3 are provided for use as local variables. There is no need for separate LOCAL declarations.

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