CXXR (C++ R) API
|
Object authorising R 'return' command. More...
#include <Environment.h>
Public Member Functions | |
ReturnScope (Environment *env) | |
Constructor. |
Object authorising R 'return' command.
ReturnScope objects must be declared on the processor stack (i.e. as C++ automatic variables). Each Environment object keeps track of the number of ReturnScope objects associated with it. The R command 'return' is legal only when the evaluation Environment has at least one ReturnScope in existence; this can be determined by calling Environment::canReturn(). More generally, a transfer of control to a specified Environment using ReturnException will succeed only if canReturn() is true.
|
inline |
Constructor.
env | Pointer to the Environment with which this ReturnScope is to be associated. |