contents   index   previous   next


Similar to SE.YIELD, in that the fiber drops back to the calling ScriptEase ISDK application. However, the fiber cannot be run until resumed by the application. Any calls to seExec will return immediately. The application restores the fiber by putting false to that fiber's SE.RETURN,SE.SUSPEND member. In addition, the application may also modify the return value after it does so, but before it seExecs the fiber. This is useful for implementing wrapper functions that delay the fiber until some needed value is available, then return that value. The application manager can examine the wrapper function's return value to allow the wrapper function to communicate with the manager. Chapter XIII has more details.


In addition to a place to put your return, the SE.RETURN object is also where you receive the result from seEval API invocations. The reason for the dual use is simple; in many cases, you want to execute some code using seEval then pass along the result. By putting it in this place, you can immediately return from your wrapper function, returning that value.


Note that once SE.ERROR is set to true, the return value is locked into place and cannot be changed. The reason is again for convenience. Many times you want to just run your snippet of code and not check for errors. In this way, if an error occurs, it takes precedence. You don't have to check for the error to avoid overwriting it. However, you can reset the SE.ERROR boolean back to false if you want to erase the error and overwrite it.