Talk:Special variables: Difference between revisions

m
→‎REXX Special variable RETURN: added comments about what the documents said or didn't say.
(→‎On what to include: and what not to include)
m (→‎REXX Special variable RETURN: added comments about what the documents said or didn't say.)
 
(3 intermediate revisions by 2 users not shown)
Line 19:
 
If a distinction can be made between variables defined by the core language and variables defined in standard libraries, maybe only the ones for the core language should be listed. Also, the variable part could be stressed. We might want to exclude predefined constants. —[[User:Sonia|Sonia]] 02:48, 3 June 2011 (UTC)
 
:Predefined system constants probably fall under the category of informative special variables for this task and should be included. Mathematical constants are not special variables and should not be included. --[[User:Markhobley|Markhobley]] 00:01, 8 June 2011 (UTC)
 
:: Actually, the mathematical constants may be referred to by a predefined or reserved identifier in some languages. If this is the case, then I suggest that we include those too. --[[User:Markhobley|Markhobley]] 16:37, 12 June 2011 (UTC)
 
== REXX Special variable RETURN ==
 
Just a summary of a long offline discussion and the facts as I see them
<br> REXX version 1 states RESULT [the result RETURNed from a subroutine or function]
<br> The REXX standard and several implementations (Regina, VM, TSO) state that RETURN is set after subroutine calls and not after function invocations.
<br> Some other (older) implementations set it also after function invocations, thereby violating the standard (which was, I think, only created at a later point in time).
--[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 10:38, 20 December 2014 (UTC)
 
: The 2nd statement (... and not after function invocations.) isn't written as such --- there is no ''not'' or ''except'' used in the IBM pubs regarding this subject. &nbsp; Of what I read of the current IBM publications, at best, it is possibly inferred and the wording ''could be'' interpreted that way. &nbsp; If the current IBM publications (VM REXX reference, and the TSO/E version) had stated it as you said, there wouldn't be any disagreement. &nbsp; The Regina REXX publication is the only place that mentions explicitly that if subroutine was invoked via the CALL verb, that the RESULT special variable was set/defined from the expression of the RETURN statement, or DROPped if there wasn't an expression. &nbsp; I didn't read anywhere in the current IBM publications that RESULT is set/define and NOT for function invocations. &nbsp; If it did, there wouldn't be a discussion regarding this matter. &nbsp; That other authors of other REXXes (not mentioned here in this talk section) implemented it differently speaks to the manner of interpreting what the publications state (or more probably, what they didn't state). &nbsp; That the "standard" was written after some of the older REXXes where written and implemented shouldn't make the older REXX interpreters incorrect (in my opinion). &nbsp; It is important to note that various REXX interpreters have different ... er, results regarding the issue of setting/defining the RESULT special variable (or not setting it). -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 21:46, 20 December 2014 (UTC)