[Info-vax] Error Messages in Basic - %BASIC-E-PARMODNOT, mode for parameter <n> of routine <procedure-name> not as declared
Jeffrey H. Coffield
jeffrey at digitalsynergyinc.com
Mon Jun 10 10:35:02 EDT 2019
On 06/08/2019 11:54 AM, Robert A. Brooks wrote:
> On 6/8/2019 2:21 PM, Jeffrey H. Coffield wrote:
>> There are other long time errors and omissions in Basic support that I
>> have had to keep my own fixed/stable versions of some of the library
>> files so my programs will work. Notably the files concerning XAB
>> structures for Basic would change/break with new versions of OpenVMS.
>
> Can I see an example of that? It may be that the SDL back end for BASIC
> needs some work. In any event, we can't fix it if we don't know that
> it's a problem.
>
Robert,
I tried a long time ago to get someone at DEC/Compaq/HP to listen but
never got anywhere, even though we sell and support OpenVMS systems.
Here is one example that doesn't compile with the current libraries.
This code is not original to me and I don't know where I got it but it
is at least 30 years old. It may only need the correct %include
functions now. The "%include 'source:xab.bas" that is commented out is
the version I saved off a long time ago that makes this work.
FUNCTION LONG GETFID (STRING file_spec = 255% BY REF, &
WORD returned_fid (1% TO 3%) BY REF, &
long EBK, &
FFB, &
string file.name by desc)
!
! This function obtains the file-ID of the file.
!
OPTION TYPE = EXPLICIT
%INCLUDE "$rmsdef" %FROM %LIBRARY "sys$library:basic$starlet"
%INCLUDE "$fabdef" %FROM %LIBRARY "sys$library:basic$starlet"
%INCLUDE "$namdef" %FROM %LIBRARY "sys$library:basic$starlet"
%INCLUDE "$xabdef" %FROM %LIBRARY "sys$library:basic$starlet"
%INCLUDE "$xaballdef" %FROM %LIBRARY "sys$library:basic$starlet"
! %INCLUDE 'source:XAB.BAS'
EXTERNAL LONG FUNCTION sys$open, sys$close
DECLARE FABDEF FAB, &
NAMDEF NAM, &
LONG CALL.STATUS, &
XABDEF XAB
MAP (GETFID_MAP) STRING RES_FILE = 255%
fab::fab$b_bid = fab$c_bid
fab::fab$b_bln = fab$c_bln
fab::fab$l_fna = LOC(file_spec)
fab::fab$b_fns = LEN(TRM$(file_spec))
fab::fab$l_nam = LOC(nam)
fab::fab$l_xab = loc(xab)
nam::nam$b_bid = nam$c_bid
nam::nam$b_bln = nam$c_bln
NAM::NAM$L_RSA = LOC(RES_FILE)
NAM::NAM$B_RSS = -1% ! 255 unsigned
xab::xab$b_bln = XAB$C_FHCLEN
xab::xab$b_cod = XAB$C_FHC
CALL.STATUS = sys$open (fab)
IF CALL.STATUS = rms$_normal THEN
returned_fid(1%) = nam::nam$w_fid_num
returned_fid(2%) = nam::nam$w_fid_seq
returned_fid(3%) = nam::nam$w_fid_rvn
CALL.STATUS = sys$close (fab)
EBK = xab::xab$l_EBK
file.name = left(res_file, nam::nam$b_rsl)
FFB = XAB::XAB$W_FFB
ELSE
EBK = 0%
FFB = 0%
END IF
END FUNCTION CALL.STATUS
Here is the output from OpenVMS V8.4-2L1:
VMS3 $ basic getfid
xab::xab$b_bln = XAB$C_FHCLEN
^
%BASIC-E-EXPDECREQ, explicit declaration of XAB$C_FHCLEN required
at line number 39 in file SYS$SYSDEVICE:[JEFFREY]getfid.bas;1
xab::xab$b_cod = XAB$C_FHC
^
%BASIC-E-EXPDECREQ, explicit declaration of XAB$C_FHC required
at line number 40 in file SYS$SYSDEVICE:[JEFFREY]getfid.bas;1
EBK = xab::xab$l_EBK
..........................^
%BASIC-E-ERRRECCOM, erroneous RECORD component
at line number 48 in file SYS$SYSDEVICE:[JEFFREY]getfid.bas;1
FFB = XAB::XAB$W_FFB
..........................^
%BASIC-E-ERRRECCOM, erroneous RECORD component
at line number 50 in file SYS$SYSDEVICE:[JEFFREY]getfid.bas;1
%BASIC-E-ENDNOOBJ, SYS$SYSDEVICE:[JEFFREY]getfid.bas;1 completed with 4
diagnostics - object deleted
Any chance of getting GET/FIND LE or LT into Basic?
More information about the Info-vax
mailing list