[Info-vax] SDL header generator, was: Re: Error Messages in Basic - %BASIC-E-PARMODNOT, mode for parameter <n> of routine <procedure-name> not as declared
Bob Gezelter
gezelter at rlgsc.com
Mon Jun 10 14:01:43 EDT 2019
On Monday, June 10, 2019 at 1:49:48 PM UTC-4, dgordo... at gmail.com wrote:
> On Monday, June 10, 2019 at 1:05:04 AM UTC-4, Simon Clubley wrote:
>
> > sys$cli() control blocks mostly have a common header and then a request
> > specific body. However, the header has been merged into one specific
> > control block, clidef1, instead of being a standalone structure that
> > is referenced by the definitions for the other blocks (such as clidef2).
>
> You can't blame that on SDL. That's the way the SDL source for CLIDEF is written. In defense of the unknown-to-me original author, SDL has become more clever over the years and it's a good bet that when CLIDEF.SDL was written (or more likely translated from CLIDEF.MDL), the only targets were MACRO and BLISS (both much less squeamish about types.)
Doug,
History notwithstanding, the challenge is to have better typing in line with more current programming standards (e.g., struct dsc$descriptor rather than two longwords), while not breaking existing code.
This may well mean using compiler variables and macro substitution to convert a generic to either the old or new forms, to wit (apologies in advance for bastardizing the C preprocessor).
#ifdef oldform
#define 32bitdescriptor long; long
#endif
#ifndef oldform
#define 32bitdescriptor dsc$descriptor
#endif
32bitdescriptor FullName
Back compatibility is nice, but it should not force us to write to what are now considered undesirable usage.
- Bob Gezelter, http://www.rlgsc.com
More information about the Info-vax
mailing list