On Tue, 28 Jun 2022 14:00:32 -0700, Charles Mills <[email protected]> wrote:
>Rexx *documentation* is weird. <g> There is no mention of that in the
>documentation.
>
>Well, I take that back. They show it in an if statement if SYSCALLS("ON") > 3
>then ... which is more or less the same thing.
>
>The doc could be clearer, but I guess if all the IBM doc were clear we would
>not have IBM-MAIN. Thanks.
>
>Charles
SYSCALLS is a REXX Function. REXX Functions always return a value (or fail if
the syntax is wrong!).
x = Function(arg1,arg2...) Would set "x" to whatever value Function returns
Call Function arg1, arg2... Sets REXX special variable "result" to whatever
value Function returns
If I need to use the value returned by Function, then I use the first format.
If I just need to test the value, I use the second format.
I sometimes use the "If Function(arg1,arg2...)" , but only if it's very obvious
that I'm jut testing the returned value.
I don't like it for SYSCALLS because it's not obvious that "If SYSCALLS('ON')"
is not just testing the returned value, but it also establishes the SYSCALL
environment.
Just my opinion!
--
Dale R. Smith
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN