[Info-vax] How Do You Define Record (Data Structure) Dummy Arguments in Subroutine Definitions in HP Basic for OpenVMS?

Dave Froble davef at tsoft-inc.com
Sat Dec 21 18:50:30 EST 2019


On 12/21/2019 12:55 PM, Neil Rieck wrote:
> On Friday, August 16, 2019 at 9:58:26 AM UTC-4, Craig Dedo wrote:
>> How do you define dummy arguments (formal parameters) in the definitions of subroutines in HP Basic for OpenVMS?
>>
>> FYI, this is NOT an academic assignment.  It is a real production problem in a for-profit, commercial environment (Navistar) with real money at stake.
>>
>> I have tried to do my homework.  I have read everything that I can about RECORD definitions and variable and subroutine arguments in both the HP Basic for OpenVMS Reference Manual and the HP for OpenVMS User Guide.  The examples in those manuals don't include any subroutine definitions with RECORD variables.
>>
>> We are using HP Basic 1.6 for OpenVMS and HP OpenVMS/AXP V8.4-2L2 on an AlphaServer.
>>
>> Do I need to specify the Record definition before the Sub () statement that includes the dummy argument (formal parameter) that is of that Record type?  Or, is it OK to specify the Sub() statement first and have the Record definition further down in the source code file?
>>
>> Here is the Sub() statement I am asking about:
>> Sub Build_Parts_Return_List ( String T_Return_Begin_Date, String T_Return_End_Date, Long L_nParts, &
>>       Inventory_Rec Dim Parts_Return_Array() )
>>
>> Right now, the definition of Inventory_Rec is further down in the source code file but before any executable statements.
>>
>> Please let me know what works.  TIA for any help that you can give me.
>>
>> Sincerely,
>> Craig T. Dedo
>> OpenVMS Software Development Consultant
>> Navistar, Inc.                9-4-P12-9
>> 2701 Navistar Drive           Work Phone:  (331) 332-6799
>> Lisle, IL   60532-3637
>> E-mail:  firstname dot lastname at domain dot com
>> Domain:  navistar
>
> I am assuming that "record size" in your question is referring to something written to disk. This depends upon the file type (in RMS, text files can be either "variable length" or "fixed"). Variable length records can be used in sequential files but not relative or indexed files. Click here to see three simple little hacks:
>
> http://neilrieck.net/demo_vms_html/openvms_demo_index.html#fileio
>
> Neil Rieck
> Waterloo, Ontario, Canada.
> http://neilrieck.net
>

Neil, it's been a while since this started, but, I believe he was 
discussing a user defined variable (structure) using RECORD.  Wanted to 
pass a structure address to a subprogram.

-- 
David Froble                       Tel: 724-529-0450
Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA  15486



More information about the Info-vax mailing list