Closed richardpawson closed 4 months ago
Currently the frame for a new Function contains:
return default
Proposal is to change this (i.e. defaultmay no longer be used without a specified type) to:
default
return result
where result is a new keyword that defines a variable of the type returned by the function, initialised to the default of that type.
result
resultmay be set to a new value of the correct type within the function e.g.:
function grade(score Int) as String if (score > 35) set result to "Pass" else set result to "Fail" end if return result end function
Currently the frame for a new Function contains:
return default
Proposal is to change this (i.e.
default
may no longer be used without a specified type) to:return result
where
result
is a new keyword that defines a variable of the type returned by the function, initialised to the default of that type.result
may be set to a new value of the correct type within the function e.g.: