[PEN_CHECKING_STYLE(NONE),INHERIT('SYS$LIBRARY:PASCAL$D_FLOAT','SYS$LIBRARY:PASCAL$G_FLOAT')] MODULE PASCAL$OTS_ROUTINES; { © Copyright 2005 Hewlett-Packard Development Company, L.P. } { } { Confidential computer software. Valid license from HP and/or } { its subsidiaries required for possession, use, or copying. } { } { Consistent with FAR 12.211 and 12.212, Commercial Computer Software, } { Computer Software Documentation, and Technical Data for Commercial } { Items are licensed to the U.S. Government under vendor's standard } { commercial license. } { } { Neither HP nor any of its subsidiaries shall be liable for technical } { or editorial errors or omissions contained herein. The information } { in this document is provided "as is" without warranty of any kind and } { is subject to change without notice. The warranties for HP products } { are set forth in the express limited warranty statements accompanying } { such products. Nothing herein should be construed as constituting an } { additional warranty. } { } [HIDDEN] TYPE (**** Pre-declared data types ****) $BYTE = [BYTE] -128..127; $WORD = [WORD] -32768..32767; $QUAD = [QUAD,UNSAFE] RECORD L0:UNSIGNED; L1:INTEGER; END; $OCTA = [OCTA,UNSAFE] RECORD L0,L1,L2:UNSIGNED; L3:INTEGER; END; $UBYTE = [BYTE] 0..255; $UWORD = [WORD] 0..65535; $UQUAD = [QUAD,UNSAFE] RECORD L0,L1:UNSIGNED; END; $UOCTA = [OCTA,UNSAFE] RECORD L0,L1,L2,L3:UNSIGNED; END; $PACKED_DEC = [BIT(4),UNSAFE] 0..15; $DEFTYP = [UNSAFE] INTEGER; $DEFPTR = [UNSAFE] ^$DEFTYP; $BOOL = [BIT(1),UNSAFE] BOOLEAN; $BIT = [BIT(1),UNSAFE] BOOLEAN; $BIT2 = [BIT(2),UNSAFE] 0..3; $BIT3 = [BIT(3),UNSAFE] 0..7; $BIT4 = [BIT(4),UNSAFE] 0..15; $BIT5 = [BIT(5),UNSAFE] 0..31; $BIT6 = [BIT(6),UNSAFE] 0..63; $BIT7 = [BIT(7),UNSAFE] 0..127; $BIT8 = [BIT(8),UNSAFE] 0..255; $BIT9 = [BIT(9),UNSAFE] 0..511; $BIT10 = [BIT(10),UNSAFE] 0..1023; $BIT11 = [BIT(11),UNSAFE] 0..2047; $BIT12 = [BIT(12),UNSAFE] 0..4095; $BIT13 = [BIT(13),UNSAFE] 0..8191; $BIT14 = [BIT(14),UNSAFE] 0..16383; $BIT15 = [BIT(15),UNSAFE] 0..32767; $BIT16 = [BIT(16),UNSAFE] 0..65535; $BIT17 = [BIT(17),UNSAFE] 0..131071; $BIT18 = [BIT(18),UNSAFE] 0..262143; $BIT19 = [BIT(19),UNSAFE] 0..524287; $BIT20 = [BIT(20),UNSAFE] 0..1048575; $BIT21 = [BIT(21),UNSAFE] 0..2097151; $BIT22 = [BIT(22),UNSAFE] 0..4194303; $BIT23 = [BIT(23),UNSAFE] 0..8388607; $BIT24 = [BIT(24),UNSAFE] 0..16777215; $BIT25 = [BIT(25),UNSAFE] 0..33554431; $BIT26 = [BIT(26),UNSAFE] 0..67108863; $BIT27 = [BIT(27),UNSAFE] 0..134217727; $BIT28 = [BIT(28),UNSAFE] 0..268435455; $BIT29 = [BIT(29),UNSAFE] 0..536870911; $BIT30 = [BIT(30),UNSAFE] 0..1073741823; $BIT31 = [BIT(31),UNSAFE] 0..2147483647; $BIT32 = [BIT(32),UNSAFE] UNSIGNED; (* MODULE OTS$ROUTINES ; *) (* [HIDDEN] TYPE (**** Pre-declared data types ***?? *) (* $BYTE = [BYTE] -128..127; *) (* $WORD = [WORD] -32768..32767; *) (* $QUAD = [QUAD,UNSAFE] RECORD *) (* L0:UNSIGNED; L1:INTEGER; END; *) (* $OCTA = [OCTA,UNSAFE] RECORD *) (* L0,L1,L2:UNSIGNED; L3:INTEGER; END; *) (* $UBYTE = [BYTE] 0..255; *) (* $UWORD = [WORD] 0..65535; *) (* $UQUAD = [QUAD,UNSAFE] RECORD *) (* L0,L1:UNSIGNED; END; *) (* $UOCTA = [OCTA,UNSAFE] RECORD *) (* L0,L1,L2,L3:UNSIGNED; END; *) (* $UOCTAQUAD = [OCTA(2),UNSAFE] RECORD *) (* L0,L1,L2,L3,L4,L5,L6,L7:UNSIGNED; END; *) (* $PACKED_DEC = [BIT(4),UNSAFE] 0..15; *) (* $DEFTYP = [UNSAFE] INTEGER; *) (* $DEFPTR = [UNSAFE] ^$DEFTYP; *) (* $BOOL = [BIT(1),UNSAFE] BOOLEAN; *) (* $BIT2 = [BIT(2),UNSAFE] 0..3; *) (* $BIT3 = [BIT(3),UNSAFE] 0..7; *) (* $BIT4 = [BIT(4),UNSAFE] 0..15; *) (* $BIT5 = [BIT(5),UNSAFE] 0..31; *) (* $BIT6 = [BIT(6),UNSAFE] 0..63; *) (* $BIT7 = [BIT(7),UNSAFE] 0..127; *) (* $BIT8 = [BIT(8),UNSAFE] 0..255; *) (* $BIT9 = [BIT(9),UNSAFE] 0..511; *) (* $BIT10 = [BIT(10),UNSAFE] 0..1023; *) (* $BIT11 = [BIT(11),UNSAFE] 0..2047; *) (* $BIT12 = [BIT(12),UNSAFE] 0..4095; *) (* $BIT13 = [BIT(13),UNSAFE] 0..8191; *) (* $BIT14 = [BIT(14),UNSAFE] 0..16383; *) (* $BIT15 = [BIT(15),UNSAFE] 0..32767; *) (* $BIT16 = [BIT(16),UNSAFE] 0..65535; *) (* $BIT17 = [BIT(17),UNSAFE] 0..131071; *) (* $BIT18 = [BIT(18),UNSAFE] 0..262143; *) (* $BIT19 = [BIT(19),UNSAFE] 0..524287; *) (* $BIT20 = [BIT(20),UNSAFE] 0..1048575; *) (* $BIT21 = [BIT(21),UNSAFE] 0..2097151; *) (* $BIT22 = [BIT(22),UNSAFE] 0..4194303; *) (* $BIT23 = [BIT(23),UNSAFE] 0..8388607; *) (* $BIT24 = [BIT(24),UNSAFE] 0..16777215; *) (* $BIT25 = [BIT(25),UNSAFE] 0..33554431; *) (* $BIT26 = [BIT(26),UNSAFE] 0..67108863; *) (* $BIT27 = [BIT(27),UNSAFE] 0..134217727; *) (* $BIT28 = [BIT(28),UNSAFE] 0..268435455; *) (* $BIT29 = [BIT(29),UNSAFE] 0..536870911; *) (* $BIT30 = [BIT(30),UNSAFE] 0..1073741823; *) (* $BIT31 = [BIT(31),UNSAFE] 0..2147483647; *) (* $BIT32 = [BIT(32),UNSAFE] UNSIGNED; *) (*** MODULE ots$routines ***) (**************************************************************************** *) (* * *) (* COPYRIGHT (c) 1988 BY * *) (* DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. * *) (* ALL RIGHTS RESERVED. * *) (* * *) (* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * *) (* ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * *) (* INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * *) (* COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * *) (* OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY * *) (* TRANSFERRED. * *) (* * *) (* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * *) (* AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * *) (* CORPORATION. * *) (* * *) (* DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS * *) (* SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * *) (* * *) (* * *) (**************************************************************************** *) (* *) (* 20-Mar-2007 JML QXCM1000393572 Headers returning complex results *) (* can't be compiled by BASIC. *) (* *) (* Well clearly the routines returning complex results *) (* by value (requiring 2 registers) need header generation to *) (* be limited to only those languages KNOWN to be able *) (* to support it and likely to call them. *) (* *) (* *) (* 14-Dec-2006 JML QXCM1000384200 Headers returning complex results *) (* can't be compiled by C/C++ *) (* *) (* Now I understand why a number of headers have been commented *) (* out. When I added all the new IEEE forms, even for those *) (* VAX forms commented out, I didn't realize that C/C++ cannot *) (* return more than 64bits by value. Five of the existing IEEE *) (* routines return complex results by value and those require *) (* 2 registers. This resulted in a .h file for C/C++ that *) (* would not compile. The fix is to use iflanguage and *) (* prevent those headers from being generated for C/C++. These *) (* routines most likely will be called by Fortran anyway. *) (* *) (* 23-Feb-2006 JML PTR 75-109-96 Add missing headers for IEEE forms of *) (* various routines. *) (* *) (* As of 23-Feb-2006 SDL has no types to describe IEEE floating *) (* data. Since the actual type is only material with respect *) (* to size of the argument (single vs double precision) we use *) (* F-Floating to represent IEEE S-Floating and D-Floating to *) (* represent IEEE T-Floating. *) (* *) (* In the course of fixing this PTR it was discovered that *) (* number of header definitions have been commented out for *) (* years. Attempts to determine why they are commented out *) (* proved futile. Rather than risk enabling them and possibly *) (* introducing a collision between the system supplied headers *) (* and private headers users may have developed to work around *) (* the lack of them, they shall remain commented out. *) (* However, their new IEEE forms will be enabled as these *) (* routines only came into existence recently. *) (* (see DPML$SHR.OPT checkin of 24-Mar-2004). *) (* *) (* OTS$CVT_T_D *) (* *) (* Convert Numeric Text to D- or F-Floating Value *) (* *) (* The Convert Numeric Text to D- or F-Floating routines *) (* convert an ASCII text string representation of a *) (* numeric value to a D_floating or F_floating value. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_t_d ( fixed_or_dynamic_input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; VAR floating_point_value : [VOLATILE] D_FLOAT$$TYPE; %IMMED digits_in_fraction : UNSIGNED := %IMMED 0; %IMMED scale_factor : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0; VAR extension_bits : [VOLATILE] $WORD := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_T_F *) (* *) (* Convert Numeric Text to D- or F-Floating Value *) (* *) (* The Convert Numeric Text to D- or F-Floating routines *) (* convert an ASCII text string representation of a *) (* numeric value to a D_floating or F_floating value. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_t_f ( fixed_or_dynamic_input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; VAR floating_point_value : [VOLATILE] SINGLE; %IMMED digits_in_fraction : UNSIGNED := %IMMED 0; %IMMED scale_factor : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0; VAR extension_bits : [VOLATILE] $WORD := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_T_T *) (* *) (* Convert Numeric Text to T- or S-Floating Value *) (* *) (* The Convert Numeric Text to T- or S-Floating routines *) (* convert an ASCII text string representation of a *) (* numeric value to a T_floating or S_floating value. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_t_t ( fixed_or_dynamic_input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; VAR floating_point_value : [VOLATILE] D_FLOAT$$TYPE; %IMMED digits_in_fraction : UNSIGNED := %IMMED 0; %IMMED scale_factor : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0; VAR extension_bits : [VOLATILE] $WORD := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_T_S *) (* *) (* Convert Numeric Text to T- or S-Floating Value *) (* *) (* The Convert Numeric Text to T- or S-Floating routines *) (* convert an ASCII text string representation of a *) (* numeric value to a T_floating or S_floating value. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_t_s ( fixed_or_dynamic_input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; VAR floating_point_value : [VOLATILE] SINGLE; %IMMED digits_in_fraction : UNSIGNED := %IMMED 0; %IMMED scale_factor : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0; VAR extension_bits : [VOLATILE] $WORD := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_T_G *) (* *) (* Convert Numeric Text to G- or H-Floating Value *) (* *) (* The Convert Numeric Text to G- or H-Floating routines *) (* convert an ASCII text string representation of a *) (* numeric value to a G_floating or H_floating value. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_t_g ( fixed_or_dynamic_input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; VAR floating_point_value : [VOLATILE] G_FLOAT$$TYPE; %IMMED digits_in_fraction : UNSIGNED := %IMMED 0; %IMMED scale_factor : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0; VAR extension_bits : [VOLATILE] $WORD := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_T_H *) (* *) (* Convert Numeric Text to G- or H-Floating Value *) (* *) (* The Convert Numeric Text to G- or H-Floating routines *) (* convert an ASCII text string representation of a *) (* numeric value to a G_floating or H_floating value. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_t_h ( fixed_or_dynamic_input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; VAR floating_point_value : [VOLATILE] QUADRUPLE; %IMMED digits_in_fraction : UNSIGNED := %IMMED 0; %IMMED scale_factor : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0; VAR extension_bits : [VOLATILE] $WORD := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$DIVC *) (* *) (* Complex Division *) (* *) (* The Complex Division routines *) (* return a complex result of a division on complex *) (* numbers. *) (* *) (*ENTRY ots$divc ALIAS $ots_divc PARAMETER ( *) (* F_FLOATING COMPLEX NAMED complex_dividend IN *) (* TYPENAME f_floating_complex VALUE, *) (* F_FLOATING COMPLEX NAMED complex_divisor IN *) (* TYPENAME f_floating_complex VALUE ) *) (* RETURNS F_FLOATING COMPLEX NAMED RESULT TYPENAME f_floating_complex; *) (* OTS$DIVCD_R3 *) (* *) (* Complex Division *) (* *) (* The Complex Division routines *) (* return a complex result of a division on complex *) (* numbers. *) (* *) (*ENTRY ots$divcd_r3 ALIAS $ots_divcd_r3 PARAMETER ( *) (* D_FLOATING COMPLEX NAMED complex_dividend IN *) (* TYPENAME d_floating_complex VALUE, *) (* D_FLOATING COMPLEX NAMED complex_divisor IN *) (* TYPENAME d_floating_complex VALUE ) *) (* RETURNS D_FLOATING COMPLEX NAMED RESULT TYPENAME d_floating_complex; *) (* OTS$DIVCG_R3 *) (* *) (* Complex Division *) (* *) (* The Complex Division routines *) (* return a complex result of a division on complex *) (* numbers. *) (* *) (*ENTRY ots$divcg_r3 ALIAS $ots_divcg_r3 PARAMETER ( *) (* G_FLOATING COMPLEX NAMED complex_dividend IN *) (* TYPENAME g_floating_complex VALUE, *) (* G_FLOATING COMPLEX NAMED complex_divisor IN *) (* TYPENAME g_floatin_complex VALUE ) *) (* RETURNS G_FLOATING COMPLEX NAMED RESULT TYPENAME g_floating_complex; *) (* OTS$DIVCS *) (* *) (* Complex Division *) (* *) (* The Complex Division routines *) (* return a complex result of a division on complex *) (* numbers. *) (* *) (* OTS$DIVCT_R3 *) (* *) (* Complex Division *) (* *) (* The Complex Division routines *) (* return a complex result of a division on complex *) (* numbers. *) (* *) (* OTS$DIV_PK_LONG *) (* *) (* Packed Decimal Division with Long Divisor *) (* *) (* The Packed Decimal Division with Long Divisor routine *) (* divides fixed-point decimal data, which is stored in packed *) (* decimal form, when precision and scale requirements for the quotient call *) (* for multiple precision division. The divisor must have a precision of *) (* thirty or thirty-one digits. *) (* *) [ASYNCHRONOUS] FUNCTION ots$div_pk_long ( %REF packed_decimal_dividend : [UNSAFE] ARRAY [$l1..$u1:INTEGER] OF $UBYTE; %REF packed_decimal_divisor : [UNSAFE] ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %IMMED divisor_precision : INTEGER; %REF packed_decimal_quotient : [VOLATILE,UNSAFE] ARRAY [$l4..$u4:INTEGER] OF $UBYTE; %IMMED quotient_precision : INTEGER; %IMMED precision_data : INTEGER; %IMMED scale_data : INTEGER) : INTEGER; EXTERNAL; (* OTS$DIV_PK_SHORT *) (* *) (* Packed Decimal Division with Short Divisor *) (* *) (* The Packed Decimal Division with Short Divisor routine *) (* divides fixed-point decimal data *) (* when precision and scale requirements for the quotient call for *) (* multiple-precision division. *) (* *) [ASYNCHRONOUS] FUNCTION ots$div_pk_short ( %REF packed_decimal_dividend : [UNSAFE] ARRAY [$l1..$u1:INTEGER] OF $UBYTE; %REF packed_decimal_divisor : [UNSAFE] ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %IMMED divisor_precision : INTEGER; %REF packed_decimal_quotient : [VOLATILE,UNSAFE] ARRAY [$l4..$u4:INTEGER] OF $UBYTE; %IMMED quotient_precision : INTEGER; %IMMED precision_data : INTEGER) : INTEGER; EXTERNAL; (* OTS$MOVE3 *) (* *) (* Move Data Without Fill *) (* *) (* The Move Data Without Fill routine *) (* moves up to 231-1 bytes, (2,147,483,647 bytes) from a *) (* specified source address to a specified destination address. *) (* *) [ASYNCHRONOUS] PROCEDURE ots$move3 ( %IMMED length_value : INTEGER; %REF source_array : ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %REF destination_array : [VOLATILE] ARRAY [$l3..$u3:INTEGER] OF $UBYTE); EXTERNAL; (* OTS$MOVE5 *) (* *) (* Move Data with Fill *) (* *) (* The Move Data with Fill routine *) (* moves up to 231-1 bytes, (2,147,483,647 bytes) from a *) (* specified source address to a specified destination address, *) (* with separate source and destination lengths, *) (* and with fill. Overlap of the source and destination arrays *) (* does not affect the result. *) (* *) [ASYNCHRONOUS] PROCEDURE ots$move5 ( %IMMED longword_int_source_length : INTEGER; %REF source_array : ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %IMMED fill_value : INTEGER; %IMMED longword_int_dest_length : INTEGER; %REF destination_array : [VOLATILE] ARRAY [$l5..$u5:INTEGER] OF $UBYTE); EXTERNAL; (* OTS$MULC *) (* *) (* Complex Multiplication *) (* *) (* The Complex Multiplication routines *) (* calculate the complex product of two complex *) (* values. *) (* *) (*ENTRY ots$mulc ALIAS $ots_mulc PARAMETER ( *) (* F_FLOATING COMPLEX NAMED complex_multiplier IN *) (* TYPENAME f_floating_complex VALUE, *) (* F_FLOATING COMPLEX NAMED complex_multiplicand IN *) (* TYPENAME f_floating_complex VALUE ) *) (* RETURNS F_FLOATING COMPLEX NAMED RESULT TYPENAME f_floating_complex; *) (* OTS$MULCD_R3 *) (* *) (* Complex Multiplication *) (* *) (* The Complex Multiplication routines *) (* calculate the complex product of two complex *) (* values. *) (* *) (*ENTRY ots$mulcd_r3 ALIAS $ots_mulcd_r3 PARAMETER ( *) (* D_FLOATING COMPLEX NAMED complex_multiplier IN *) (* TYPENAME d_floating_complex VALUE, *) (* D_FLOATING COMPLEX NAMED complex_multiplicand IN *) (* TYPENAME d_floating_complex VALUE ) *) (* RETURNS D_FLOATING COMPLEX NAMED RESULT TYPENAME d_floating_complex; *) (* OTS$MULCG_R3 *) (* *) (* Complex Multiplication *) (* *) (* The Complex Multiplication routines *) (* calculate the complex product of two complex *) (* values. *) (* *) (*ENTRY ots$mulcg_r3 ALIAS $ots_mulcg_r3 PARAMETER ( *) (* G_FLOATING COMPLEX NAMED complex_multiplier IN *) (* TYPENAME g_floating_complex VALUE, *) (* G_FLOATING COMPLEX NAMED complex_multiplicand IN *) (* TYPENAME g_floating_complex VALUE ) *) (* RETURNS G_FLOATING COMPLEX NAMED RESULT TYPENAME g_floating_complex; *) (* OTS$MULCS *) (* *) (* Complex Multiplication *) (* *) (* The Complex Multiplication routines *) (* calculate the complex product of two complex *) (* values. *) (* *) (* OTS$MULCT_R3 *) (* *) (* Complex Multiplication *) (* *) (* The Complex Multiplication routines *) (* calculate the complex product of two complex *) (* values. *) (* *) (* OTS$CNVOUT *) (* *) (* Convert D_floating, G_floating or H_floating Number to Character String *) (* *) (* The Convert Floating to Character String routines convert *) (* a D_floating, G_floating or H_floating number *) (* to a character string in *) (* the FORTRAN E format. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cnvout ( D_G_or_H_float_pt_input_val : D_FLOAT$$TYPE; VAR fixed_length_resultant_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR; %IMMED digits_in_fraction : UNSIGNED) : INTEGER; EXTERNAL; (* OTS$CNVOUT_G *) (* *) (* Convert D_floating, G_floating or H_floating Number to Character String *) (* *) (* The Convert Floating to Character String routines convert *) (* a D_floating, G_floating or H_floating number *) (* to a character string in *) (* the FORTRAN E format. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cnvout_g ( D_G_or_H_float_pt_input_val : G_FLOAT$$TYPE; VAR fixed_length_resultant_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR; %IMMED digits_in_fraction : UNSIGNED) : INTEGER; EXTERNAL; (* OTS$CNVOUT_H *) (* *) (* Convert D_floating, G_floating or H_floating Number to Character String *) (* *) (* The Convert Floating to Character String routines convert *) (* a D_floating, G_floating or H_floating number *) (* to a character string in *) (* the FORTRAN E format. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cnvout_h ( D_G_or_H_float_pt_input_val : QUADRUPLE; VAR fixed_length_resultant_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR; %IMMED digits_in_fraction : UNSIGNED) : INTEGER; EXTERNAL; (* OTS$CNVOUT_S *) (* *) (* Convert IEEE S_floatingto Character String *) (* *) (* The Convert Floating to Character String routines convert *) (* a IEEE S_floating number to a character string in *) (* the FORTRAN E format. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cnvout_s ( D_G_H_S_or_T_float_pt_input_val : SINGLE; VAR fixed_length_resultant_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR; %IMMED digits_in_fraction : UNSIGNED) : INTEGER; EXTERNAL; (* OTS$CNVOUT_T *) (* *) (* Convert IEEE T_floating Number to Character String *) (* *) (* The Convert Floating to Character String routines convert *) (* a IEEE T_floating number to a character string in *) (* the FORTRAN E format. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cnvout_t ( D_G_H_S_or_T_float_pt_input_val : D_FLOAT$$TYPE; VAR fixed_length_resultant_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR; %IMMED digits_in_fraction : UNSIGNED) : INTEGER; EXTERNAL; (* OTS$POWCC *) (* *) (* Raise a Complex Base to a Complex Floating-Point Exponent *) (* *) (* The Raise a Complex Base to a Complex Floating-Point Exponent routines *) (* return the complex floating-point result of raising *) (* a complex base to a complex exponent. *) (* *) (*ENTRY ots$powcc ALIAS $ots_powcc PARAMETER ( *) (* F_FLOATING COMPLEX NAMED complex_base IN *) (* TYPENAME f_floating_complex VALUE, *) (* F_FLOATING COMPLEX NAMED complex_exponent_value IN *) (* TYPENAME f_floating_complex VALUE ) *) (* RETURNS F_FLOATING COMPLEX NAMED RESULT TYPENAME f_floating_complex; *) (* OTS$POWCDCD_R3 *) (* *) (* Raise a Complex Base to a Complex Floating-Point Exponent *) (* *) (* The Raise a Complex Base to a Complex Floating-Point Exponent routine *) (* returns the complex result of raising *) (* a complex base to a complex exponent. *) (* *) (*ENTRY ots$powcdcd_r3 ALIAS $ots_powcdcd_r3 PARAMETER ( *) (* D_FLOATING COMPLEX NAMED complex_base IN *) (* TYPENAME d_floating_complex VALUE, *) (* D_FLOATING COMPLEX NAMED complex_exponent_value IN *) (* TYPENAME d_floating_complex VALUE ) *) (* RETURNS D_FLOATING COMPLEX NAMED RESULT TYPENAME d_floating_complex; *) (* OTS$POWCGCG_R3 *) (* *) (* Raise a Complex Base to a Complex Floating-Point Exponent *) (* *) (* The Raise a Complex Base to a Complex Floating-Point Exponent routine *) (* returns the complex result of raising *) (* a complex base to a complex exponent. *) (* *) (*ENTRY ots$powcgcg_r3 ALIAS $ots_powcgcg_r3 PARAMETER ( *) (* G_FLOATING COMPLEX NAMED complex_base IN *) (* TYPENAME g_floating_complex VALUE, *) (* G_FLOATING COMPLEX NAMED complex_exponent_value IN *) (* TYPENAME g_floating_complex VALUE ) *) (* RETURNS G_FLOATING COMPLEX NAMED RESULT TYPENAME g_floating_complex; *) (* OTS$POWCSCS *) (* *) (* Raise a Complex Base to a Complex Floating-Point Exponent *) (* *) (* The Raise a Complex Base to a Complex Floating-Point Exponent routine *) (* returns the complex result of raising *) (* a complex base to a complex exponent. *) (* *) (* OTS$POWCTCT_R3 *) (* *) (* Raise a Complex Base to a Complex Floating-Point Exponent *) (* *) (* The Raise a Complex Base to a Complex Floating-Point Exponent routine *) (* returns the complex result of raising *) (* a complex base to a complex exponent. *) (* *) (* OTS$POWCJ *) (* *) (* Raise a Complex Base to a Signed Longword Integer Exponent *) (* *) (* The Raise a Complex Base to a Signed Longword Integer Exponent *) (* routine returns the complex result of raising a complex base to an *) (* integer exponent. *) (* *) (*ENTRY ots$powcj ALIAS $ots_powcj PARAMETER ( *) (* F_FLOATING COMPLEX NAMED complex_base IN *) (* TYPENAME f_floating_complex VALUE, *) (* LONGWORD NAMED longword_integer_exponent IN *) (* TYPENAME longword_signed VALUE ) *) (* RETURNS F_FLOATING COMPLEX NAMED RESULT TYPENAME f_floating_complex; *) (* OTS$POWCDJ_R3 *) (* *) (* Raise a Complex Base to a Signed Longword Integer Exponent *) (* *) (* The Raise a Complex Base to a Signed Longword Integer Exponent *) (* routine returns the complex result of raising a complex base to an *) (* integer exponent. *) (* *) (*ENTRY ots$powcdj_r3 ALIAS $ots_powcdj_r3 PARAMETER ( *) (* D_FLOATING COMPLEX NAMED complex_base IN *) (* TYPENAME D_floating_complex VALUE, *) (* LONGWORD NAMED longword_integer_exponent IN *) (* TYPENAME longword_signed VALUE ) *) (* RETURNS D_FLOATING COMPLEX NAMED RESULT TYPENAME d_floating_complex; *) (* OTS$POWCGJ_R3 *) (* *) (* Raise a Complex Base to a Signed Longword Integer Exponent *) (* *) (* The Raise a Complex Base to a Signed Longword Integer Exponent *) (* routine returns the complex result of raising a complex base to an *) (* integer exponent. *) (* *) (*ENTRY ots$powcgj_r3 ALIAS $ots_powcgj_r3 PARAMETER ( *) (* G_FLOATING COMPLEX NAMED complex_base IN *) (* TYPENAME g_floating_complex VALUE, *) (* LONGWORD NAMED longword_integer_exponent IN *) (* TYPENAME longword_signed VALUE ) *) (* RETURNS G_FLOATING COMPLEX NAMED RESULT TYPENAME g_floating_complex; *) (* OTS$POWCSJ *) (* *) (* Raise a Complex Base to a Signed Longword Integer Exponent *) (* *) (* The Raise a Complex Base to a Signed Longword Integer Exponent *) (* routine returns the complex result of raising a complex base to an *) (* integer exponent. *) (* *) (* OTS$POWCTJ_R3 *) (* *) (* Raise a Complex Base to a Signed Longword Integer Exponent *) (* *) (* The Raise a Complex Base to a Signed Longword Integer Exponent *) (* routines return the complex result of raising a complex base to an *) (* integer exponent. *) (* *) (* OTS$POWDD *) (* *) (* Raise a D_floating Base to D_floating Exponent *) (* *) (* The Raise a D_floating Base to a D_floating Exponent routine *) (* returns the D_floating result of raising a D_floating base to a D_floating *) (* exponent. *) (* *) (*ENTRY ots$powdd ALIAS $ots_powdd PARAMETER ( *) (* D_FLOATING NAMED D_floating_point_base IN *) (* TYPENAME d_floating VALUE, *) (* D_FLOATING NAMED D_floating_point_exponent IN *) (* TYPENAME d_floating VALUE ) *) (* RETURNS D_FLOATING NAMED RESULT TYPENAME d_floating; *) (* OTS$POWDJ *) (* *) (* Raise a D_floating Base to a Longword Exponent *) (* *) (* The Raise a D_floating Base to a Longword Exponent routine *) (* returns the D_floating result of raising a D_floating base to a longword exponent. *) (* *) (*ENTRY ots$powdj ALIAS $ots_powdj PARAMETER ( *) (* D_FLOATING NAMED D_floating_point_base IN *) (* TYPENAME d_floating VALUE, *) (* LONGWORD NAMED longword_integer_exponent IN *) (* TYPENAME longword_signed VALUE ) *) (* RETURNS D_FLOATING NAMED RESULT TYPENAME d_floating; *) (* OTS$POWDR *) (* *) (* Raise a D_floating Base to an F_floating Exponent *) (* *) (* The Raise a D_floating Base to an F_floating Exponent routines *) (* return the D_floating result of raising a D_floating base to an *) (* F_floating exponent. *) (* *) (*ENTRY ots$powdr ALIAS $ots_powdr PARAMETER ( *) (* D_FLOATING NAMED D_floating_point_base IN *) (* TYPENAME d_floating VALUE, *) (* F_FLOATING NAMED F_floating_point_exponent IN *) (* TYPENAME f_floating VALUE ) *) (* RETURNS D_FLOATING NAMED RESULT TYPENAME d_floating; *) (* OTS$POWGG *) (* *) (* Raise a G_floating Base to a G_floating Exponent *) (* *) (* The Raise a G_floating Base to a G_floating Exponent routine *) (* returns the G_floating result of raising a G_floating base to a G_floating exponent. *) (* *) (*ENTRY ots$powgg ALIAS $ots_powgg PARAMETER ( *) (* G_FLOATING NAMED G_floating_point_base IN *) (* TYPENAME g_floating VALUE, *) (* G_FLOATING NAMED G_floating_point_exponent IN *) (* TYPENAME g_floating VALUE ) *) (* RETURNS G_FLOATING NAMED RESULT TYPENAME g_floating; *) (* OTS$POWTT *) (* *) (* Raise an IEEE T_floating Base to an IEEE T_floating Exponent *) (* *) (* The Raise an IEEE T_floating Base to an IEEE T_floating Exponent routine *) (* returns the IEEE T_floating result of raising an IEEE T_floating base *) (* to an IEEE T_floating exponent. *) (* *) (* *) [ASYNCHRONOUS] FUNCTION ots$powtt ( %IMMED T_floating_point_base : INTEGER; %IMMED T_floating_point_exponent : INTEGER) : D_FLOAT$$TYPE; EXTERNAL; (* OTS$POWGJ *) (* *) (* Raise a G_floating Base to a Longword Exponent *) (* *) (* The Raise a G_floating Base to a Longword Exponent routine *) (* returns the G_floating result of raising a G_floating base to a longword exponent. *) (* *) (*ENTRY ots$powgj ALIAS $ots_powgj PARAMETER ( *) (* G_FLOATING NAMED G_floating_point_base IN *) (* TYPENAME g_floating VALUE, *) (* LONGWORD NAMED longword_integer_exponent IN *) (* TYPENAME longword_signed VALUE ) *) (* RETURNS G_FLOATING NAMED RESULT TYPENAME g_floating; *) (* OTS$POWTJ *) (* *) (* Raise an IEEE T_floating Base to a Longword Exponent *) (* *) (* The Raise and IEEE T_floating Base to a Longword Exponent routine *) (* returns the IEEE T_floating result of raising an IEEE T_floating *) (* base to a longword exponent. *) (* *) [ASYNCHRONOUS] FUNCTION ots$powtj ( %IMMED T_floating_point_base : INTEGER; %IMMED longword_integer_exponent : INTEGER) : D_FLOAT$$TYPE; EXTERNAL; (* OTS$POWHH_R3 *) (* *) (* Raise an H_floating Base to an H_floating Exponent *) (* *) (* The Raise an H_floating Base to an H_floating Exponent *) (* routine returns the H_floating result of raising an H_floating base *) (* to an H_floating exponent. *) (* *) (*ENTRY ots$powhh_r3 ALIAS $ots_powhh_r3 PARAMETER ( *) (* H_FLOATING NAMED H_floating_point_base IN *) (* TYPENAME h_floating VALUE, *) (* H_FLOATING NAMED H_floating_point_exponent IN *) (* TYPENAME h_floating VALUE ) *) (* RETURNS H_FLOATING NAMED RESULT TYPENAME h_floating; *) (* OTS$POWHJ_R3 *) (* *) (* Raise an H_floating Base to an Longword Exponent *) (* *) (* The Raise an H_floating Base to a Longword Exponent *) (* routine returns the H_floating result of raising an H_floating *) (* base to a longword exponent. *) (* *) (*ENTRY ots$powhj_r3 ALIAS $ots_powhj_r3 PARAMETER ( *) (* H_FLOATING NAMED H_floating_point_base IN *) (* TYPENAME h_floating VALUE, *) (* LONGWORD NAMED longword_integer_exponent IN *) (* TYPENAME longword_signed VALUE ) *) (* RETURNS H_FLOATING NAMED RESULT TYPENAME h_floating; *) (* OTS$POWII *) (* *) (* Raise a Word Base to a Word Exponent *) (* *) (* The Raise a Word Base to a Word Exponent routine *) (* returns the word result of raising a word base to a word exponent. *) (* *) [ASYNCHRONOUS] FUNCTION ots$powii ( %IMMED word_integer_base : INTEGER; %IMMED word_integer_exponent : INTEGER) : $WORD; EXTERNAL; (* OTS$POWJJ *) (* *) (* Raise a Longword Base to a Longword Exponent *) (* *) (* The Raise a Longword Base to a Longword Exponent routine *) (* returns the longword result of raising a signed longword *) (* base to a signed longword exponent. *) (* *) [ASYNCHRONOUS] FUNCTION ots$powjj ( %IMMED longword_integer_base : INTEGER; %IMMED longword_integer_exponent : INTEGER) : INTEGER; EXTERNAL; (* OTS$POWLULU *) (* *) (* Raise an Unsigned Longword Base to an Unsigned Longword Exponent *) (* *) (* The Raise an Unsigned Longword Base to an Unsigned Longword *) (* Exponent routine returns the unsigned longword result of *) (* raising an unsigned longword integer base to *) (* an unsigned longword integer exponent. *) (* *) [ASYNCHRONOUS] FUNCTION ots$powlulu ( %IMMED unsigned_lword_int_base : UNSIGNED; %IMMED unsigned_lword_int_exponent : UNSIGNED) : INTEGER; EXTERNAL; (* OTS$POWRD *) (* *) (* Raise an F_floating Base to D_floating Exponent *) (* *) (* The Raise an F_floating Base to a D_floating Exponent *) (* routine returns the F_floating result of raising an *) (* F_floating base to a D_floating exponent. *) (* *) (*ENTRY ots$powrd ALIAS $ots_powrd PARAMETER ( *) (* F_FLOATING NAMED F_floating_point_base IN *) (* TYPENAME f_floating VALUE, *) (* D_FLOATING NAMED D_floating_point_exponent IN *) (* TYPENAME d_floating VALUE ) *) (* RETURNS D_FLOATING NAMED RESULT TYPENAME d_floating; *) (* OTS$POWRJ *) (* *) (* Raise an F_floating Base to a Longword Exponent *) (* *) (* The Raise an F_floating Base to a Longword Exponent *) (* routine returns the F_floating result of raising an *) (* F_floating base to a longword exponent. *) (* *) [ASYNCHRONOUS] FUNCTION ots$powrj ( %IMMED F_floating_point_base : INTEGER; %IMMED longword_integer_exponent : INTEGER) : SINGLE; EXTERNAL; (* OTS$POWSJ *) (* *) (* Raise an IEEE S_floating Base to a Longword Exponent *) (* *) (* The Raise an IEEE S_floating Base to a Longword Exponent routine *) (* returns the IEEE S_floating result of raising an IEEE S_floating base *) (* to a longword exponent. *) (* *) [ASYNCHRONOUS] FUNCTION ots$powsj ( %IMMED S_floating_point_base : INTEGER; %IMMED longword_integer_exponent : INTEGER) : SINGLE; EXTERNAL; (* OTS$POWRR *) (* *) (* Raise an F_floating Base to F_floating Exponent *) (* *) (* The Raise an F_floating Base to an F_floating Exponent *) (* routine returns the F_floating result of raising an F_floating *) (* base to an F_floating exponent. *) (* *) [ASYNCHRONOUS] FUNCTION ots$powrr ( %IMMED F_floating_point_base : INTEGER; %IMMED F_floating_point_exponent : INTEGER) : SINGLE; EXTERNAL; (* OTS$POWSS *) (* *) (* Raise an IEEE S_floating Base to IEEE S_floating Exponent *) (* *) (* The Raise an IEEE S_floating Base to IEEE S_floating Exponent *) (* routines retursn the IEEE S_floating result of raising *) (* an IEEES_floating base to an IEEE S_floating exponent. *) (* *) [ASYNCHRONOUS] FUNCTION ots$powss ( %IMMED S_floating_point_base : INTEGER; %IMMED S_floating_point_exponent : INTEGER) : SINGLE; EXTERNAL; (* OTS$POWRLU *) (* *) (* Raise a Floating-Point Base to an Unsigned Longword Integer Exponent *) (* *) (* The Raise a Floating-Point Base to an Unsigned Longword Integer *) (* Exponent routines returns the floating-point result of raising *) (* a floating-point base to an unsigned longword integer exponent. *) (* *) [ASYNCHRONOUS] FUNCTION ots$powrlu ( %IMMED floating_point_base : INTEGER; %IMMED unsigned_lword_int_exponent : UNSIGNED) : SINGLE; EXTERNAL; (* OTS$POWDLU *) (* *) (* Raise a D-Floating Base to an Unsigned Longword Integer Exponent *) (* *) (* The Raise a D-Floating Base to an Unsigned Longword Integer *) (* Exponent routines returns the D-Floating result of raising *) (* a D-Floating base to an unsigned longword integer exponent. *) (* *) (*ENTRY ots$powdlu ALIAS $ots_powdlu PARAMETER ( *) (* D_FLOATING NAMED floating_point_base IN *) (* TYPENAME d_floating VALUE, *) (* LONGWORD UNSIGNED NAMED unsigned_lword_int_exponent IN *) (* TYPENAME longword_unsigned VALUE ) *) (* RETURNS D_FLOATING NAMED RESULT TYPENAME d_floating; *) (* OTS$POWGLU *) (* *) (* Raise a G_floating Base to an Unsigned Longword Integer Exponent *) (* *) (* The Raise a G-Floating Base to an Unsigned Longword Integer *) (* Exponent routines returns the G-Floating result of raising *) (* a G-Floating base to an unsigned longword integer exponent. *) (* *) (*ENTRY ots$powglu ALIAS $ots_powglu PARAMETER ( *) (* G_FLOATING NAMED floating_point_base IN *) (* TYPENAME g_floating VALUE, *) (* LONGWORD UNSIGNED NAMED unsigned_lword_int_exponent IN *) (* TYPENAME longword_unsigned VALUE ) *) (* RETURNS G_FLOATING NAMED RESULT TYPENAME g_floating; *) (* OTS$POWSLU *) (* *) (* Raise an IEEE S-Floating Base to an Unsigned Longword Integer Exponent *) (* *) (* The Raise an IEEE S-Floating Base to an Unsigned routines returns the *) (* IEEE S-flloating result of raising an IEEE S-Floating base to an *) (* unsigned longword integer exponent. *) (* *) [ASYNCHRONOUS] FUNCTION ots$powslu ( %IMMED floating_point_base : INTEGER; %IMMED unsigned_lword_int_exponent : UNSIGNED) : SINGLE; EXTERNAL; (* OTS$POWTLU *) (* *) (* Raise an IEEE T-Floating Base to an Unsigned Longword Integer Exponent *) (* *) (* The Raise and IEEE T-Floating Base to an Unsigned Longword Integer *) (* Exponent routines returns the IEEE T-Floating result of raising *) (* an IEEE T-Floating base to an unsigned longword integer exponent. *) (* *) [ASYNCHRONOUS] FUNCTION ots$powtlu ( %IMMED floating_point_base : INTEGER; %IMMED unsigned_lword_int_exponent : UNSIGNED) : D_FLOAT$$TYPE; EXTERNAL; (* OTS$POWHLU_R3 *) (* *) (* Raise an H-Floating Base to an Unsigned Longword Integer Exponent *) (* *) (* The Raise an H-Floating Base to an Unsigned Longword Integer *) (* Exponent routine returns the H-Floating result of raising *) (* an H-Floating base to an unsigned longword integer exponent. *) (* *) (*ENTRY ots$powhlu_r3 ALIAS $ots_powhlu_r3 PARAMETER ( *) (* H_FLOATING NAMED floating_point_base IN *) (* TYPENAME h_floating VALUE, *) (* LONGWORD UNSIGNED NAMED unsigned_lword_int_exponent IN *) (* TYPENAME longword_unsigned VALUE ) *) (* RETURNS H_FLOATING NAMED RESULT TYPENAME h_floating; *) (* OTS$SCOPY_DXDX *) (* *) (* Copy a Source String Passed by Descriptor to a Destination String *) (* *) (* The Copy a Source String Passed by Descriptor to a Destination String *) (* routine *) (* copies a source string to a destination string. Both strings are *) (* passed by descriptor. *) (* *) [ASYNCHRONOUS] FUNCTION ots$scopy_dxdx ( source_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; VAR destination_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR) : $UWORD; EXTERNAL; (* OTS$SCOPY_R_DX *) (* *) (* Copy a Source String Passed by Reference to a Destination String *) (* *) (* The Copy a Source String Passed by Reference to a Destination String *) (* routine copies a source string passed by reference to a destination *) (* string. *) (* *) [ASYNCHRONOUS] FUNCTION ots$scopy_r_dx ( %IMMED word_int_source_length_val : INTEGER; %REF source_string_address : PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR; VAR destination_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l3..$u3:INTEGER] OF CHAR) : $UWORD; EXTERNAL; (* OTS$SFREE1_DD *) (* *) (* Strings, Free One Dynamic *) (* *) (* The Free One Dynamic String routine *) (* returns one dynamic string area to free storage. *) (* *) [ASYNCHRONOUS] PROCEDURE ots$sfree1_dd ( VAR dynamic_descriptor : [VOLATILE] $UQUAD); EXTERNAL; (* OTS$SFREEN_DD *) (* *) (* Strings, Free n Dynamic *) (* *) (* The Free n Dynamic Strings routine *) (* takes as input a vector of one or more dynamic string areas and *) (* returns them to free storage. *) (* *) [ASYNCHRONOUS] PROCEDURE ots$sfreen_dd ( %IMMED descriptor_count_value : UNSIGNED; VAR first_descriptor : [VOLATILE] $UQUAD); EXTERNAL; (* OTS$SGET1_DD *) (* *) (* Strings, Get One Dynamic *) (* *) (* The Get One Dynamic String routine *) (* allocates a specified number of bytes of dynamic virtual *) (* memory to a specified string descriptor. *) (* *) [ASYNCHRONOUS] PROCEDURE ots$sget1_dd ( %IMMED word_integer_length_value : INTEGER; VAR dynamic_descriptor : [VOLATILE] $UQUAD); EXTERNAL; (* OTS$CVT_L_TB *) (* *) (* Convert an Unsigned Integer to Binary Text *) (* *) (* The Convert an Unsigned Integer to Binary Text routine *) (* converts an unsigned integer value of arbitrary length to *) (* binary representation in an ASCII text string. By default, a longword is *) (* converted. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_l_tb ( %REF varying_input_value : [UNSAFE] ARRAY [$l1..$u1:INTEGER] OF $UBYTE; VAR fixed_length_resultant_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR; %IMMED number_of_digits : INTEGER := %IMMED 0; %IMMED input_value_size : INTEGER := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_L_TI *) (* *) (* Convert Signed Integer to Decimal Text *) (* *) (* The Convert Signed Integer to Decimal Text routine *) (* converts a signed integer to a decimal ASCII text string. This *) (* routine supports FORTRAN Iw and Iw.m output and BASIC output conversion. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_l_ti ( %REF varying_input_value : [UNSAFE] ARRAY [$l1..$u1:INTEGER] OF $UBYTE; VAR fixed_length_resultant_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR; %IMMED number_of_digits : INTEGER := %IMMED 0; %IMMED input_value_size : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_L_TL *) (* *) (* Convert Integer to Logical Text *) (* *) (* The Convert Integer to Logical Text routine *) (* converts an integer to an ASCII text string representation *) (* using FORTRAN L (logical) format. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_l_tl ( longword_integer_value : INTEGER; VAR fixed_length_resultant_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR) : INTEGER; EXTERNAL; (* OTS$CVT_L_TO *) (* *) (* Convert Unsigned Integer to Octal Text *) (* *) (* The Convert Unsigned Integer to Octal Text routine *) (* converts an unsigned integer to an octal ASCII text string. *) (* OTS$CVT_L_TO supports FORTRAN Ow and Ow.m output conversion formats. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_l_to ( %REF varying_input_value : [UNSAFE] ARRAY [$l1..$u1:INTEGER] OF $UBYTE; VAR fixed_length_resultant_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR; %IMMED number_of_digits : INTEGER := %IMMED 0; %IMMED input_value_size : INTEGER := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_L_TU *) (* *) (* Convert Unsigned Integer to Decimal Text *) (* *) (* The Convert Unsigned Integer to Decimal Text routine *) (* converts a byte, word or longword value to unsigned decimal *) (* representation in an ASCII text string. By default, a longword is *) (* converted. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_l_tu ( %REF varying_input_value : [UNSAFE] ARRAY [$l1..$u1:INTEGER] OF $UBYTE; VAR fixed_length_resultant_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR; %IMMED number_of_digits : INTEGER := %IMMED 0; %IMMED input_value_size : INTEGER := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_L_TZ *) (* *) (* Convert Integer to Hexadecimal Text *) (* *) (* The Convert Integer to Hexadecimal Text routine *) (* converts an unsigned integer to a hexadecimal ASCII text *) (* string. OTS$CVT_L_TZ supports FORTRAN Zw and Zw.m output conversion *) (* formats. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_l_tz ( %REF varying_input_value : [UNSAFE] ARRAY [$l1..$u1:INTEGER] OF $UBYTE; VAR fixed_length_resultant_string : [CLASS_S,VOLATILE] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR; %IMMED number_of_digits : INTEGER := %IMMED 0; %IMMED input_value_size : INTEGER := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_TB_L *) (* *) (* Convert Binary Text to Unsigned Integer *) (* *) (* The Convert Binary Text to Unsigned Integer routine *) (* converts an ASCII text string representation of an unsigned *) (* binary value to an unsigned integer value of arbitrary length. By default, *) (* the result is a longword. Valid input characters are the blank and the *) (* digits 0 and 1. No sign is permitted. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_tb_l ( input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; %REF varying_output_value : [VOLATILE,UNSAFE] ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %IMMED output_value_size : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_TI_L *) (* *) (* Convert Signed Integer Text to Integer *) (* *) (* The Convert Signed Integer Text to Integer routine *) (* converts an ASCII text string representation of a decimal *) (* number to a signed byte, word, or longword integer value. *) (* The result is a longword by *) (* default, but the calling program can specify a byte or a word value *) (* instead. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_ti_l ( fixed_or_dynamic_input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; %REF varying_output_value : [VOLATILE,UNSAFE] ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %IMMED output_value_size : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_TL_L *) (* *) (* Convert Logical Text to Integer *) (* *) (* The Convert Logical Text to Integer routine *) (* converts an ASCII text string representation of a FORTRAN-77 L *) (* format to a byte, word, or longword integer value. The result is a longword by *) (* default, but the calling program can specify a byte or a word value *) (* instead. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_tl_l ( fixed_or_dynamic_input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; %REF varying_output_value : [VOLATILE,UNSAFE] ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %IMMED output_value_size : INTEGER := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_TO_L *) (* *) (* Convert Octal Text to Signed Integer *) (* *) (* The Convert Octal Text to Signed Integer routine *) (* converts an ASCII text string representation of an *) (* octal value to an signed integer of an arbitrary length. The result is a *) (* longword by default, but the calling program can specify a byte, word, *) (* or longword. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_to_l ( fixed_or_dynamic_input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; %REF varying_output_value : [VOLATILE,UNSAFE] ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %IMMED output_value_size : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_TU_L *) (* *) (* Convert Unsigned Decimal Text to Integer *) (* *) (* The Convert Unsigned Decimal Text to Integer routine *) (* converts an ASCII text string representation of an unsigned *) (* decimal value to an unsigned byte, word, or longword value. By default, the *) (* result is a longword. Valid input characters are the space and the digits 0 *) (* through 9. No sign is permitted. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_tu_l ( fixed_length_input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; %REF varying_output_value : [VOLATILE,UNSAFE] ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %IMMED output_value_size : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0) : INTEGER; EXTERNAL; (* OTS$CVT_TZ_L *) (* *) (* Convert Hexadecimal Text to Unsigned Integer *) (* *) (* The Convert Hexadecimal Text to Unsigned Integer routine *) (* converts an ASCII text string representation of an unsigned *) (* hexadecimal value to an unsigned integer of an arbitrary length. *) (* The result is a longword by default, but the calling program can specify *) (* a byte, word, or longword *) (* value. *) (* *) [ASYNCHRONOUS] FUNCTION ots$cvt_tz_l ( fixed_or_dynamic_input_string : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; %REF varying_output_value : [VOLATILE,UNSAFE] ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %IMMED output_value_size : INTEGER := %IMMED 0; %IMMED flags_value : UNSIGNED := %IMMED 0) : INTEGER; EXTERNAL; (* END. *) END.