Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

PL1-L - "Weiche" Übergänge bei Schnittstellenänderungen

Subject:

Re: GENERIC entry declaration with structure parameter

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

PL1 (language) discussions <PL1-L@LISTSERV.DARTMOUTH.EDU>

Date:

2013.02.16 10:45:17


I don't know much about GENERIC, but to your original problem:

I would suggest writing a new procedure with a new name, which supports the
additional CHAR parameter, copying all the code from the old one.

And then you replace the old procedure by a new one which simply calls the new
procedure and specifies a default value for the new CHAR parameter.

So you can support the existing callers, they don't have to change.

Then you inform the existing callers that they should change - when they have
time to do so - their calls from the old proc to the new one - specifying the
default value for the new CHAR parameter.

If they all have done this (in a year or so - you have to check this by using
your repository and see, if there are still active calls to your original
procedure), you can drop your original procedure (if there are no more callers).

This is the way we do such incompatible module interface changes. Most of the
time, of course, we try to do the changes in such a way that we don't need new
modules and new module names - that is: compatible interface changes.

Kind regards

Bernd




Am 15.02.2013 14:17, schrieb P.H.:
>> Did you try "DEFINE STRUCTURE"and use the type name in the GENERIC
>> declaration?
> No. But I happy with
>
> dcl SetDSError GENERIC (
>            SetDSError0 when ( * ),
>            SetDSError1 when ( *, char ),
>            SetDSError2 when ( *, char, char )
>            );
>
> The compiler complains as expected when argument and parameter
> types/structures do not match.
>
> --
> P. H.
>

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie