122-32000 Parallax Inc, 122-32000 Datasheet - Page 162

MANUAL PROPELLER

122-32000

Manufacturer Part Number
122-32000
Description
MANUAL PROPELLER
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-32000

Accessory Type
Manual
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
and more methods are returned from (via
call stack gets shorter. This is called “pushing” onto the stack and “popping” off of the stack,
respectively.
The
immediate caller; the one who directly called the method that just returned. The
command, however, repetitively pops data off the call stack until it reaches a caller with an
Abort Trap (see below); returning to some higher-level caller that may have just been one
call, or many calls, up the nested chain of calls. Any return points along the way between an
aborting method and an abort trapping method are ignored and essentially terminated. In this
way,
logic to handle a serious issue at a high level.
Using ABORT
Any method can choose to issue an
check for an abort status and handle it. This higher-level code can be either that which called
an aborting method directly, or via some other set of methods. To issue an
use something like the following:
—or—
...where
is a value to return upon aborting.
The Abort Trap (
To trap an
preceded with the Abort Trap symbol, a backslash (
MayAbort
with the following:
Page 162 · Propeller Manual v1.0
if <bad condition>
if <bad condition>
if \MayAbort
RETURN
ABORT
abort
abort <value>
abort <value>
<bad condition>
could abort, or calls other methods that may abort, a calling method could trap this
– Spin Language Reference
ABORT
allows code to back way out of a very deep and potentially complicated series of
command pops the most recent data off the call stack to facilitate returning to the
, the call to the method or method chain that could potentially abort must be
\
)
is a condition that determines the method should abort and
'If bad condition detected, abort
'If bad condition detected, abort with value
'Call MayAbort with abort trap
'Process abort
ABORT
RETURN
command. It’s up to the higher-level code to
or by reaching the end of the method) the
\
). For example, if a method called
ABORT
command,
<value>
ABORT

Related parts for 122-32000