Created
May 20, 2015 23:00
-
-
Save X39/afcd388915f610b34169 to your computer and use it in GitHub Desktop.
Return concept
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo = { | |
private["___returnValue___", "___returnedValue___"]; | |
___returnedValue___ = _this call { | |
scopeName "___returnScope___"; | |
//works only with topMost scope but not lower scopes | |
if(false) exitWith {false}; | |
if(true) then | |
{ | |
if(true) then | |
{ | |
___returnValue___ = false; | |
breakOut "___returnScope___"; | |
}; | |
}; | |
}; | |
if(!isNil "___returnedValue___") exitWith {___returnedValue___}; | |
___returnValue___ | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment