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

Neil Rieck n.rieck at sympatico.ca
Sat Jun 8 17:03:31 EDT 2019


On Tuesday, June 4, 2019 at 6:07:53 PM UTC-4, Craig Dedo wrote:
> When trying to use the OpenVMS Run Time Library procedures LIB$CONVERT_DATE_STRING() and LIB$DAY_OF_WEEK() with HP Basic for OpenVMS, I am getting  %BASIC-E-PARMODNOT error messages.  Here is a screenshot of the messages from the compiler.
> 
> [Begin compiler error messages]
>     VMS_Condition_Code_gl   = LIB$CONVERT_DATE_STRING ( End_of_Month_Date_gs, End_of_Month_Date_Time_gq, Date_Time_Context_gl )
> ..............................................................................^
> %BASIC-E-PARMODNOT, mode for parameter 2 of routine LIB$CONVERT_DATE_STRING not as declared
> at line number 166 in file SMP_DEVELOP_DV:[YYY1V30.TOLAS.DEV.OLIVE.STARLET]Test_Days_in_Month.BAS;4
> 
>     VMS_Condition_Code_gl   = LIB$DAY_OF_WEEK ( End_of_Month_Date_Time_gq, End_of_Month_Weekday_gl )
> ................................................^
> %BASIC-E-PARMODNOT, mode for parameter 1 of routine LIB$DAY_OF_WEEK not as declared
> at line number 167 in file SMP_DEVELOP_DV:[YYY1V30.TOLAS.DEV.OLIVE.STARLET]Test_Days_in_Month.BAS;4
> %BASIC-E-ENDNOOBJ, SMP_DEVELOP_DV:[YYY1V30.TOLAS.DEV.OLIVE.STARLET]Test_Days_in_Month.BAS;4 completed with 2 diagnostics - object deleted
> [End of compiler error messages]
> 
> Here are the relevant variable declarations at the top of my program:
> Declare Long            Date_Time_Context_gl
> Declare String          End_of_Month_Date_gs
> Declare Quad            End_of_Month_Date_Time_gq
> Declare Long            End_of_Month_Weekday_gl
> Declare Long            VMS_Condition_Code_gl
> 
> I also included all of the relevant definitions from several of the modules in SYS$LIBRARY:BASIC$STARLET.TLB.
> 
> What is going wrong?  What can I do to fix this problem?
> 
> Any help that anyone could give me would be most appreciated.
> 
> Sincerely,
> Craig T. Dedo, OpenVMS Software Development Consultant
> Navistar, Inc.
> 2701 Navistar Drive
> Lisle, IL   60532-3637
> E-mail:  <Craig.Dedo at navistar.com>

I've got lots of VMS-BASIC demos posted here:
http://neilrieck.net/demo_vms_html/openvms_demo_index.html

As others have already pointed out, you need to properly declare all external functions and procedures by using the...

%include %from %library

...syntax as seen here:
http://neilrieck.net/demo_vms_html/wcsm_trnlnm_fun.html

Neil Rieck
Waterloo, Ontario, Canada.
http://neilrieck.net


 "sys$library:basic$starlet"      ! lib$
%include "$libdef"      %from %library "sys$library:basic$starlet"      ! eg. lib$_normal



More information about the Info-vax mailing list