! *** PREDECLARED TYPES %IF %DECLARED ( %BASIC$QUADWORD_DECLARED ) = 0 %THEN RECORD BASIC$QUADWORD LONG FILL ( 2 ) END RECORD %LET %BASIC$QUADWORD_DECLARED = 1 %END %IF %IF %DECLARED ( %BASIC$OCTAWORD_DECLARED ) = 0 %THEN RECORD BASIC$OCTAWORD LONG FILL ( 4 ) END RECORD %LET %BASIC$OCTAWORD_DECLARED = 1 %END %IF %IF %DECLARED ( %BASIC$HFLOAT_AXP_DECLARED ) = 0 %THEN RECORD BASIC$HFLOAT_AXP LONG FILL ( 4 ) END RECORD %LET %BASIC$HFLOAT_AXP_DECLARED = 1 %END %IF %IF %DECLARED ( %BASIC$F_FLOATING_COMPLEX_DECL ) = 0 %THEN RECORD BASIC$F_FLOATING_COMPLEX SINGLE REAL_PART SINGLE IMAGINARY_PART END RECORD %LET %BASIC$F_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED ( %BASIC$D_FLOATING_COMPLEX_DECL ) = 0 %THEN RECORD BASIC$D_FLOATING_COMPLEX DOUBLE REAL_PART DOUBLE IMAGINARY_PART END RECORD %LET %BASIC$D_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED ( %BASIC$G_FLOATING_COMPLEX_DECL ) = 0 %THEN RECORD BASIC$G_FLOATING_COMPLEX GFLOAT REAL_PART GFLOAT IMAGINARY_PART END RECORD %LET %BASIC$G_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED ( %BASIC$H_FLOAT_AXP_CMPLX_DCL ) = 0 %THEN RECORD BASIC$H_FLOATING_COMPLEX_AXP BASIC$HFLOAT_AXP REAL_PART BASIC$HFLOAT_AXP IMAGINARY_PART END RECORD %LET %BASIC$H_FLOAT_AXP_CMPLX_DCL = 1 %END %IF ! *************************************************************************** ! * ! COPYRIGHT (c) 1988, 1994, 1995 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. * ! * ! * ! *************************************************************************** ! STR$ADD ! ! Add Two Decimal Strings ! ! The Add Two Decimal Strings routine ! adds two decimal strings of digits. ! EXTERNAL LONG FUNCTION str$add & ( & LONG BY REF, & LONG BY REF, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & STRING BY DESC & ) ! STR$ANALYZE_SDESC ! ! Analyze String Descriptor ! ! The Analyze String Descriptor routine extracts the ! length and starting address of the data ! for a variety of string descriptor classes. ! EXTERNAL WORD FUNCTION str$analyze_sdesc & ( & STRING BY DESC, & WORD BY REF, & LONG BY REF & ) ! STR$ANALYZE_SDESC_64 ! ! Analyze String Descriptor (quadword output parameters) ! ! The Analyze String Descriptor routine extracts the ! length and starting address of the data ! for a variety of string descriptor classes. ! EXTERNAL LONG FUNCTION str$analyze_sdesc_64 & ( & STRING BY DESC, & BASIC$QUADWORD BY REF, & LONG BY REF, & OPTIONAL WORD BY REF & ) ! STR$APPEND ! ! Append String ! ! The Append String routine appends a source string to the end of a ! destination string. The destination string must be a dynamic or ! varying-length string. ! EXTERNAL LONG FUNCTION str$append & ( & STRING BY DESC, & STRING BY DESC & ) ! STR$CASE_BLIND_COMPARE ! ! Compare Strings Without Regard to Case ! ! The Compare Strings Without Regard to Case routine compares two input ! strings of any supported class and data type without regard to whether ! the alphabetic characters are uppercase or lowercase. ! EXTERNAL LONG FUNCTION str$case_blind_compare & ( & STRING BY DESC, & STRING BY DESC & ) ! STR$COMPARE ! ! Compare Two Strings ! ! The Compare Two Strings routine compares the ! contents of two strings. ! EXTERNAL LONG FUNCTION str$compare & ( & STRING BY DESC, & STRING BY DESC & ) ! STR$COMPARE_EQL ! ! Compare Two Strings for Equality ! ! The Compare Two Strings for Equality routine, compares two ! strings to see if they have the same length and contents. ! Uppercase and lowercase characters are not considered equal. ! EXTERNAL LONG FUNCTION str$compare_eql & ( & STRING BY DESC, & STRING BY DESC & ) ! STR$COMPARE_MULTI ! ! Compare Two Strings for Equality Using Multinational Character Set ! ! The Compare Two Strings for Equality Using Multinational Character ! Set routine compares two character strings for equality using the ! DEC Multinational character set. ! EXTERNAL LONG FUNCTION str$compare_multi & ( & STRING BY DESC, & STRING BY DESC, & OPTIONAL LONG BY VALUE, & LONG BY VALUE & ) ! STR$CONCAT ! ! Concatenate Two or More Strings ! ! The Concatenate Two or More Strings routine concatenates all specified ! source strings into a single destination string. ! EXTERNAL LONG FUNCTION str$concat & ( & STRING BY DESC, & STRING BY DESC, OPTIONAL,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, & ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, & ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, & ) ! STR$COPY_DX ! ! 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. ! EXTERNAL LONG FUNCTION str$copy_dx & ( & STRING BY DESC, & STRING BY DESC & ) ! STR$COPY_R ! ! 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. ! EXTERNAL LONG FUNCTION str$copy_r & ( & STRING BY DESC, & WORD BY REF, & STRING BY REF & ) ! STR$COPY_R_64 ! ! 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. ! EXTERNAL LONG FUNCTION str$copy_r_64 & ( & STRING BY DESC, & BASIC$QUADWORD BY REF, & STRING BY REF & ) ! STR$DIVIDE ! ! Divide Two Decimal Strings ! ! The Divide Two Decimal Strings routine divides two decimal strings. ! EXTERNAL LONG FUNCTION str$divide & ( & LONG BY REF, & LONG BY REF, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & LONG BY REF, & LONG BY REF, & STRING BY DESC & ) ! STR$DUPL_CHAR ! ! Duplicate Character Times ! ! The Duplicate Character empty Times routine generates a string ! containing n duplicates of the input character. If the destination ! string is an empty dynamic string descriptor, STR$DUPL_CHAR will ! allocate and initialize the string. ! EXTERNAL LONG FUNCTION str$dupl_char & ( & STRING BY DESC, & OPTIONAL LONG BY REF, & STRING BY REF & ) ! STR$ELEMENT ! ! Extract Delimited Element Substring ! ! The Extract Delimited Element Substring routine extracts an ! element from a string in which the elements are separated ! by a specified delimiter. ! EXTERNAL LONG FUNCTION str$element & ( & STRING BY DESC, & LONG BY REF, & STRING BY DESC, & STRING BY DESC & ) ! STR$FIND_FIRST_IN_SET ! ! Find First Character in a Set of Characters ! ! The Find First Character in a Set of Characters routine searches a ! string one character at a time, from left to right, comparing each ! character in the string to every character in a specified set of ! characters for which it is searching. ! EXTERNAL LONG FUNCTION str$find_first_in_set & ( & STRING BY DESC, & STRING BY DESC & ) ! STR$FIND_FIRST_NOT_IN_SET ! ! Find First Character that Does Not Occur in Set ! ! The Find First Character that Does Not Occur in Set routine searches ! a string, comparing each character to the characters in a specified ! set of characters. The string is searched character by character, ! from left to right. STR$FIND_FIRST_NOT_IN_SET returns the position of ! the first character in the string that does not match any of the ! characters in the selected set of characters. ! EXTERNAL LONG FUNCTION str$find_first_not_in_set & ( & STRING BY DESC, & STRING BY DESC & ) ! STR$FIND_FIRST_SUBSTRING ! ! Find First Substring in Input String ! ! The Find First Substring in Input String routine ! finds the first substring (in a provided list of ! substrings) occurring in a given string. ! EXTERNAL LONG FUNCTION str$find_first_substring & ( & STRING BY DESC, & LONG BY REF, & LONG BY REF, & OPTIONAL STRING BY DESC,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, & ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, & ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, & ) ! STR$FREE1_DX ! ! Free One Dynamic String ! ! The Free One Dynamic String routine deallocates one dynamic string. ! EXTERNAL LONG FUNCTION str$free1_dx & ( & STRING BY DESC & ) ! STR$GET1_DX ! ! Allocate One Dynamic String ! ! The Allocate One Dynamic String routine allocates a specified number ! of bytes of dynamic virtual memory to a specified dynamic string ! descriptor. ! EXTERNAL LONG FUNCTION str$get1_dx & ( & WORD BY REF, & STRING BY DESC & ) ! STR$GET1_DX_64 ! ! Allocate One Dynamic String (quadword parameter) ! ! The Allocate One Dynamic String routine allocates a specified number ! of bytes of dynamic virtual memory to a specified dynamic string ! descriptor. ! EXTERNAL LONG FUNCTION str$get1_dx_64 & ( & BASIC$QUADWORD BY REF, & STRING BY DESC & ) ! STR$LEFT ! ! Extract a Substring of a String ! ! The Extract a Substring of a String routine copies a substring of a ! source string into a destination string. The relative starting ! position in the source string is 1. ! EXTERNAL LONG FUNCTION str$left & ( & STRING BY DESC, & STRING BY DESC, & LONG BY REF & ) ! STR$LEN_EXTR ! ! Extract a Substring of a String ! ! The Extract a Substring of a String routine copies a substring of ! a source string into a destination string. ! EXTERNAL LONG FUNCTION str$len_extr & ( & STRING BY DESC, & STRING BY DESC, & LONG BY REF, & LONG BY REF & ) ! STR$MATCH_WILD ! ! Match Wildcard Specification ! ! The Match Wildcard Specification routine is used to compare a pattern ! string that includes wildcard characters with a candidate string. It ! returns a condition value of STR$_MATCH if the strings match and ! line_break STR$_NOMATCH if they do not match. ! EXTERNAL LONG FUNCTION str$match_wild & ( & STRING BY DESC, & STRING BY DESC & ) ! STR$MUL ! ! Multiply Two Decimal Strings ! ! The Multiply Two Decimal Strings routine multiplies two decimal strings. ! EXTERNAL LONG FUNCTION str$mul & ( & LONG BY REF, & LONG BY REF, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & STRING BY DESC & ) ! STR$POSITION ! ! Return Relative Position of Substring ! ! The Return Relative Position of Substring routine searches for the ! first occurrence of a single substring within a source string. If ! STR$POSITION finds the substring, it returns the relative position ! of that substring. If the substring is not found, STR$POSITION ! returns a zero. ! EXTERNAL LONG FUNCTION str$position & ( & STRING BY DESC, & STRING BY DESC, & OPTIONAL LONG BY REF & ) ! STR$POS_EXTR ! ! Extract a Substring of a String ! ! The Extract a Substring of a String routine copies a substring of a ! source string into a destination string. ! EXTERNAL LONG FUNCTION str$pos_extr & ( & STRING BY DESC, & STRING BY DESC, & LONG BY REF, & LONG BY REF & ) ! STR$PREFIX ! ! Prefix a String ! ! The Prefix a String routine inserts a source string at the ! beginning of a destination string. The destination string ! must be dynamic or varying length. ! EXTERNAL LONG FUNCTION str$prefix & ( & STRING BY DESC, & STRING BY DESC & ) ! STR$RECIP ! ! Reciprocal of a Decimal String ! ! The Reciprocal of a Decimal String routine takes the reciprocal of the ! first decimal string to the precision limit specified by the second ! decimal string and returns the result as a decimal string. ! EXTERNAL LONG FUNCTION str$recip & ( & LONG BY REF, & LONG BY REF, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & STRING BY DESC & ) ! STR$REPLACE ! ! Replace a Substring ! ! The Replace a Substring routine copies a source string to a ! destination string, replacing part of the string with another ! string. The substring to be replaced is specified by its starting ! and ending positions. ! EXTERNAL LONG FUNCTION str$replace & ( & STRING BY DESC, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & STRING BY DESC & ) ! STR$RIGHT ! ! Extract a Substring of a String ! ! The Extract a Substring of a String routine copies a substring ! of a source string into a destination string. ! EXTERNAL LONG FUNCTION str$right & ( & STRING BY DESC, & STRING BY DESC, & LONG BY REF & ) ! STR$ROUND ! ! Round or Truncate a Decimal String ! ! The Round or Truncate a Decimal String routine rounds or truncates a ! decimal string to a specified number of significant digits and places ! the result in another decimal string. ! EXTERNAL LONG FUNCTION str$round & ( & LONG BY REF, & LONG BY REF, & LONG BY REF, & LONG BY REF, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & STRING BY DESC & ) ! STR$TRANSLATE ! ! Translate Matched Characters ! ! The Translate Matched Characters routine successively compares each ! character in a source string to all characters in a match string. ! If a source character has a match, the destination character is taken ! from the translate string. Otherwise, STR$TRANSLATE moves the source ! character to the destination string. ! EXTERNAL LONG FUNCTION str$translate & ( & STRING BY DESC, & STRING BY DESC, & STRING BY DESC, & STRING BY DESC & ) ! STR$TRIM ! ! Trim Trailing Blanks and Tabs ! ! The Trim Trailing Blanks and Tabs routine copies a source string ! to a destination string and deletes the trailing blank and tab ! characters. ! EXTERNAL LONG FUNCTION str$trim & ( & STRING BY DESC, & STRING BY DESC, & OPTIONAL WORD BY REF & ) ! STR$UPCASE ! ! Convert String to All Uppercase Characters ! ! The Convert String to All Uppercase Characters routine ! converts a source string to uppercase. ! EXTERNAL LONG FUNCTION str$upcase & ( & STRING BY DESC, & STRING BY DESC & )