[Info-vax] Error Messages in Basic - %BASIC-E-PARMODNOT, mode for parameter <n> of routine <procedure-name> not as declared

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Wed Jun 5 23:38:46 EDT 2019


On 2019-06-06 03:08:37 +0000, Robert A. Brooks said:

> On 6/5/2019 10:35 PM, Stephen Hoffman wrote:
>> On 2019-06-05 14:27:57 +0000, Jeffrey H. Coffield said:
>> 
>>> The following compiles and runs for me on both Alpha and Itanium. You 
>>> must have something wrong in how you are declaring the function.
>>> ...
>>>          external long function lib$convert_date_string
>> 
>> Try it again with the system-provided declarations, rather than the 
>> classic and old-school 
>> add-an-external-and-who-cares-about-the-arguments approach.
>> You'll find the compiler will be recalcitrant.
>> Replacing these old-style declarations with the system declarations 
>> might also find latent bugs in existing applications, particularly 
>> around argument specifications and missing arguments.
> 
> It's amazing how many people create their own item list and IOSB 
> structures, instead of using the STARLET-provided ILEDEF and IOSBDEF.
> 
> Over the course of rebuilding all the layered products, I've come 
> across this repeatedly, so even within DEC/CPQ/HP folks "rolled their 
> own".

Ayup.  Same experience.  Refactoring that source code—retrofitting 
standard declarations, and enabling and checking compiler 
diagnostics—has stabilized and has cleaned up a whole lot of old code.

Some of that code is pretty old, and few folks have looked at it.

There've been various posted examples with home-grown declarations and 
home-grown error checking around.  All sorts of busted error checks, 
too.  Hello, have you met STSDEF?  And derivatives of that code can 
live for decades.

What I've seen past these and similar source code update efforts are 
vendor-led efforts around reducing the glue code involved in 
development, and that and associated refactoring tools can get rid of a 
whole lot of the written-by-rote app source code.

There are pages and pages of cruft code that I once wrote and then just 
didn't see—ILEDEF being one of the common offenders here—and that are 
now almost as obvious as a box of angry weasels.

OO APIs can help here, whether akin to Microsoft .NET or macOS Cocoa or 
otherwise.  Also helps with API compatibility, too.  And before the 
grumbles start, OO is not a panacea.


-- 
Pure Personal Opinion | HoffmanLabs LLC 




More information about the Info-vax mailing list