Well, I think I indicated that my PL/I knowledge was minimal. I was trying
to illustrate a concept, not write a tutorial on PL/I syntax. From your
response, I would guess I was eminently successful at my intended task. I
guess it's the nature of IBM-MAIN: the more irrelevant the nit, the greater
the likelihood of a thorough and tedious correction.

I did miss or forget that the idea of his C routine was to go into his C
library routines and "correct" PL/I NULLs; it was not intended to be called
from "recompoiled" PL/I so as to provide an appropriate form of nulls to
various library routines. I withdraw the suggestion.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of John Gilmore
Sent: Monday, March 31, 2014 8:49 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Compiler error in z/OS C compiler

Many C programmers have the habit of, for clarity, enclosing the returned
expression of a RTETURN statement in parentheses, which C neither requires
no objects to.

In PL/I, however, the parentheses are required (because PL/I has no reserved
words, only keywords in context).  Thus

IF ARG = NULL then RETURN SYSNULL ELSE RETURN ARG;

must necessarily become

IF ARG = NULL then RETURN (SYSNULL) ELSE RETURN(ARG) ;

Bernd would, I should guess, respond to this suggestion by noting that,
while it will do the job, its use would require changes in many PL/I source
programs and thast they be recompoiled and retested, his more testicular
approach makes the required change in just one place.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to