//_Header //******************************************************************* // NOVA Central Controls --- Lawrence Livermore Laboratory //******************************************************************* // //_Module_Name: DESCR _File: [nsm.src]DESCR.PRX // //_Description: // This module contains the declarations of // procedures and types needed to manipulate // VAX/VMS string descriptors in Praxis programs. //_Call: // string_to_descr ( in_array, out_descriptor ) // // Where: in_array -- is a flex array of char // or a quoted string. // out_descriptor -- is a variable of type // string_descriptor // //_References: // Addr_of - return the address of any variable //_Identifier: { none } //******************************************************************* //_Author: J. M. Duffy _Creation_Date: 26-SEP-1980 //_Revisions: // 1.000 26-SEP-1980 JMD Initial Key-in. // 1.100 14-dec-1980 JMD Convert procedure declarations to new // praxis syntax. Also moved to [nsm.src] // 1.101 15-dec-1980 JMD Use code string routine here as opposed to // Having fortran do it. // 1.102 3-aug-1981 (JMD?) Packed array of char... // 1.103 2-SEP-1981 JLW LSI VERSION %ident "1.103" //******************************************************************* //_End module descr import addr_of from addrof import put32, put16 from iomodule export string_descriptor_type, string_to_descr declare %if for_vax string_descriptor_type is structure length : 16 bit integer type : 16 bit integer initially 16!010E // vax flexible string. ptr : 32 bit integer // to hold the string address endstructure %endif // %if for_lsi string_descriptor_type is structure length : 16 bit integer ptr : 16 bit integer // to hold the string address endstructure %endif enddeclare procedure string_to_descr ( in_string : in ref packed array [1..?n] of char , out_descr : inout ref string_descriptor_type ) out_descr.length := n out_descr.ptr := addr_of(in_string) %if trace put16 ( "String_to_descr - Length: ", out_descr.length) put32 ( " - address:", out_descr.ptr) %endif endprocedure { string_to_descr } endmodule