Propeller Manual

Table Of Contents
2: Spin Language Reference – PUB
Propeller Manual v1.1 · Page 185
there is no way to pass them to a method by value; doing so would result in the method
receiving only the first character. Even if a method does not need to modify a string, or other
logical array, the array in question still needs to be passed by reference because there are
multiple elements to be accessed.
Optimized Addressing
In the compiled Propeller Application, the first eight (8) longs that make up the parameters,
the
RESULT variable, and the local variables are addressed using an optimized encoding
scheme. This means accessing the first eight longs (parameters,
RESULT, and local variables)
takes slightly less time than accessing the ninth, or later, longs. To optimize execution speed,
ensure that all local longs used by the method's most repetitive routines are among the first
eight. A similar mechanism applies to global variables; see the
VAR
T
section, page 212, for
more information.
Exiting a Method
A method is exited either when execution reaches the last statement within the method or
when it reaches a
RETURN or ABORT command. A method may have only one exit point (the
last executable statement), or may have many exit points (any number of
RETURN or ABORT
commands in addition to the last executable statement). The RETURN and ABORT commands
can also be used to set the
RESULT variable upon exit; for more information see RETURN, page
196, and
ABORT, page . T 47