Page MenuHomeFeedback Tracker

Add a propper "return" command to exit the current script call!
Closed, ResolvedPublic

Description

add a return command which ACCEPTS return values!
its required as you cant simply exit the current function (CALL varName) scope with exitWith or breakOut!

it is a limitation which makes scripting just more pain in the ass then it is currently as we did not got the JAVA implementation ... (where i can return from a function where ever i like to!)

Details

Legacy ID
769156907
Severity
None
Resolution
Fixed
Reproducibility
N/A
Category
Scripting

Event Timeline

X39 edited Steps To Reproduce. (Show Details)Mar 12 2014, 5:28 PM
X39 edited Additional Information. (Show Details)
X39 set Category to Scripting.
X39 set Reproducibility to N/A.
X39 set Severity to None.
X39 set Resolution to Fixed.
X39 set Legacy ID to 769156907.May 7 2016, 6:08 PM

+1

without return:

func = {
if (true) then {

		if (true) then {
			if (true) then {
				1000
			};
			2000
		};
		3000

};
4000
};
hint str call func; //4000

with return:

func = {
if (true) then {

		if (true) then {
			if (true) then {
				return 1000;
			};
			2000
		};
		3000

};
4000
};
hint str call func; //1000

X39 added a subscriber: X39.May 7 2016, 6:08 PM
X39 added a comment.Aug 12 2015, 8:20 PM

from my point of view this can be closed thx to the breakOut (even thought it would be nice to have a proper RETURN command instead of being in need of naming each scope by yourself)