Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-08 - 43,50476/fasp.rnd
There are 2 other files named fasp.rnd in the archive. Click here to see a list.
.TITLE
.SUBTITLE
.NO NUMBER
.NOFILL
.CENTER
^^FASP U\\SER'S ^GUIDE
.SKIP
.CENTER
(^^FORTRAN A\\LPHAMERIC ^SUBROUTINE ^PACKAGE)
.SKIP
.CENTER
24 ^JUNE 1978
.SKIP 5
^^FFFFFFFFFFFFFF    AA             SSSSSSSSSS   PPPPPPPPPP
FFFF             AAAA         SSSSS           PPPP    PPPPP
FFFF            AAAAAA       SSSS             PPPP      PPPP
FFFF           AAAA  AA       SSSSS           PPPP      PPPP
FFFF          AAAA    AA         SSSSSS       PPPP    PPPPP
FFFFFFFFF    AAAA      AA            SSSSS    PPPPPPPPPP
FFFF        AAAAAAAAAAAAAA             SSSS   PPPP
FFFF        AAAA        AA           SSSSS    PPPP
FFFF        AAAA        AA   SSSSSSSSSS       PPPP
.SKIP 3
UU     UU     SSSSSS   EEEEEEEE   RRRRRRR     '''     SSSSSS
UU     UU   SS         EE         RR     RR    ''   SS
UU     UU   SS         EE         RR     RR   ''    SS
UU     UU     SSSS     EEEEEE     RRRRRRR             SSSS
UU     UU         SS   EE         RR   RR                 SS
 UU   UU          SS   EE         RR    RR                SS
  UUUUU     SSSSSS     EEEEEEEE   RR     RR         SSSSSS
.SKIP 3
   GGGGGGG    UU     UU    IIIIII    DDDDDDD       EEEEEEEEE
 GG           UU     UU      II      DD     DD     EE
GG            UU     UU      II      DD      DD    EE
GG    GGGG    UU     UU      II      DD      DD    EEEEEE
GG      GG    UU     UU      II      DD      DD    EE
 GG     GG     UU   UU       II      DD     DD     EE
   GGGGGGG      UUUUU      IIIIII    DDDDDDD       EEEEEEEEE
.SKIP 5
.CENTER
D\\ONALD ^E. ^BARTH
.SKIP
.CENTER
^DIVISION OF ^COMPUTER ^SERVICES
.SKIP
.CENTER
^GRADUATE ^SCHOOL OF ^BUSINESS ^ADMINISTRATION
.SKIP
.CENTER
^HARVARD ^UNIVERSITY
.PAGE
.FILL
.CENTER
^AN ^INTRODUCTION TO THE ^^FORTRAN A\\LPHAMERIC ^SUBROUTINE ^PACKAGE
.CENTER
-- ------------ -- --- ------- ---------- ---------- -------
.SKIP
.NUMBER PAGE 2
.TITLE ^^FASP, FORTRAN A\\LPHAMERIC ^SUBROUTINE ^PACKAGE
.SUBTITLE ^AN ^INTRODUCTION TO THE ^^FORTRAN A\\LPHAMERIC ^SUBROUTINE ^PACKAGE
^^FASP, \A FORTRAN A\\LPHAMERIC ^SUBROUTINE ^PACKAGE, IS A PACKAGE
OF ^^FORTRAN \\SUBROUTINES WHICH PROVIDE ALPHAMERIC INPUT/OUTPUT
FEATURES NOT PROVIDED DIRECTLY BY ^^FORTRAN. M\\OST OF THE
SUBROUTINES IN THIS PACKAGE EITHER WRITE CHARACTERS WITH A MULTIPLE
OF AN ^A1 FORMAT, OR ELSE GENERATE, MANIPULATE OR INTERPRET
CHARACTERS WHICH THE CALLING PROGRAM HAS READ IN WITH OR WILL WRITE
OUT WITH A MULTIPLE OF AN ^A1 FORMAT. ^THE FOLLOWING TYPES OF
ROUTINES ARE INCLUDED IN THIS PACKAGE.
.LEFT MARGIN 5
.BREAK
.SKIP
.INDENT -3
^A.#^ROUTINES WHICH EVALUATE THE WORDS, NUMBERS OR COMBINATIONS OF
THESE WHICH THE USER HAS TYPED.
.INDENT -3
^B.#^ROUTINES WHICH GENERATE THE REPRESENTATIONS OF NUMBERS.
.INDENT -3
^C.#^ROUTINES WHICH ALLOW THE USER TO SPECIFY BY NAME AND
SUBSCRIPTS, TO EXAMINE AND TO MANIPULATE THE VALUES OF MULTIPLY
SUBSCRIPTED ^^FORTRAN \\ARRAYS WHICH ARE EQUIVALENCED WITH OR
OTHERWISE LOADED INTO SINGLY SUBSCRIPTED BUFFERS.
.INDENT -3
^D.#^ROUTINES WHICH PERFORM TAB CHARACTER TO SPACE CONVERSIONS,
LOWER CASE LETTER TO UPPER CASE CONVERSIONS, AND OTHER MANIPULATIONS
OF TEXT.
.INDENT -3
^E.#^ROUTINES WHICH GENERATE BAR CHARTS, POINT AND LINE PLOTS,
VERTICAL TIME AXIS PLOTS AND PIN MAPS.
.INDENT -3
^F.#^ROUTINES WHICH GENERATE LARGE MULTIPLE-LINE LETTERING.
.LEFT MARGIN 0
.SKIP
^THIS DOCUMENTATION AND ALL PROGRAMS AND ROUTINES DESCRIBED IN THIS
DOCUMENTATION WERE WRITTEN AT ^^PDP-10 (DEC\\SYSTEM-10)
INSTALLATIONS AT ^AIKEN ^COMPUTATION ^LABORATORY OF ^HARVARD
^UNIVERSITY, AND AT THE ^HARVARD ^BUSINESS ^SCHOOL BY ^DONALD ^E_.
^BARTH, WHO CAN BE CONTACTED AT THE FOLLOWING ADDRESS
.NOFILL
.LEFT MARGIN 5
.SKIP
^DIVISION OF ^COMPUTER ^SERVICES, ^BAKER ^LIBRARY 21
^GRADUATE ^SCHOOL OF ^BUSINESS ^ADMINISTRATION
^HARVARD#^UNIVERSITY, ^SOLDIERS ^FIELD
^BOSTON, ^MASSACHUSETTS 02163
.SKIP
.FILL
.LEFT MARGIN 0
^THE AUTHOR REQUESTS THAT THE COMMENT LINES STATING HIS NAME BE
RETAINED IN THE ROUTINES AND PROGRAMS WHICH FORM THIS PACKAGE AND
WHICH ARE DESCRIBED IN THIS DOCUMENT.
.SKIP
^THE ROUTINES DESCRIBED IN THIS DOCUMENTATION WERE WRITTEN FOR
SPECIFIC APPLICATIONS IN WHICH THESE ROUTINES APPEAR TO PRODUCE THE
EXPECTED RESULTS. ^HOWEVER, ^^FASP \\INCLUDES OVER 6000 ^^FORTRAN
\\STATEMENTS, AND THE ROUTINES IN THE PACKAGE HAVE UP TO 37
ARGUMENTS EACH IN THEIR CALLING SEQUENCES. ^ANY PACKAGE OF THIS SIZE
AND COMPLEXITY WILL CONTAIN ERRORS, AND CANNOT PRODUCE REASONABLE
RESULTS FOR ALL POSSIBLE ILLOGICAL VALUES OF THE INPUT ARGUMENTS.
^NEITHER THE AUTHOR, NOR ^HARVARD ^UNIVERSITY, ASSUME ANY
RESPONSIBILITY FOR ERRORS IN THE DOCUMENTATION OF THIS PACKAGE, FOR
MALFUNCTIONS OF THE ROUTINES WITHIN THIS PACKAGE, OR FOR
DIFFICULTIES WHICH MAY ARISE IN THE USE OF THESE ROUTINES.
.SKIP
^THIS MANUAL CONTAINS A COLLECTION OF 1 LINE DESCRIPTIONS OF EACH OF
THE ROUTINES IN THIS PACKAGE, FOLLOWED BY A COLLECTION OF 1
PARAGRAPH DESCRIPTIONS OF EACH OF THE ROUTINES, AND FINALLY A
COLLECTION OF DETAILED MULTIPLE-PAGE DESCRIPTIONS OF EACH OF THE
ROUTINES. ^EACH OF THESE COLLECTIONS IS ARRANGED IN THE ALPHABETICAL
ORDER OF THE ROUTINE NAMES. ^EACH DETAILED DESCRIPTION CONTAINS A
SUMMARY OF THE PURPOSE OF THE ROUTINE, A LISTING OF THE ^^SUBROUTINE
\\STATEMENT AS FOUND IN THE ROUTINE AND OF THE ^^DIMENSION
\\STATEMENT IF ANY, AND A DESCRIPTION OF EACH OF THE VARIABLES AND
ARRAYS IN THE ORDER IN WHICH THEY APPEAR IN THE ARGUMENT LIST. ^A
FEW OF THE ROUTINES IN THIS PACKAGE WHICH HAVE ARGUMENT LISTS WHICH
INCLUDE ALL OF THE ARGUMENTS OF THE PRIMITIVES WHICH THEY CALL ARE
DESCRIBED IN THE DOCUMENTATION OF THESE PRIMITIVES, RATHER THAN
SEPARATELY SO AS TO PREVENT DUPLICATION OF THE DESCRIPTIONS OF THE
IDENTICAL ARGUMENTS. ^THE 1 PARAGRAPH DESCRIPTIONS SPECIFY THE
LOCATIONS OF THE DETAILED DESCRIPTIONS OF SUCH WRAPPER ROUTINES AND
SIMILARLY SPECIFY THE LOCATIONS OF THE DETAILED DESCRIPTIONS OF THE
REDUCED CAPABILITY VERSIONS WHICH ARE SUPPLIED AS ALTERNATIVES FOR
SOME OF THE ROUTINES. ^AT THE END OF THE DETAILED DESCRIPTION WILL
USUALLY BE FOUND A LISTING OF A PROGRAM WHICH CALLS THE ROUTINE AND
A LISTING OF A TYPICAL PROGRAM-USER DIALOG. ^SUCH CALLING PROGRAMS
RANGE FROM SIMPLE INTERACTIVE DEMONSTRATIONS TO THE PROTOTYPES OF
THE APPLICATION PROGRAMS FOR WHICH THE ROUTINES WERE WRITTEN.
.SKIP
^IN THE ARGUMENT LISTS OF MOST OF THE ROUTINES DESCRIBED IN THIS
DOCUMENTATION, INPUT ARGUMENTS WHICH ARE RETURNED UNCHANGED APPEAR
FIRST, ARGUMENTS WHICH ARE USED BOTH FOR INPUT TO THIS ROUTINE AND
FOR OUTPUT FROM THIS ROUTINE EITHER TO THE CALLING PROGRAM OR TO THE
SUBSEQUENT CALL TO THE SAME ROUTINE APPEAR NEXT, AND ARGUMENTS FOR
WHICH THE INPUT VALUES ARE IGNORED AND WHICH ARE USED ONLY FOR
OUTPUT APPEAR LAST. ^THE ARGUMENT LISTS OF A FEW OF THE OLDER
ROUTINES IN THIS PACKAGE ARE NOT ARRANGED IN THIS MANNER, BUT THESE
ARGUMENT LISTS ARE USUALLY SHORT ANYWAY. ^ARGUMENTS HAVING THE SAME
NAMES IN DIFFERENT ROUTINES OFTEN HAVE SIMILAR DEFINITIONS.
^HOWEVER, SUCH DEFINITIONS CAN VARY IN OBSCURE WAYS. ^FOR EXAMPLE,
THE ARGUMENT NAMED ^^LOWBFR \\IS RETURNED POINTING TO THE CHARACTER
TO THE RIGHT OF AN ILLEGAL CHARACTER BY ^^DASPAN \\AND ^^DANEXT,
\\BUT IS RETURNED POINTING TO THE ILLEGAL CHARACTER ITSELF BY MOST
OF THE OTHER ROUTINES.
.SKIP
^THE PROGRAMS AND ROUTINES IN THIS PACKAGE ARE WRITTEN IN MACHINE
INDEPENDENT ^^FORTRAN \\BUT DO REQUIRE THAT THE COMPILER SUPPORT THE
1^H NOTATION IN ^^DATA \\STATEMENTS TO DEFINE 1 CHARACTER PER ARRAY
LOCATION, AND THAT THE RUNTIME SYSTEM BE ABLE TO USE THE ^A1 FORMAT
TO READ A SINGLE CHARACTER INTO A SINGLE ARRAY LOCATION OR TO WRITE
OUT AN ARRAY LOCATION CONTAINING SUCH A SINGLE CHARACTER. ^THE FILL
CHARACTERS TO PAD TO THE FULL WORD SIZE OF THE PARTICULAR COMPUTER
BEING USED ARE OF NO CONCERN EXCEPT THAT THE FILL CHARACTERS
SUPPLIED DURING READING WITH AN ^A1 FORMAT MUST MATCH THOSE SUPPLIED
WHEN THE 1^H NOTATION IS USED IN ^^DATA \\STATEMENTS. ^IF THE
ROUTINES IN THIS PACKAGE ARE USED ON SOME ^^IBM 370 \\SYSTEMS IN
WHICH THE 1^H NOTATION IN ^^DATA \\STATEMENTS RESULTS IN PADDING
WITH ZERO CHARACTER CODES WHILE CHARACTERS READ WITH A MULTIPLE OF
AN ^A1 FORMAT ARE PADDED WITH SPACE CHARACTERS, THEN IT WILL BE
NECESSARY TO CHANGE THE CHARACTER DEFINITIONS IN THE ^^DATA
\\STATEMENTS IN THESE ROUTINES FROM 1^H NOTATION TO 4^H NOTATION AND
TO INSERT 3 EXTRA SPACES TO THE RIGHT OF EACH CHARACTER SO DEFINED.
.SKIP
^MOST OF THE ARGUMENTS OF THESE ROUTINES HAVE NAMES WHICH BEGIN WITH
THE LETTERS ^I THROUGH ^N AND MUST CONTAIN EITHER INTEGER VALUES OR
ELSE CHARACTERS WHICH HAVE EACH BEEN READ BY THE USE OF AN ^A1
FORMAT OR WHICH HAVE BEEN DEFINED USING A 1^H NOTATION. ^THOSE FEW
ARGUMENTS WHICH HAVE NAMES BEGINNING WITH THE LETTERS ^A THROUGH ^H
OR ELSE WITH THE LETTERS ^O THROUGH ^Z ARE USED FOR REAL VALUES.
^NONE OF THE MACHINE-INDEPENDENT ROUTINES IN THIS PACKAGE STORE MORE
THAN A SINGLE CHARACTER PER COMPUTER LOCATION. ^A FEW OF THE
MACHINE-DEPENDENT DEMONSTRATION PROGRAMS AND ROUTINES WHICH ARE
LISTED AS EXAMPLES IN THIS DOCUMENT USE SINGLE AND DOUBLE PRECISION
VARIABLES TO CONTAIN SEVERAL CHARACTERS WHICH HAVE BEEN PACKED INTO
INDIVIDUALLY ADDRESSABLE COMPUTER LOCATIONS, BUT NO SPECIAL NAMING
CONVENTIONS HAVE BEEN USED FOR THESE VARIABLES.
.SKIP
^MOST OF THE ROUTINES IN THIS PACKAGE WERE DEVELOPED USING THE
^^DEC\\SYSTEM-10 ^F40 COMPILER. ^THE ^^DIMENSION \\AND ^^DATA
\\STATEMENTS HAVE SINCE BEEN REORDERED TO CONFORM TO THE SOMEWHAT
STRICTER SEQUENCING RULES ENFORCED BY THE NEWER ^^DEC\\SYSTEM-10
^^FORTRAN-10 \\COMPILER AND THIS COMPILER HAS BEEN USED FOR ALL OF
THE MORE RECENT DEVELOPMENT OF THE PACKAGE. ^THE USE OF THE
^^FORTRAN-10 \\COMPILER HAS ALLOWED THE ^^DATA \\STATEMENT IN THE
^^DAFLAG \\ROUTINE WHICH DEFINES THE CHARACTERS 1^H[ AND 1^H] TO BE
CHANGED FROM OCTAL MACHINE WORD NOTATION TO ^HOLLERITH CHARACTER
NOTATION. ^THE OCTAL NOTATION ^^DATA \\STATEMENT HAS BEEN COMMENTED
OUT, BUT MUST BE RESTORED IF THIS ROUTINE IS TO BE COMPILED USING
THE ^F40 COMPILER. ^THE LOWER CASE LETTERS WHICH APPEAR IN
^HOLLERITH STRINGS IN A FEW OF THE ROUTINES WILL BE TRANSLATED INTO
UPPER CASE IF THE ^F40 COMPILER IS USED, BUT THIS WILL CAUSE NO
DIFFICULTY OTHER THAN THAT THE ROUTINES WILL THEN BE UNABLE TO
PROCESS LOWER CASE INPUT.
.SKIP
^ALTHOUGH THE ROUTINES IN THE PACKAGE USE THE 1^H ^HOLLERITH
NOTATION IN ^^DATA \\STATEMENTS TO DEFINE VARIABLES WHICH ARE TO BE
MATCHED AGAINST CHARACTERS WHICH THE CALLING PROGRAM HAS READ 1 TO A
COMPUTER STORAGE LOCATION USING A MULTIPLE OF AN ^A1 FORMAT, THE
ARRAY ARGUMENTS USED FOR PASSING CHARACTERS TO THE ROUTINES ARE NOT
USED FOR ANY OTHER NUMERIC INFORMATION SO THAT THE ROUTINES IN THIS
PACKAGE SHOULD BE EASILY CONVERTED TO THE CHARACTER CONVENTIONS OF
THE ^^FORTRAN77 \\STANDARDS. ^SIMILARLY, TO PERMIT SUBSCRIPT RANGE
CHECKING, ALL OF THE ARGUMENT LISTS INCLUDE SIZE INFORMATION FOR THE
ARRAY ARGUMENTS EVEN THOUGH THIS SIZE INFORMATION MAY NOT BE NEEDED
BY THE LOGIC OF THE ROUTINES. ^SINCE THE ^^FORTRAN77 \\STANDARDS
REQUIRE THE EXPLICIT PRESERVATION OF VALUES ACROSS CALLS TO A
PARTICULAR ROUTINE, ALL NON-DIMENSIONED VARIABLES AND ALL FIXED
DIMENSIONED ARRAYS WHICH CONTAIN VALUES WHICH ARE NEEDED BY THE
SUBSEQUENT CALL TO THE SAME ROUTINE BUT WHICH ARE NOT NEEDED BY THE
CALLING PROGRAM ARE PLACED INTO LABELED ^^COMMON, \\AND ALL VARIABLY
DIMENSIONED ARRAYS APPEAR IN THE ARGUMENT LISTS.
.SKIP
^THE ROUTINES IN THIS PACKAGE MAKE EXTENSIVE USE OF PUNCTUATION
CHARACTERS WHICH ARE NOT PART OF THE STANDARD ^^FORTRAN \\CHARACTER
SET. ^IN PARTICULAR, MANY OF THE ROUTINES IN ^^FASP \\USE THE
SEMICOLON TO SEPARATE STATEMENTS WHICH APPEAR TOGETHER ON A SINGLE
LINE, THE EXCLAMATION POINT TO INDICATE THAT THE CURRENT STATEMENT
IS COMPLETE WITH THE REMAINDER OF THE CURRENT LINE BEING TAKEN AS A
COMMENT, AND THE AMPERSAND TO INDICATE THAT THE CURRENT STATEMENT
CONTINUES ON THE NEXT LINE WITH THE REMAINDER OF THE CURRENT LINE
BEING TAKEN AS A COMMENT. ^IF THESE CHARACTERS ARE NOT AVAILABLE,
THEN IT WILL BE NECESSARY TO SELECT OTHER CHARACTERS WHICH CAN BE
USED FOR THESE PURPOSES AND TO CHANGE THE ^^DATA \\STATEMENTS
ACCORDINGLY. ^MOST OF THE ROUTINES IN THIS PACKAGE ACCEPT A
TABULATION (TAB) CHARACTER AS EQUIVALENT TO A SPACE CHARACTER. ^EACH
TEST FOR A TAB CHARACTER IS PRECEDED BY A TEST FOR A SPACE
CHARACTER, SO IT IS MERELY NECESSARY TO CHANGE THE TAB CHARACTERS IN
THE ^^DATA \\STATEMENTS TO SPACES IF THE COMPUTER SYSTEM UPON WHICH
THESE ROUTINES ARE USED DOES NOT INCLUDE THE TAB CHARACTER IN ITS
CHARACTER SET.
.SKIP
^THE ROUTINES NAMED ^^DACASE (\\THE LOWER CASE TO UPPER CASE
CONVERTER) AND ^^DAVERB (\\THE WORD INTERPRETER) EACH CONTAIN A LIST
OF THE LOWER CASE LETTERS AND A LIST OF THE CORRESPONDING UPPER CASE
LETTERS. ^THE LOWER CASE LETTERS ARE DEFINED BY ^^DATA \\STATEMENTS
TO BE IN THE ORDER 1^HA THROUGH 1^HZ WHICH ON THE ^^DEC\\SYSTEM-10
COMPUTER RESULTS IN THE ASSOCIATED INTEGER VALUES BEING SORTED INTO
AN INCREASING ORDER. ^IF THESE ROUTINES ARE USED UPON A COMPUTER
SYSTEM IN WHICH THE ALPHABETICAL ORDER OF THE LETTERS 1^HA THROUGH
1^HZ DOES NOT RESULT IN AN INCREASING ORDER FOR THE ASSOCIATED
INTEGER VALUES, THEN THE ^^DATA \\STATEMENTS WHICH DEFINE THE ARRAYS
WHICH CONTAIN THE LOWER CASE LETTERS SHOULD BE REWRITTEN SO THAT THE
VALUES ASSOCIATED WITH THE LETTERS WILL BE IN INCREASING NUMERICAL
ORDER, AND THEN THE ^^DATA \\STATEMENTS WHICH DEFINE THE
CORRESPONDING UPPER CASE LETTERS MUST BE REWRITTEN SO THAT THE LOWER
AND UPPER CASE VERSIONS OF EACH LETTER APPEAR IN LOCATIONS IN THE
RESPECTIVE ARRAYS HAVING THE SAME SUBSCRIPTS. ^IF THESE ROUTINES ARE
USED UPON A COMPUTER SYSTEM WHICH DOES NOT SUPPORT LOWER CASE
LETTERS THEN THE ARRAYS WHICH WOULD OTHERWISE CONTAIN THE LIST OF
LOWER CASE LETTERS AS WELL AS THE ARRAYS WHICH CONTAIN THE LIST OF
UPPER CASE LETTERS CAN EACH CONTAIN THE UPPER CASE LETTERS 1^H^A
THROUGH 1^H^Z IN ALPHABETICAL ORDER EVEN IF THIS ORDER IS NOT THE
NUMERICALLY SORTED ORDER.
.SKIP
^SINCE THE ROUTINES IN THIS PACKAGE ARE DESIGNED TO BE USABLE IN A
WIDE VARIETY OF APPLICATIONS, MANY OF THEIR ARGUMENT LISTS ARE LONG.
^IF ANY ONE ROUTINE IS TO BE CALLED SEVERAL TIMES WITHIN A
PARTICULAR PROGRAM, THEN THE WRITING OF SEPARATE ^^CALL \\STATEMENTS
IS BOTH ERROR PRONE AND CONSUMPTIVE OF MACHINE SPACE. ^IF THE
ARGUMENT LISTS IN THE VARIOUS CALLS WOULD BE SIMILAR THEN IT IS
OFTEN WORTHWHILE TO WRITE A SHORT WRAPPER ROUTINE HAVING A MINIMAL
ARGUMENT LIST CONSISTING ONLY OF THOSE ARGUMENTS WHICH WOULD DIFFER
IN VALUE FOR THE INDIVIDUAL CALLS. ^AN ERROR WHICH IS COMMONLY MADE
IN WRITING CALLS TO ROUTINES HAVING SUCH LONG ARGUMENT LISTS IS THE
OMISSION OF AN ARGUMENT. ^SUCH OMISSIONS CAN BE DETECTED BY
COMPARING THE NUMBER OF ARGUMENTS IN THE ^^CALL \\AND ^^SUBROUTINE
\\STATEMENTS, BUT CAN USUALLY BE PREVENTED BY WRITING THE ^^CALL
\\STATEMENTS WITH EXACTLY THE SAME NUMBER OF ARGUMENTS PER LINE AS
APPEAR IN THE ^^SUBROUTINE \\STATEMENTS. ^AN ERROR WHICH IS OFTEN
MADE WHEN USING THE ROUTINES WHICH PERMIT THE USER TO SPECIFY BY
NAME AND TO MANIPULATE THE VALUES OF ^^FORTRAN \\ARRAYS IS THE
FAILURE TO DECLARE THE ARRAY ARGUMENTS OF THESE ROUTINES IN A
^^DIMENSION \\STATEMENT IN THE CALLING PROGRAM SINCE THESE ARRAYS
USUALLY ARE NOT MANIPULATED BY THE CALLING PROGRAM ITSELF.
.SUBTITLE ^ONE-^LINE ^DESCRIPTIONS OF ^EACH OF THE ^ROUTINES IN ^^FASP
.PAGE
.NOFILL
.CENTER
O\N\E-L\\INE ^DESCRIPTIONS OF ^EACH OF THE ^ROUTINES IN ^^FASP
.CENTER
--- ---- ------------ -- ---- -- --- -------- -- ----
.SKIP
.FILL
FASP \\INCLUDES THE ROUTINES LISTED BELOW. ^THE NAMES OF MOST OF
THESE ROUTINES ARE CONSTRUCTED FROM THE 2 LETTER PREFIX "^D^A",
STANDING FOR THE WORD ^D^ATA, TOGETHER WITH A 4 LETTER WORD
INDICATING THE PURPOSE OF THE ROUTINE. ^TWO VERSIONS ARE PROVIDED OF
SOME ROUTINES. ^THE SHORTER OF THESE VERSIONS, NAMED WITH THE ^D^A
PREFIX FOLLOWED BY THE SINGLE LETTER ^I AND A 3 LETTER CONTRACTION
OF THE NORMAL 4 LETTER NAME, PROVIDES ONLY A SELECTED SUBSET OF THE
CAPABILITIES OF THE LONGER, MORE GENERAL VERSION. ^FOR EXAMPLE,
SEVERAL OF THE INPUT TEXT BUFFER INTERPRETATION ROUTINES, SUCH AS
^^DAHEST \\AND ^^DANEXT, \\ARE PROVIDED IN GENERAL VERSIONS WHICH
WILL HANDLE BOTH REAL NUMBERS AND INTEGERS, AND IN SHORTER VERSIONS,
SUCH AS ^^DAIHST \\AND ^^DAINXT, \\WHICH WILL ACCEPT ONLY INTEGER
NUMBERS.
.SKIP
.NOFILL
^^DABASE##\\LOCATES START OF REGION IN DICTIONARY MADE BY ^^DALOAD
.SKIP
DABELT##\\CONSTRUCTS A BAND OF COLUMN IDENTIFICATION NUMBERS
.SKIP
^^DACASE##\\CONVERTS LOWER CASE LETTERS IN BUFFER TO UPPER CASE
.SKIP
^^DACOPY##\\EXPANDS TABS TO SPACES WHILE COPYING TEXT
.SKIP
^^DAFILL##\\EXPANDS TABS TO SPACES WITHOUT USING EXTRA BUFFER
.SKIP
^^DAFLAG##\\LOCATES COMPONENTS OF ^^PDP-10 \\FILE SPECIFICATION
.SKIP
^^DAFONT##\\CONSTRUCTS ^^FORTRAN \\STATEMENTS DESCRIBING ^^DATEXT \\FONT
.SKIP
^^DAGRID##\\RATIONALIZES SCALES OF PLOTS PRODUCED BY ^^DAPLAT
.SKIP
DAHEFT##\\EVALUATES INTEGER AND REAL NUMBERS
.SKIP
^^DAHELP##\\DETERMINES IF TEXT BEGINS WITH QUESTION MARK
.SKIP
^^DAHEST##\\IDENTIFIES COMMAND AND ALL ASSOCIATED ITEMS
.SKIP
^^DAIBLT##\\VERSION OF ^^DABELT \\FOR COLUMN NUMBERS INCREASING BY 1
.SKIP
^^DAIFLL##\\VERSION OF ^^DAFILL \\WHICH ALWAYS COPIES INITIAL SPACES
.SKIP
^^DAIHFT##\\INTEGER ONLY VERSION OF ^^DAHEFT
.SKIP
DAIHST##\\INTEGER ONLY VERSION OF ^^DAHEST
.SKIP
DAINXT##\\INTEGER ONLY VERSION OF ^^DANEXT
.SKIP
DAIPAR##\\VERSION OF ^^DAPAIR \\NOT ACCEPTING RANGE SPECIFICATIONS
.SKIP
^^DAIRNK##\\VERSION OF ^^DARANK \\NOT ACCEPTING RANGE SPECIFICATIONS
.SKIP
^^DAISPN##\\INTEGER ONLY VERSION OF ^^DASPAN
.SKIP
DAJOIN##\\EVALUATES WHOLE NUMBERS, FRACTIONS AND MIXED NUMBERS
.SKIP
^^DALEAD##\\IDENTIFIES COMMAND AND NEXT ASSOCIATED ITEM
.SKIP
^^DALINE##\\BAR CHART PLOTTER FOR PRINTER
.SKIP
^^DALIST##\\SUMMARIZES CONTENTS OF DICTIONARY MADE BY ^^DALOAD
.SKIP
DALOAD##\\CONSTRUCTS DICTIONARY DESCRIBING ^^FORTRAN \\ARRAYS
.SKIP
^^DALONE##\\SUMMARIZES SINGLE ENTRY IN DICTIONARY MADE BY ^^DALOAD
.SKIP
DALOOP##\\RETURNS NEXT LOOP INDEXES VARIED IN ANY ORDER
.SKIP
^^DALOSS##\\ENTRY FOR ^^DAVERB \\ALLOWING MISSING WORDS
.SKIP
^^DAMENU##\\CONSTRUCTS DICTIONARIES FOR ^^DAVERB \O\R DAHEST
.SKIP
DAMISS##\\ENTRY FOR ^^DAHEFT \\ALLOWING MISSING VALUES
.SKIP
^^DAMOVE##\\JUSTIFY OR CENTER GROUP OF CHARACTERS IN FIELD
.SKIP
^^DANAME##\\FINDS MULTIPLE SUBSCRIPTS CORRESPONDING TO SINGLE
.SKIP
^^DANEXT##\\RETURNS NEXT VALUE IN SERIES OF NUMBERS OR RANGES
.SKIP
^^DANUMB##\\REPRESENTS ANY INTEGER
.SKIP
^^DAPAIR##\\RETURNS NEXT PAIR OF LEADING AND FOLLOWING VALUES
.SKIP
^^DAPATH##\\REPRESENT UNSIGNED INTEGERS SEQUENCE IN FORM 1.2.3
.SKIP
^^DAPICK##\\INTERPRETS ARRAY NOTATION USING ^^DALOAD \\DICTIONARY
.SKIP
^^DAPLAT##\\PLOTS LINES, POINTS OR POINT CLUSTERS ON PRINTER
.SKIP
^^DARANK##\\RETURNS EVALUATED INTEGERS SORTED WITHOUT DUPLICATES
.SKIP
^^DARITE##\\REPRESENTS REAL NUMBER IN FLOATING OR EXPONENT FORM
.SKIP
^^DAROLL##\\RETURNS NEXT LOOP INDEXES VARIED IN FIXED ORDER
.SKIP
^^DAROME##\\REPRESENTS INTEGER AS ^ROMAN NUMERAL
.SKIP
^^DASAVE##\\MAKES ^^DATA \\STATEMENTS FOR INTEGER OR ^HOLLERITH ARRAY
.SKIP
^^DASHOW##\\SIMPLE ENTRY FOR ^^DARITE
.SKIP
DASITE##\\FINDS SINGLE SUBSCRIPT CORRESPONDING TO MULTIPLE
.SKIP
^^DASPAN##\\RETURNS NEXT NUMBER OR DESCRIPTION OF RANGE
.SKIP
^^DASWAP##\\INTERCHANGES ADJACENT GROUPS OF CHARACTERS IN BUFFER
.SKIP
^^DATALL##\\CONSTRUCTS PRINTER PLOT WITH EXTENDED VERTICAL SCALE
.SKIP
^^DATEAM##\\EVALUATES AND RETURNS SEVERAL VALUES AT ONCE
.SKIP
^^DATEXT##\\REPRESENTS TEXT USING LARGE, MULTIPLE-LINE LETTERING
.SKIP
^^DATREE##\\RETURNS NEXT LINE IN TREE STRUCTURE REPRESENTATION
.SKIP
^^DATREK##\\EVALUATES SERIES OF UNSIGNED INTEGERS OF FORM 1.2.3
.SKIP
^^DATURN##\\VERSION OF ^^DATEXT \\LETTERING TOP TO BOTTOM OF PAGE
.SKIP
^^DAVARY##\\DISPLAYS AND CHANGES VALUE IDENTIFIED BY ^^DAPICK
.SKIP
DAVERB##\\IDENTIFIES WORD OR ABBREVIATION OF WORD
.SKIP
^^TEXT1###\\DESCRIPTION FOR ^^DATEXT \\OF LETTERS 9 WIDE BY 5 HIGH
.SKIP
^^TEXT2###\\DESCRIPTION FOR ^^DATEXT \\OF LETTERS 5 WIDE BY 5 HIGH
.SKIP
^^TEXT3###\\DESCRIPTION FOR ^^DATEXT \\OF LETTERS 12 WIDE BY 11 HIGH
.SKIP
^^TEXT4###\\DESCRIPTION FOR ^^DATEXT \\OF LETTERS 8 WIDE BY 7 HIGH
.SKIP
^^TEXT5###\\DESCRIPTION FOR ^^DATEXT \\OF LETTERS 14 WIDE BY 9 HIGH
.FILL
.SUBTITLE ^ONE-^PARAGRAPH ^DESCRIPTIONS OF ^EACH OF THE ^ROUTINES IN ^^FASP
.PAGE
.CENTER
O\N\E-P\\ARAGRAPH ^DESCRIPTIONS OF ^EACH OF THE ^ROUTINES IN ^^FASP
.CENTER
--- --------- ------------ -- ---- -- --- -------- -- ----
.SKIP
T\\HE ROUTINES HAVING ASTERISKS FOLLOWING THEIR NAMES IN THE LIST
BELOW ARE USED FOR THE SPECIFICATION BY NAME, EXAMINATION AND
MODIFICATION OF THE VALUES OF MULTIPLY SUBSCRIPTED ^^FORTRAN
\\ARRAYS EQUIVALENCED WITH OR OTHERWISE LOADED INTO SINGLY
SUBSCRIPTED BUFFERS. ^THESE ROUTINES SHARE A COMMON DATA BASE, AND
USE THE SAME NAMING CONVENTIONS FOR THEIR ARGUMENTS. ^IN ADDITION TO
THE ROUTINES DEVOTED SOLEY TO THE MANIPULATION OF NAMED ARRAYS, THE
ROUTINES ^^DASITE \\AND EITHER ^^DAROLL \O\R DALOOP \\MUST BE CALLED
BY THE USER'S PROGRAM. ^THE LATTER ROUTINES USE THE SAME ARGUMENT
NAMING CONVENTIONS AS DO THE OTHER ROUTINES DESIGNED FOR THE
MANIPULATION OF ARRAYS BY NAME, BUT WERE WRITTEN INDEPENDENTLY, AND
SO ACCEPT A SOMEWHAT MORE GENERAL DATA BASE.
.LEFT MARGIN 10
.SKIP
.TEST PAGE 3
.INDENT -10
^^DABASE#*##\\FINDS THE START OF A PARTICULAR LOGICAL GROUP OF ARRAY
NAMES CONTAINED IN THE DICTIONARY CONSTRUCTED BY THE ^^DALOAD
\\ROUTINE.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DABELT####\\OUTPUTS INTO A TEXT BUFFER THE REPRESENTATION OF A
BAND OF COLUMN NUMBERS. ^THE NUMBERS CAN INCREASE OR DECREASE FROM
LEFT TO RIGHT. ^EACH LINE OF THE REPRESENTATION CAN CONTAIN DIGITS
EITHER CORRESPONDING TO THE SAME POWER OF 10, OR OF THE SAME
SIGNIFICANCE. ^EITHER THE MOST OR THE LEAST SIGNIFICANT DIGITS CAN
BE GENERATED FIRST. ^THE FOLLOWING ARE TYPICAL BANDS OF COLUMN
NUMBERS AS GENERATED BY THIS ROUTINE.
.NOFILL
.LEFT MARGIN 15
.TEST PAGE 3
-                       ----------01234567891
1---------          1   1987654321          0
098765432101234567890   0
.LEFT MARGIN 10
.FILL
.SKIP
.TEST PAGE 2
.INDENT -10
^^DACASE####\\CONVERTS ALL LOWER CASE LETTERS IN AN INPUT TEXT
BUFFER TO UPPER CASE SO THAT THESE LETTERS CAN BE RECOGNIZED BY THE
OTHER ROUTINES IN ^^FASP.
.SKIP
.TEST PAGE 2
.INDENT -10
DACOPY####\\COPIES THE CONTENTS OF ONE INPUT TEXT BUFFER INTO
ANOTHER, EXPANDING TAB CHARACTERS TO ENOUGH SPACES TO FILL TO THE
CORRESPONDING TAB STOPS.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAFILL####\\EXPANDS TAB CHARACTERS IN AN INPUT TEXT BUFFER TO
ENOUGH SPACES TO FILL TO THE CORRESPONDING TAB STOPS WITHOUT THE USE
OF A SEPARATE INTERMEDIATE BUFFER.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAFLAG####\\LOCATES IN AN INPUT TEXT BUFFER, BUT DOES NOT
EVALUATE, THE COMPONENTS OF A FILE SPECIFICATION OF THE GENERAL FORM
.BREAK
^^WORD:WORD.WORD[WORD,WORD]/WORD:'TEXT'/WORD:WORD
.BREAK
\\IN WHICH THERE CAN BE ONLY ONE NAME FIELD CONSISTING OF WORDS
CONNECTED BY PERIODS, AND ONLY ONE BRACKETED FIELD CONSISTING OF
WORDS CONNECTED BY COMMAS. ^THERE CAN BE SEVERAL SWITCH FIELDS
STARTING WITH SLASHES AND CONSISTING OF WORDS OR QUOTED TEXT STRINGS
CONNECTED BY COLONS. ^ANY FIELD CAN BE MISSING, OR CAN CONSIST OF
ANY NUMBER OF SUBFIELDS, SOME OF WHICH CAN BE MISSING.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAGRID####\\ADJUSTS THE LIMITING DATA UNIT COORDINATES AND THE
GRID LINE SEPARATIONS AND OFFSETS TO PRODUCE NEATER SCALE NUMBERS IN
THE PRINTER PLOTS PRODUCED BY ^^DAPLAT. DAGRID \\IS DESCRIBED AT THE
END OF THE ^^DAPLAT \\DOCUMENTATION.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAHEFT####\\EVALUATES THE INTEGERS OR THE REAL NUMBERS REPRESENTED
IN AN INPUT TEXT BUFFER. ^THESE NUMBERS CAN BE REPRESENTED WITH
DECIMAL POINTS AND/OR IN SCIENTIFIC NOTATION. ^^DAMISS \\SHOULD BE
CALLED INSTEAD OF ^^DAHEFT \\IF COMMENTS AND MISSING NUMBERS ARE TO
BE ALLOWED.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAHELP####\\DETERMINES WHETHER THE INPUT TEXT BUFFER CONTAINS
LEADING QUESTION MARKS.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAHEST####\\EVALUATES SIMPLE COMMANDS ISSUED TO INTERACTIVE
PROGRAMS. ^THESE COMMANDS CONSIST OF A LEADING KEY WORD FOLLOWED BY
ARGUMENTS WHICH CAN BE NUMBERS, TEXT STRINGS AND/OR WORDS. ^ONLY ONE
TYPE OF ARGUMENT CAN APPEAR MORE THAN ONCE FOLLOWING A PARTICULAR
COMMAND, AND EXTRA COMMAS BETWEEN THE ARGUMENTS INDICATE MISSING
ARGUMENTS OF THIS TYPE. ^SEVERAL STATEMENTS CAN APPEAR ON A SINGLE
LINE, BUT STATEMENTS CANNOT BE CONTINUED ONTO A FOLLOWING LINE.
^EACH CALL TO ^^DAHEST \\RETURNS INFORMATION ABOUT AN ENTIRE COMMAND.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAIBLT####\\OUTPUTS INTO A TEXT BUFFER THE REPRESENTATION OF A
BAND OF COLUMN NUMBERS. ^^DAIBLT \\IS DESCRIBED IN THE DOCUMENTATION
OF ^^DABELT. DABELT \\MUST BE USED INSTEAD OF ^^DAIBLT \\IF THE
NUMBERS MUST DECREASE FROM LEFT TO RIGHT OR IF EACH LINE OF THE
REPRESENTATION MUST CONTAIN DIGITS OF THE SAME SIGNIFICANCE.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAIFLL####\\EXPANDS TAB CHARACTERS IN AN INPUT TEXT BUFFER TO
ENOUGH SPACES TO FILL TO THE CORRESPONDING TAB STOPS WITHOUT THE USE
OF A SEPARATE INTERMEDIATE BUFFER. ^^DAIFLL \\IS DESCRIBED IN THE
DOCUMENTATION OF ^^DAFILL. DAFILL \\MUST BE USED INSTEAD OF ^^DAIFLL
\\IF INITIAL TABS OR SPACES IN THE BUFFER MUST BE SUPPRESSED.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAIHFT####\\EVALUATES THE INTEGERS REPRESENTED IN AN INPUT TEXT
BUFFER. ^^DAIHFT \\IS DESCRIBED IN THE DOCUMENTATION OF ^^DAHEFT.
DAHEFT \\MUST BE USED INSTEAD OF ^^DAIHFT \\IF REAL NUMBERS MUST BE
EVALUATED.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAIHST####\\EVALUATES SIMPLE COMMANDS ISSUED TO INTERACTIVE
PROGRAMS. ^^DAIHST \\IS DESCRIBED IN THE DOCUMENTATION OF ^^DAHEST.
DAHEST \\MUST BE USED INSTEAD OF ^^DAIHST \\IF REAL NUMBERS MUST BE
EVALUATED IN THE ARGUMENT LISTS FOLLOWING THE COMMAND WORDS.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAINXT####\\RETURNS THE NEXT INTEGER VALUE REPRESENTED BY THE
CONTENTS OF AN INPUT TEXT BUFFER WHICH CAN CONTAIN REPRESENTATIONS
OF ANY COMBINATION OF SINGLE VALUES, RANGE SPECIFICATIONS AND/OR
VALUES TO BE REPEATED A SPECIFIED NUMBER OF TIMES. ^^DAINXT \I\S
\\DESCRIBED IN THE DOCUMENTATION OF ^^DANEXT. DANEXT \\MUST BE USED
INSTEAD OF ^^DAINXT \\IF REAL NUMBERS MUST BE EVALUATED.
.LEFT MARGIN 10
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAIPAR####\\RETURNS THE NEXT PAIR OF VALUES REPRESENTED BY THE
CONTENTS OF AN INPUT TEXT BUFFER. ^IF THE REPRESENTATION OF A THIRD
VALUE APPEARS AFTER THE REPRESENTATION OF A PAIR OF VALUES, THEN THE
THIRD NUMBER CAN BE INTERPRETED AS EITHER AN ADDITIONAL NUMBER TO BE
ASSOCIATED WITH THE LEADING (LEFTMOST) NUMBER OF THE PREVIOUS PAIR,
OR AS THE LEADING NUMBER OF A NEW PAIR. ^^DAIPAR \\IS DESCRIBED IN
THE DOCUMENTATION OF ^^DAPAIR. DAPAIR \\MUST BE USED INSTEAD OF
^^DAIPAR \\IF RANGES OF NUMBERS MUST BE EVALUATED.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAIRNK####\\RETURNS THE DECIMAL INTEGER VALUES REPRESENTED BY THE
CONTENTS OF AN INPUT TEXT BUFFER, SORTED AND EXCLUDING DUPLICATE
VALUES. ^^DAIRNK \\IS DESCRIBED IN THE DOCUMENTATION OF ^^DARANK.
DARANK \\MUST BE USED INSTEAD OF ^^DAIRNK \\IF THE VALUES ARE TO BE
SPECIFIED AS RANGES OF VALUES.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAISPN####\\INTERPRETS AN INPUT TEXT BUFFER CONTAINING THE
REPRESENTATION OF A SINGLE INTEGER VALUE, SPECIFICATION OF AN
INTEGER RANGE, OR AN INTEGER VALUE TO BE REPEATED A SPECIFIED NUMBER
OF TIMES. ^^DAISPN \\IS DESCRIBED IN THE DOCUMENTATION OF ^^DASPAN.
DASPAN \\MUST BE USED INSTEAD OF ^^DAISPN \\IF REAL NUMBERS MUST BE
EVALUATED.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAJOIN####\\EVALUATES THE WHOLE NUMBERS, FRACTIONS AND MIXED
NUMBERS REPRESENTED IN AN INPUT TEXT BUFFER. ^^DAJOIN \\WOULD RETURN
THE VALUE -3.5 IF THE INPUT TEXT BUFFER CONTAINS -3#1/2.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DALEAD####\\IDENTIFIES A COMMAND WORD AND A FOLLOWING ASSOCIATED
WORD OR NUMBER OR QUOTED TEXT STRING REPRESENTED BY THE CONTENTS OF
AN INPUT TEXT BUFFER. ^IF AN ASSOCIATED WORD OR NUMBER OR STRING IS
FOUND WITHOUT A PRECEDING COMMAND WORD, THEN THE COMMAND WORD
IDENTIFIED BY THE PREVIOUS CALL TO THIS ROUTINE IS AGAIN IDENTIFIED.
^AN AMPERSAND AT THE RIGHT END OF A LINE INDICATES THAT THE ITEMS
FOUND AT THE START OF THE FOLLOWING LINE ARE TO CONTINUE TO BE
ASSOCIATED WITH THE CURRENT COMMAND WORD UNTIL A NEW COMMAND WORD IS
ENCOUNTERED.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DALINE####\\CONSTRUCTS PRINTABLE PLOTS CONTAINING HORIZONTAL BARS
FORMED OF SEGMENTS THE LENGTHS OF WHICH REPRESENT THE MAGNITUDES OF
THE CORRESPONDING VALUES.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DALIST#*##\\TYPES A SUMMARY OF THE ARRAY NAMES AND SUBSCRIPT
LIMITS CONTAINED IN THE DICTIONARY CONSTRUCTED BY THE ^^DALOAD
\\ROUTINE.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DALOAD#*##\\READS ^^FORTRAN \\STATEMENTS WHICH WOULD DEFINE THE
DIMENSIONS OF ARRAYS AND, FROM THESE STATEMENTS, CONSTRUCTS A
DICTIONARY WHICH CAN BE USED BY THE REST OF THE ROUTINES IN THIS
LIST HAVING AN ASTERISK TO THE RIGHT OF THEIR NAMES.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DALONE#*##\\OUTPUTS INTO A TEXT BUFFER THE CHARACTERS OF AN ARRAY
NAME CONTAINED IN THE DICTIONARY CONSTRUCTED BY THE ^^DALOAD
\\ROUTINE, TOGETHER WITH EITHER A REPRESENTATION OF THE SUBSCRIPT
LIMITS OF THE ARRAY OR A REPRESENTATION OF THE CURRENT VALUES OF
THESE SUBSCRIPTS.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DALOOP####\\SIMULATES VARIABLY EMBEDDED ^D^O LOOPS TO ANY DESIRED
DEPTH.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DALOSS####\\IDENTIFIES WORDS AND ABBREVIATIONS APPEARING IN AN
INPUT TEXT BUFFER. ^AN ABBREVIATION CONSISTS OF SUFFICIENT INITIAL
CHARACTERS TO UNIQUELY IDENTIFY THE DESIRED WORD FROM ALL OTHER
WORDS IN THE DICTIONARY. ^COMMAS CAN SEPARATE THE WORDS AND EXTRA
COMMAS CAN INDICATE MISSING ITEMS. ^COMMENTS IN THE INPUT TEXT
BUFFER ARE IGNORED. ^^DALOSS \\IS DESCRIBED AT THE END OF THE
^^DAVERB \\DOCUMENTATION.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAMISS####\\EVALUATES THE INTEGERS OR THE REAL NUMBERS REPRESENTED
IN AN INPUT TEXT BUFFER. ^COMMAS CAN SEPARATE THE NUMBER
REPRESENTATIONS AND EXTRA COMMAS CAN INDICATE MISSING ITEMS.
^COMMENTS IN THE INPUT TEXT BUFFER ARE IGNORED. ^^DAMISS \I\S
\\DESCRIBED AT THE END OF THE ^^DAHEFT \\DOCUMENTATION.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAMOVE####\\LEFT JUSTIFIES, CENTERS OR RIGHT JUSTIFIES A GROUP OF
CHARACTERS WITHIN A LARGER SECTION OF THE TEXT BUFFER IN WHICH THESE
CHARACTERS ARE CONTAINED.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DANAME#*##\\FINDS THE ARRAY NAME AND ITS SUBSCRIPTS (AS DEFINED BY
THE DICTIONARY CONSTRUCTED BY THE ^^DALOAD) \\ROUTINE) ASSOCIATED
WITH A PARTICULAR LOCATION IN THE SINGLY SUBSCRIPTED BUFFER WITH
WHICH THE ARRAY IS EQUIVALENCED OR INTO WHICH THE ARRAY IS OTHERWISE
LOADED.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DANEXT####\\RETURNS THE NEXT NUMERIC VALUE REPRESENTED BY THE
CONTENTS OF AN INPUT TEXT BUFFER WHICH CAN CONTAIN THE
REPRESENTATIONS OF ANY COMBINATION OF SINGLE VALUES, RANGE
SPECIFICATIONS AND/OR VALUES TO BE REPEATED A SPECIFIED NUMBER OF
TIMES. ^THE VALUES 10, 15, 20, -120 AND -120 WOULD BE RETURNED BY 5
CALLS TO THIS ROUTINE IF THE INPUT TEXT BUFFER CONTAINS
10/5/20,2*-120.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DANUMB####\\OUTPUTS INTO A TEXT BUFFER THE REPRESENTATION OF AN
INTEGER (NOT REAL) VALUE.
.LEFT MARGIN 10
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAPAIR####\\RETURNS THE NEXT PAIR OF VALUES REPRESENTED BY THE
CONTENTS OF AN INPUT TEXT BUFFER. ^EITHER VALUE CAN BE SPECIFIED AS
A MEMBER OF A RANGE OF VALUES. ^IF THE LEADING VALUE IS SPECIFIED AS
A MEMBER OF A RANGE OF VALUES, IF THE THE ASSOCIATED VALUE IS
SPECIFIED EITHER AS A SINGLE VALUE OR AS A MEMBER OF A RANGE OF
VALUES CONTAINING FEWER VALUES THAN THE LEADING RANGE, AND IF AN
ADDITIONAL SPECIFICATION OF A SINGLE VALUE OR OF A RANGE OF VALUES
APPEARS TO THE RIGHT OF THE SPECIFICATION OF THE ASSOCIATED VALUE OR
RANGE OF VALUES, THEN THE ADDITIONAL VALUE OR VALUES WILL BE
RETURNED WITH THE REMAINING VALUES OF THE INITIAL RANGE. ^THE PAIRS
OF VALUES 10 AND 50, 15 AND 60, 20 AND 70 AND 25 AND 100 WOULD BE
RETURNED BY 4 CALLS TO THIS ROUTINE IF THE INPUT TEXT BUFFER
CONTAINS 10/5/25,50/10/70,100.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAPATH####\\OUTPUTS INTO A TEXT BUFFER THE REPRESENTATION OF A
SEQUENCE OF UNSIGNED INTEGERS SEPARATED BY PERIODS. ^THIS
REPRESENTATION CAN BE INTERPRETED BY THE ^^DATREK \\ROUTINE.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAPICK#*##\\IDENTIFIES AN ARRAY NAME AND SUBSCRIPT RANGES IN AN
INPUT TEXT BUFFER BY MATCHING THE CONTENTS OF THE BUFFER AGAINST THE
ENTRIES IN A DICTIONARY CONSTRUCTED BY THE ^^DALOAD \\ROUTINE.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAPLAT####\\GENERATES PRINTER OR TERMINAL PLOTS OF POINTS, POINT
CLUSTERS AND/OR CURVES.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DARANK####\\RETURNS THE DECIMAL INTEGER VALUES REPRESENTED BY THE
CONTENTS OF AN INPUT TEXT BUFFER, SORTED AND EXCLUDING DUPLICATE
VALUES. ^THE VALUES CAN BE SPECIFIED AS MEMBERS OF RANGES OF VALUES.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DARITE####\\OUTPUTS INTO A TEXT BUFFER THE REPRESENTATION OF A
REAL (NOT INTEGER) VALUE IN EITHER FLOATING POINT NOTATION OR
SCIENTIFIC (EXPONENT) NOTATION. ^IF NECESSARY, ^^DARITE \\CAN ALTER
THESE FORMATS WITHIN RANGES SPECIFIED BY THE CALLING PROGRAM.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAROLL####\\RETURNS THE NEXT VALUES OF AN INTEGER (NOT TEXT) ARRAY
BEING VARIED BETWEEN A SET OF LOWER AND UPPER BOUNDS. ^EITHER THE
LOWEST OR THE HIGHEST SUBSCRIPT CAN BE VARIED THE MOST RAPIDLY.
^^DAROLL \\IS DESCRIBED IN THE DOCUMENTATION OF ^^DALOOP. DALOOP
\\MUST BE USED INSTEAD OF ^^DAROLL \\IF THE VALUES IN THE ARRAY MUST
BE ADVANCED IN A SEQUENCE OTHER THAN THAT SPECIFIED BY THE
SUBSCRIPTS OF THE ARRAY.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAROME####\\OUTPUTS INTO A TEXT BUFFER THE REPRESENTATION IN
^ROMAN NUMERAL NOTATION OF AN INTEGER VALUE.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DASAVE####\\GENERATES COMPILABLE ^^FORTRAN DATA \\STATEMENTS
REPRESENTING THE CONTENTS OF ANY SINGLE PRECISION ARRAY CONTAINING
EITHER INTEGER VALUES OR TEXT CHARACTERS.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DASHOW####\\OUTPUTS INTO A TEXT BUFFER THE REPRESENTATION OF A
REAL (NOT INTEGER) VALUE IN EITHER FLOATING POINT NOTATION OR
SCIENTIFIC (EXPONENT) NOTATION. ^IF NECESSARY, ^^DASHOW \\CAN ALTER
THESE FORMATS WITHIN RANGES SPECIFIED BY THE CALLING PROGRAM.
^RIGHTMOST ZEROES WHICH ARE TO THE RIGHT OF THE DECIMAL POINT ARE
SUPPRESSED. ^^DARITE \\SHOULD BE USED INSTEAD OF ^^DASHOW \I\F
\\CENTERING OR RIGHT JUSTIFICATION OR RIGHTMOST FILL WITH SPACES IS
NEEDED.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DASITE####\\RETURNS THE LOCATION WITHIN A SINGLY DIMENSIONED
BUFFER (CONTAINING ANY DATA TYPE) OF A PARTICULAR LOCATION WITHIN A
MULTIPLY SUBSCRIPTED ARRAY CONTAINED IN THE BUFFER.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DASPAN####\\INTERPRETS AN INPUT TEXT BUFFER CONTAINING THE
REPRESENTATION OF A SINGLE NUMERIC VALUE, RANGE SPECIFICATION OR
VALUE TO BE REPEATED A SPECIFIED NUMBER OF TIMES. ^^DANEXT \\WOULD
USUALLY BE CALLED INSTEAD OF ^^DASPAN \\IF THE VALUES WITHIN THE
RANGE, RATHER THAN JUST A DESCRIPTION OF THE RANGE, IS REQUIRED.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DASWAP####\\SWAPS 2 ADJACENT GROUPS OF CHARACTERS IN AN INPUT TEXT
BUFFER WITHOUT THE USE OF AN ADDITIONAL BUFFER.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DATALL####\\GENERATES A PLOT WITH A VERTICAL AXIS EXTENDING ONTO
AS MANY LINES AND PAGES AS NECESSARY TO REPRESENT THE DATA.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DATEAM####\\RETURNS ALL OF THE VALUES REPRESENTED BY THE CONTENTS
OF AN INPUT TEXT BUFFER. ^EXTRA COMMAS, WHICH INDICATE MISSING
VALUES TO SOME ROUTINE, ARE IGNORED.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DATEXT####\\GENERATES LARGE MULTIPLE LINE LETTERING EXTENDING FROM
LEFT TO RIGHT ACROSS THE WIDTH OF THE PAGE. ^ALSO INCLUDED IS
^^DAFONT, \\A PROGRAM WHICH ALLOWS USER SPECIFICATION OF CHARACTER
SHAPES.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DATREE####\\IDENTIFIES THE ITEMS APPEARING IN THE NEXT LINE OF A
SIMPLE TREE STRUCTURE IN WHICH THE ROOT IS PLACED IN THE LEFT
COLUMN, THOSE NODES WHICH LIE IMMEDIATELY ABOVE THE ROOT ARE PLACED
IN THE SECOND COLUMN, THOSE WHICH ARE ABOVE THE NODES IN THE SECOND
COLUMN ARE PLACED IN THE THIRD COLUMN, AND SO ON.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DATREK####\\EVALUATES A SERIES OF UNSIGNED INTEGERS REPRESENTED BY
GROUPS OF DIGITS SEPARATED BY PERIODS IN AN INPUT TEXT BUFFER. ^A
VALUE OF -1 IS RETURNED FOR ANY INTEGER WHICH IS INDICATED AS
MISSING BY AN INITIAL PERIOD, BY A TRAILING PERIOD, OR BY 2 ADJACENT
PERIODS. ^SIGNS AND EXPONENTS ARE NOT RECOGNIZED. ^THIS
REPRESENTATION OF A SERIES OF UNSIGNED INTEGERS CAN BE GENERATED BY
THE ^^DAPATH \\ROUTINE.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DATURN####\\GENERATES LARGE MULTIPLE LINE LETTERING EXTENDING FROM
TOP TO BOTTOM OF PAGE AND ONTO SUBSEQUENT PAGES. ^^DATURN \I\S
\\DESCRIBED AT THE END OF THE ^^DATEXT \\DOCUMENTATION.
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAVARY#*##\\DISPLAYS THE VALUES CONTAINED IN THE ARRAY LOCATIONS
IDENTIFIED BY THE ^^DAPICK \\ROUTINE, AND ACCEPTS THE USER
SPECIFICATION OF THE VALUES IN THESE ARRAY LOCATIONS.
.LEFT MARGIN 10
.SKIP
.TEST PAGE 2
.INDENT -10
^^DAVERB####\\IDENTIFIES WORDS AND ABBREVIATIONS APPEARING IN AN
INPUT TEXT BUFFER. ^AN ABBREVIATION CONSISTS OF SUFFICIENT INITIAL
CHARACTERS TO UNIQUELY IDENTIFY THE DESIRED WORD FROM ALL OTHER
WORDS IN THE DICTIONARY. ^^DALOSS \\SHOULD BE CALLED INSTEAD OF
^^DAVERB \\IF COMMENTS AND MISSING WORDS ARE TO BE ALLOWED.
.SKIP 2
.LEFT MARGIN 0
.TEST PAGE 3
^THE ^^FASP \\PACKAGE ALSO INCLUDES THE FOLLOWING SUPPORT PROGRAMS
WHICH ARE USED TO CONSTRUCT THE ^^DATA \\STATEMENTS NECESSARY FOR
THE USE OF SOME OF THE ROUTINES DESCRIBED ABOVE.
.SKIP
.LEFT MARGIN 10
.INDENT -10
^^DAFONT####\\READS A LETTERING PATTERN FILE WHICH CAN BE EASILY
CREATED OR MODIFIED BY THE USER, AND GENERATES FROM THIS FILE THE
^^FORTRAN \\STATEMENTS WHICH DEFINE A BIT CODED ARRAY WHICH CONTAINS
THE INFORMATION NEEDED BY ^^DATEXT \\AND BY ^^DATURN \\TO GENERATE
THIS STYLE OF LETTERING. ^^DAFONT \\IS DESCRIBED AT THE END OF THE
^^DATEXT \\DOCUMENTATION.
.SKIP
.INDENT -10
^^DAMENU####\\READS A FILE CONTAINING THE WORDS WHICH ARE TO BE
RECOGNIZED BY ^^DAVERB, \\OR BY ANY ROUTINE WHICH CALLS ^^DAVERB,
\\AND GENERATES THE ^^FORTRAN \\STATEMENTS WHICH DEFINE THIS
DICTIONARY. ^^DAMENU \\CAN MAINTAIN THE ARRAY OF ARGUMENT TYPES TO
BE ALLOWED BY ^^DAHEST \\PARALLEL TO THE WORDS IN THE DICTIONARY.
^^DAMENU \\IS DESCRIBED AT THE END OF THE DOCUMENTATION OF ^^DAHEST.
.LEFT MARGIN 0
.FILL
.SUBTITLE R\\OUTINES IN ^^FASP U\\SED TO ^EVALUATE ^TYPICAL ^LINES OF ^TEXT
.PAGE
.CENTER
^ROUTINES IN ^^FASP U\\SED TO ^EVALUATE ^TYPICAL ^LINES OF ^TEXT
.CENTER
-------- -- ---- ---- -- -------- ------- ----- -- ----
.SKIP
^SEVERAL TYPICAL LINES OF TEXT WHICH COULD BE INTERPRETED BY THE
ROUTINES IN THIS PACKAGE ARE LISTED BELOW TOGETHER WITH DESCRIPTIONS
OF THE RESULTS WHICH WOULD BE RETURNED TO THE CALLING PROGRAM. ^THE
EXCLAMATION POINT IS USED IN SOME OF THE EXAMPLES TO START COMMENTS,
BUT IS NOT SUPPORTED BY THE MORE PRIMITIVE ROUTINES SUCH AS
^^DAHEFT, DAVERB \\AND ^^DATREK.
.SKIP
.LEFT MARGIN 4
.INDENT -4
-7366.2
.BREAK
\O\R
.INDENT -4
-7.3662K
.BREAK
\O\R
.INDENT -4
-7.3662E3
.SKIP
\\EVALUATED BY ^^DAHEFT, \\OR BY MOST OF THE ROUTINES WHICH CALL
^^DAHEFT (\\SOME DON'T ALLOW OCTAL), AS AN OCTAL INTEGER HAVING THE
DECIMAL VALUE -3830 (- 7X512 - 3X64 - 6X8 - 6) OR AS A DECIMAL
INTEGER HAVING THE VALUE -7366 OR AS A DECIMAL REAL HAVING -7366.2
AS ITS VALUE.
.SKIP
^^DARITE \\CAN REPRESENT THE REAL VALUE -7366.2 IN ANY OF THE FORMS
SHOWN IN THE ABOVE EXAMPLES.
.SKIP
.TEST PAGE 4
.INDENT -4
-1/2
.SKIP
EVALUATED BY ^^DAJOIN \\AS A DECIMAL REAL HAVING -0.5 AS ITS VALUE.
.SKIP
EVALUATED BY ^^DANEXT \\AS THE SEQUENCE OF OCTAL INTEGERS OR OF
DECIMAL INTEGERS OR OF DECIMAL REALS HAVING THE VALUES -1, 0, 1 AND
2. ^AN INCREMENT OF 1 IS ASSUMED.
.SKIP
.TEST PAGE 4
.INDENT -4
-1 3/5
.SKIP
EVALUATED BY ^^DAJOIN \\AS A DECIMAL REAL HAVING -1.6 AS ITS VALUE.
^THIS INTERPRETATION DOES NOT ALLOW A COMMA BETWEEN THE -1 AND THE 3.
.SKIP
EVALUATED BY ^^DANEXT \\AS THE SEQUENCE OF OCTAL INTEGERS OR OF
DECIMAL INTEGERS OR OF DECIMAL REALS HAVING THE VALUES -1, 3, 4 AND
5. ^A COMMA COULD APPEAR BETWEEN THE -1 AND THE 3.
.SKIP
EVALUATED BY ^^DAPAIR \\AS THE PAIR OF OCTAL INTEGERS OR OF DECIMAL
INTEGERS OR OF DECIMAL REALS HAVING THE VALUES -1 AND 3, FOLLOWED BY
THE INITIAL -1 ASSOCIATED WITH THE VALUES 4 AND 5 IN TURN. ^A COMMA
COULD APPEAR BETWEEN THE -1 AND THE 3.
.SKIP
.TEST PAGE 4
.INDENT -4
1.5377^^E5,,-1 3/5!ANY CHARACTERS FORMING COMMENT
.SKIP
\\EVALUATED BY ^^DAJOIN \\AS A DECIMAL REAL HAVING THE VALUE 153770
FOLLOWED BY A MISSING NUMBER AND THEN BY A MIXED FRACTION HAVING THE
VALUE -1.6.
.SKIP
EVALUATED BY ^^DANEXT \\AS A LEADING OCTAL INTEGER HAVING THE VALUE
55288 OR AS A LEADING DECIMAL INTEGER HAVING THE VALUE 153770 OR AS
A LEADING DECIMAL REAL HAVING THE VALUE 153770, THE LEADING NUMBER
BEING FOLLOWED BY A MISSING ITEM INDICATED BY THE EXTRA COMMA AND
THEN FOLLOWED BY A SEQUENCE HAVING THE VALUES -1, 3, 4 AND 5.
.SKIP
.TEST PAGE 4
.INDENT -4
20/5/40!^^ANY CHARACTERS FORMING COMMENT
.SKIP
\\EVALUATED BY ^^DANEXT \\AS THE SEQUENCE OF DECIMAL INTEGERS OR OF
DECIMAL REALS HAVING THE VALUES 20, 25, 30, 35 AND 40 OR AS THE
SEQUENCE OF OCTAL INTEGERS HAVING THE DECIMAL VALUES 16, 21, 26 AND
31.
.SKIP
.TEST PAGE 4
.INDENT -4
5*-100!^^ANY CHARACTERS FORMING COMMENT
.SKIP
\\EVALUATED BY ^^DANEXT \\AS 5 OCCURRENCES OF A DECIMAL INTEGER
HAVING THE VALUE -100 OR OF A DECIMAL REAL HAVING THE VALUE -100 OR
OF AN OCTAL INTEGER HAVING THE DECIMAL VALUE -64.
.SKIP
.TEST PAGE 4
.INDENT -4
44.120.0
.SKIP
EVALUATED BY ^^DATREK \\AS THE SEQUENCE OF UNSIGNED DECIMAL INTEGERS
HAVING THE VALUES 44, 120 AND 0.
.SKIP
^^DAPATH \\CAN REPRESENT THE SEQUENCE OF UNSIGNED DECIMAL INTEGERS
HAVING THE VALUES 44, 120 AND 0 IN THIS FORM.
.SKIP
.TEST PAGE 4
.INDENT -4
-12 70 16 4!^^ANY CHARACTERS FORMING COMMENT
.SKIP
\\EVALUATED BY ^^DAPAIR \\AS THE PAIR OF DECIMAL INTEGERS OR OF
DECIMAL REALS HAVING THE VALUES -12 AND 70 FOLLOWED BY THE PAIR
HAVING THE VALUES 16 AND 4, OR AS THE PAIR OF OCTAL INTEGERS HAVING
THE DECIMAL VALUES -10 (- 1X8 - 2) AND 56 (7X8) FOLLOWED BY THE PAIR
HAVING THE DECIMAL VALUES 14 (1X8 + 6) AND 4. ^A COMMA COULD APPEAR
BETWEEN ANY OF THE NUMBER REPRESENTATIONS.
.SKIP
EVALUATED BY ^^DAPAIR \\ALTERNATIVELY AS A DECIMAL INTEGER OR AS A
DECIMAL REAL HAVING THE VALUE -12 WHICH IS ASSOCIATED IN TURN WITH
EACH OF THE NUMBERS 70, 16 AND 4 OR AS AN OCTAL INTEGER HAVING THE
DECIMAL VALUE -10 WHICH IS ASSOCIATED IN TURN WITH NUMBERS HAVING
THE DECIMAL VALUES 56, 14 AND 4. ^A COMMA COULD APPEAR BETWEEN ANY
OF THE NUMBER REPRESENTATIONS.
.SKIP
EVALUATED BY ^^DAMISS \\OR BY ^^DATEAM \\OR BY ^^DANEXT \\AS THE
SEQUENCE OF DECIMAL INTEGERS OR OF DECIMAL REALS HAVING THE VALUES
-12, 70, 16 AND 4, OR AS THE SEQUENCE OF OCTAL INTEGERS HAVING THE
DECIMAL VALUES -10, 56, 14 AND 4. ^A COMMA COULD APPEAR BETWEEN ANY
OF THE NUMBER REPRESENTATIONS.
.SKIP
.TEST PAGE 4
.INDENT -4
10/5/20 100 200 300!^^ANY CHARACTERS FORMING COMMENT
.SKIP
\\EVALUATED BY ^^DAPAIR \\AS THE PAIR OF DECIMAL INTEGERS OR OF
DECIMAL REALS HAVING THE VALUES 10 AND 100, FOLLOWED BY THE PAIR
HAVING THE VALUES 15 (5 IS THE INCREMENT) AND 200 AND FINALLY BY THE
PAIR HAVING THE VALUES 20 AND 300, OR AS THE PAIR OF OCTAL INTEGERS
HAVING THE DECIMAL VALUES 8 AND 64, FOLLOWED BY THE PAIR HAVING THE
DECIMAL VALUES 13 (OCTAL 10 PLUS 5) AND 128. ^A COMMA COULD APPEAR
BETWEEN THE 20 AND THE 100 OR BETWEEN ANY OF THE FOLLOWING NUMBER
REPRESENTATIONS. ^IF THE EVALUATION IS DONE IN OCTAL, THEN THE 13
EXHAUSTS THE FIRST RANGE OF NUMBERS SO THAT THE OCTAL 300 (DECIMAL
192) CAN BE ASSOCIATED WITH AN ADDITIONAL 13 OR CAN BE THE FIRST
NUMBER OF THE FOLLOWING PAIR OF NUMBERS.
.SKIP
EVALUATED BY ^^DANEXT \\AS THE SEQUENCE OF DECIMAL INTEGERS OR OF
DECIMAL REALS HAVING THE VALUES 10, 15, 20, 100, 200 AND 300 OR AS
THE SEQUENCE OF OCTAL INTEGERS HAVING THE DECIMAL VALUES 8, 13, 64,
128 AND 192. ^A COMMA COULD APPEAR BETWEEN THE 20 AND THE 100 OR
BETWEEN ANY OF THE FOLLOWING NUMBER REPRESENTATIONS.
.SKIP
.TEST PAGE 4
.INDENT -4
20/5/10 -400/100/-200!^^ANY CHARACTERS FORMING COMMENT
.SKIP
\\EVALUATED BY ^^DAPAIR \\AS THE PAIR OF DECIMAL INTEGERS OR OF
DECIMAL REALS HAVING THE VALUES 20 AND -400, FOLLOWED BY THE PAIR
HAVING THE VALUES 15 AND -300 AND FINALLY BY THE PAIR HAVING THE
VALUES 10 AND -200, OR AS THE PAIR OF OCTAL INTEGERS HAVING THE
DECIMAL VALUES 16 AND -256 (- 4X64) FOLLOWED BY THE PAIR HAVING THE
DECIMAL VALUES 11 (OCTAL 20 MINUS 5) AND -192 (OCTAL -400 PLUS OCTAL
100). ^A COMMA COULD APPEAR BETWEEN THE 10 AND THE -400. ^IF THE
EVALUATION IS DONE IN OCTAL, THEN THE 11 EXHAUSTS THE FIRST RANGE OF
NUMBERS SO THAT THE OCTAL -200 CAN BE ASSOCIATED WITH AN ADDITIONAL
11 OR CAN BE THE FIRST NUMBER OF THE FOLLOWING PAIR OF NUMBERS.
.SKIP
EVALUATED BY ^^DANEXT \\AS THE SEQUENCE OF DECIMAL INTEGERS OR OF
DECIMAL REALS HAVING THE VALUES 20, 15, 10, -400, -300 AND -200 OR
AS THE SEQUENCE OF OCTAL INTEGERS HAVING THE DECIMAL VALUES 16, 11,
-256, -192 AND -128. ^A COMMA COULD APPEAR BETWEEN THE 10 AND THE
-400.
.SKIP
.TEST PAGE 5
.INDENT -4
^^WORD
.SKIP
\\IDENTIFIED BY ^^DAVERB \\OR BY ^^DALOSS \\BY MATCHING THE WORD
AGAINST ALL OF THE WORDS IN A DICTIONARY SUPPLIED BY THE CALLING
PROGRAM. ^^DAVERB \\CAN ALSO IDENTIFY ANY ABBREVIATION WHICH
UNIQUELY SELECTS THE WORD.
.SKIP
.TEST PAGE 4
.INDENT -4
^^WORD,,WORD!ANY CHARACTERS FORMING COMMENT
.SKIP
\\IDENTIFIED BY ^^DALOSS \\AS AN APPEARANCE OF THE WORD NAMED
^^WORD, \\FOLLOWED BY A MISSING ITEM INDICATED BY THE EXTRA COMMA,
AND THEN BY AN APPEARANCE OF THE WORD NAMED ^^WORD.
.SKIP
.TEST PAGE 4
.INDENT -4
COMMAND 5.3 WORD 'QUOTED TEXT STRING'!ANY COMMENT
.SKIP
\\EVALUATED BY ^^DALEAD \\OR BY ^^DAHEST \\AS THE COMMAND WORD NAMED
^^COMMAND \\FOLLOWED BY THE ASSOCIATED DECIMAL INTEGER HAVING THE
VALUE 5 OR BY THE ASSOCIATED DECIMAL REAL HAVING THE VALUE 5.3,
FOLLOWED BY THE WORD NAMED ^^WORD \\ASSOCIATED WITH THE SAME COMMAND
AND THEN BY THE TEXT BETWEEN THE DELIMITING APOSTROPHES AGAIN
ASSOCIATED WITH THE SAME COMMAND. ^IF EVALUATED BY ^^DALEAD,
\\COMMAS COULD APPEAR BETWEEN THE COMMAND AND THE FIRST FOLLOWING
ITEM OR BETWEEN THE FOLLOWING ITEMS, AND THE NUMBER COULD ALSO BE
EVALUATED AS AN OCTAL INTEGER. ^IF EVALUATED BY ^^DAHEST, \\A COMMA
BETWEEN THE COMMAND AND THE FIRST FOLLOWING ITEM WOULD INDICATE A
MISSING ITEM, AND 2 OR MORE COMMAS BETWEEN ANY PAIR OF FOLLOWING
ITEMS WOULD SIMILARLY INDICATE 1 OR MORE MISSING ITEMS.
.SKIP
.TEST PAGE 4
.INDENT -4
^^ARRAY(12,3/5)=-10.2,16E-3,3K!ANY CHARACTERS FORMING COMMENT
.SKIP
T\\HE COMBINATION OF ^^DAPICK \\AND ^^DAVARY \\USED TOGETHER WITH
SEVERAL OTHER ROUTINES WOULD EVALUATE THE ABOVE TEXT AS THE
INSTRUCTIONS TO SET ^^ARRAY(12,3) \T\O -10.2, ARRAY(12,4) \T\O 0.016
\\AND ^^ARRAY(12,5) \T\O 3000. T\\HE NUMBERS APPEARING TO THE RIGHT
OF THE EQUALS SIGN COULD ALSO BE EVALUATED AS OCTAL INTEGERS OR AS
DECIMAL INTEGERS IF INDICATED BY THE DICTIONARY WHICH DESCRIBES THE
NAMED ARRAY.
.SKIP
.TEST PAGE 4
.INDENT -4
^^DEVICE:NAME.NAME[NUMBER,NUMBER]/OPTION:NUMBER/OPTION:'TEXT'
.SKIP
DAFLAG \\LOCATES BUT DOES NOT EVALUATE OR VERIFY THE COMPONENT PARTS
OF A ^^PDP-10 \\FILE SPECIFICATION SUCH AS THAT SHOWN ABOVE. ^THE
NAME FIELD CAN CONSIST OF SEVERAL WORDS SEPARATED BY PERIODS. ^THE
BRACKETED FIELD CAN CONTAIN SEVERAL NUMBERS OR WORDS SEPARATED BY
COMMAS. ^THE SEVERAL OPTION FIELDS CAN EACH CONTAIN SEVERAL WORDS OR
NUMBERS OR QUOTED TEXT STRINGS SEPARATED BY COLONS.
.LEFT MARGIN 0
.SUBTITLE ^CHARACTER ^SET ^USED BY THESE ^ROUTINES
.PAGE
.LEFT MARGIN 0
.FILL
.CENTER
^THE ^CHARACTER ^SET ^USED BY THESE ^ROUTINES
.CENTER
--- --------- --- ---- -- ----- --------
.SKIP
^ALTHOUGH THE LOGIC OF THE ROUTINES IN THIS PACKAGE WAS WRITTEN IN
SIMPLE, MACHINE INDEPENDENT ^^FORTRAN, \\CHARACTER SETS ARE NOT
STANDARDIZED. ^IN ADDITION TO THE SPACE (OR BLANK), THE UPPER AND
LOWER CASE LETTERS OF THE ALPHABET, AND THE CHARACTERS CUSTOMARILY
USED FOR THE REPRESENTATION OF NUMBERS IN SCIENTIFIC NOTATION, THE
FOLLOWING CHARACTERS ARE ALSO USED
.LEFT MARGIN 5
.SKIP
.INDENT -2
/#(SLASH) USED IN RANGE SPECIFICATIONS TO SEPARATE STARTING VALUE
FROM INCREMENT FROM FINAL VALUE. ^USED IN FRACTIONS TO SEPARATE
NUMERATOR FROM DENOMINATOR. ^USED IN A FILE SPECIFICATION TO START
EACH SWITCH FIELD.
.SKIP
.INDENT -2
*#(ASTERISK) USED IN A RANGE SPECIFICATION TO SEPARATE THE NUMBER OF
TIMES A PARTICULAR VALUE IS TO BE REPEATED FROM THE VALUE ITSELF.
^IN A FILE SPECIFICATION INTERPRETED BY THE ^^DAFLAG \\ROUTINE, EACH
APPEARANCE OF THE ASTERISK BECOMES A SEPARATE COMPONENT OF THE
CORRESPONDING FIELD EVEN IF NOT SEPARATED WITHIN THE TEXT FROM THE
OTHER CHARACTERS WHICH FORM THE FIELD.
.SKIP
.INDENT -2
'#(APOSTROPHE) USED TO MARK THE START AND END OF TEXT STRINGS WHICH
APPEAR EITHER AS THE ARGUMENT OF A COMMAND OR AS THE ARGUMENT OF A
SWITCH IN A FILE SPECIFICATION.
.SKIP
.INDENT -2
!#(EXCLAMATION) USED TO INDICATE THAT THE REMAINDER OF THE BUFFER
CONTENTS ARE TO BE IGNORED. ^USED BY THE PLOTTING ROUTINES FOR THE
RULING OF VERTICAL GRID LINES.
.SKIP
.INDENT -2
_&#(AMPERSAND) USED TO INDICATE THAT THE REMAINDER OF THE BUFFER
CONTENTS ARE TO BE IGNORED, BUT THAT THE USER INTENDS TO CONTINUE
INPUT ON THE FOLLOWING LINE. ^USED BY THE PLOTTING ROUTINES TO
INDICATE CURVE INTERSECTIONS AND SUPERIMPOSED POINTS.
.SKIP
.INDENT -2
;#(SEMICOLON) USED TO SEPARATE COMMANDS OR FILE SPECIFICATIONS TYPED
ON THE SAME LINE.
.SKIP
.INDENT -2
,#(COMMA) USED TO SEPARATE ADJACENT WORDS AND/OR NUMBERS IN A LIST.
^USED TO SEPARATE THE ARGUMENTS OF A COMMAND. ^USED IN A FILE
SPECIFICATION TO SEPARATE THE COMPONENTS OF A BRACKETED FIELD. ^USED
BY THE NAMED ARRAY MANIPULATION ROUTINES TO SEPARATE THE SUBSCRIPTS
OF AN ARRAY.
.SKIP
.INDENT -2
=#(EQUAL) USED BY THE NAMED ARRAY MANIPULATION ROUTINES TO SEPARATE
THE IDENTIFICATION OF AN ARRAY LOCATION FROM THE VALUE TO BE
INSERTED INTO THAT LOCATION. ^USED IN A FILE SPECIFICATION TO
SEPARATE DESTINATION FILE FROM SOURCE FILE.
.SKIP
.INDENT -2
%#(PERCENT) USED TO INDICATE THAT A NUMBER IS TO BE DIVIDED BY 100.
.SKIP
.INDENT -2
[#(LEFT#SQUARE#BRACKET) USED IN A FILE SPECIFICATION TO START A
BRACKETED FIELD. ^^A DATA \\STATEMENT IN THE ^^DAFLAG \\ROUTINE
DEFINES THIS CHARACTER IN 1^H NOTATION. ^A SECOND ^^DATA \\STATEMENT
WHICH HAS BEEN COMMENTED OUT WITH A ^C IN COLUMN 1 CONTAINS THE
OCTAL VALUE CORRESPONDING TO 5^H[ ON THE ^^PDP10, \\AND MUST BE
RESTORED IF THIS ROUTINE IS COMPILED USING THE ^F40 COMPILER.
.SKIP
.INDENT -2
]#(RIGHT#SQUARE#BRACKET) USED IN A FILE SPECIFICATION TO END A
BRACKETED FIELD. ^^A DATA \\STATEMENT IN THE ^^DAFLAG \\ROUTINE
DEFINES THIS CHARACTER IN 1^H NOTATION. ^A SECOND ^^DATA \\STATEMENT
WHICH HAS BEEN COMMENTED OUT WITH A ^C IN COLUMN 1 CONTAINS THE
OCTAL VALUE CORRESPONDING TO 5^H] ON THE ^^PDP10, \\AND MUST BE
RESTORED IF THIS ROUTINE IS COMPILED USING THE ^F40 COMPILER.
.SKIP
.INDENT -2
(#(LEFT#PARENTHESIS) USED BY THE NAMED ARRAY MANIPULATION ROUTINES
TO BEGIN THE SPECIFICATION OF THE SUBSCRIPTS OF AN ARRAY. ^USED BY
^^DAHEST \\TO MARK THE START OF A TEXT STRING WHICH WILL BE
TERMINATED BY A MATCHING ), OR AS THE TERMINATOR OF SUCH A TEXT
STRING WHICH HAS BEEN BEGUN BY AN INITIAL ).
.SKIP
.INDENT -2
)#(RIGHT#PARENTHESIS) USED BY THE NAMED ARRAY MANIPULATION ROUTINES
TO TERMINATE THE SPECIFICATION OF THE SUBSCRIPTS OF AN ARRAY. ^USED
BY ^^DAHEST \\TO MARK THE START OF A TEXT STRING WHICH WILL BE
TERMINATED BY A MATCHING (, OR AS THE TERMINATOR OF SUCH A TEXT
STRING WHICH HAS BEEN BEGUN BY AN INITIAL (.
.SKIP
.INDENT -2
:#(COLON) USED IN RANGE SPECIFICATIONS TO SEPARATE STARTING VALUE
FROM INCREMENT FROM FINAL VALUE. ^USED IN A FILE SPECIFICATION TO
TERMINATE A DEVICE NAME OR TO SEPARATE THE COMPONENTS OF A SWITCH
FIELD.
.SKIP
.INDENT -2
@#(AT) USED IN A FILE SPECIFICATION TO INDICATE THAT THE FILE BEING
SPECIFIED ITSELF CONTAINS A FILE SPECIFICATION.
.SKIP
.INDENT -2
$#(DOLLAR) USED WITHIN TEXT STRINGS BEING CONVERTED TO LARGE
PRINTABLE LETTERING TO MARK A FOLLOWING CHARACTER WHICH IS TO BE
TREATED AS A COMMAND RATHER THAN AS A CHARACTER TO BE REPRESENTED.
.SKIP
.INDENT -2
-#(MINUS) IN ADDITION TO ITS TRADITIONAL USE TO INDICATE THAT THE
NUMBER APPEARING IMMEDIATELY TO ITS RIGHT IS NEGATIVE, THE MINUS
SIGN IS USED BY THE PLOTTING ROUTINES FOR THE RULING OF HORIZONTAL
GRID LINES.
.SKIP
.INDENT -2
+#(PLUS) IN ADDITION TO ITS TRADITIONAL USE TO INDICATE THAT THE
NUMBER APPEARING IMMEDIATELY TO ITS RIGHT IS POSITIVE, THE PLUS SIGN
IS USED BY THE PLOTTING ROUTINES FOR THE MARKING OF GRID LINE
INTERSECTIONS.
.SKIP
.INDENT -2
?#(QUESTION) TYPED BY THE USER AT THE START OF A LINE TO REQUEST
ASSISTANCE.
.SKIP
.INDENT -4
TAB#(NONPRINTING#HORIZONTAL#TABULATION) EQUIVALENT TO ONE OR MORE
SPACES SUCH THAT THE NEXT CHARACTER WOULD APPEAR BEYOND THE NEXT
WHOLE NUMBER MULTIPLE OF THE TAB STOP INTERVAL. ^EACH TEST FOR A TAB
CHARACTER IS PRECEDED BY A TEST FOR A SPACE (BLANK). ^IF THE TAB
CHARACTER IS NOT AVAILABLE, THE VARIABLE NAMED ^^ITAB \\SHOULD IN
EACH ROUTINE IN WHICH IT APPEARS BE DEFINED AS A ^HOLLERITH SPACE
CHARACTER RATHER THAN A ^HOLLERITH TAB CHARACTER.
.SKIP
.LEFT MARGIN 0
^IN SOME CASES, SUCH AS THE INCLUSION OF AN @ SIGN OR = SIGN IN A
FILE SPECIFICATION, THE ^^FASP \\ROUTINES MERELY REPORT TO THE
CALLING PROGRAM THAT THE CHARACTER WAS FOUND, AND IT IS THE
RESPONSIBILITY OF THE CALLING PROGRAM TO TAKE THE APPROPRIATE ACTION.
.LEFT MARGIN 0
.FILL
.SUBTITLE ^CHARACTERS ^RECOGNIZED BY ^INTERPRETATIVE ^ROUTINES IN ^^FASP
.PAGE
.CENTER
C\\HARACTERS ^RECOGNIZED BY ^INTERPRETATIVE ^ROUTINES IN ^^FASP
.CENTER
---------- ---------- -- -------------- -------- -- ----
.SKIP
T\\HE MOST PRIMITIVE ROUTINES IN ^^FASP \\RECOGNIZE NO PRINTING
CHARACTERS OTHER THAN THOSE WHICH CAN FORM NUMBERS OR WHICH ARE
CONTAINED IN WORDS IN THE DICTIONARY SUPPLIED BY THE CALLING
PROGRAM. ^MOST OF THE ROUTINES WHICH CALL THESE PRIMITIVES ALLOW
PUNCTUATION CHARACTERS SUCH AS THE COMMA BETWEEN ADJACENT ITEMS, THE
SEMICOLON BETWEEN ADJACENT STATEMENTS ON A SINGLE LINE, THE
EXCLAMATION POINT BEFORE A COMMENT, AND THE AMPERSAND BEFORE A
COMMENT WHEN THE CURRENT STATEMENT IS TO BE CONTINUED ONTO THE NEXT
LINE. ^THE SPECIAL PRINTING CHARACTERS RECOGNIZED BY EACH OF THE
INTERPRETATIVE ROUTINES IN ^^FASP \\ARE LISTED IN THE TABLE BELOW.
^THE ROUTINES DEVOTED TO THE MANIPULATION OF NAMED ARRAYS ARE NOT
INCLUDED IN THIS TABLE.
.SKIP
.NOFILL
^^DAFLAG                      . * / : , ; ! _& ' [ ] @ =
.SKIP
DAHEFT       0-9  EKM%  + - .
DAIHFT       0-9  EKM%  + - .
.SKIP
DAHELP                                                    ?
.SKIP
DAHEST  A-Z  0-9  EKM%  + - .   / : , ; !   '         ( )
DAIHST  A-Z  0-9        + -     / : , ; !   '         ( )
.SKIP
DAJOIN       0-9  EKM%  + - .   /
.SKIP
DALEAD  A-Z  0-9  EKM%  + - .       , ; ! _& '
.SKIP
DALOSS  A-Z                         , ; ! _&
.SKIP
DAMISS       0-9  EKM%  + - .       , ; ! _&
.SKIP
DANEXT       0-9  EKM%  + - . * / : , ; ! _&
DAINXT       0-9        + -   * / : , ; ! _&
.SKIP
DAPAIR       0-9  EKM%  + - . * / : , ; ! _&
DAIPAR       0-9  EKM%  + - .       , ; ! _&
.SKIP
DARANK       0-9  EKM%  + - . * / : , ; ! _&
DAIRNK       0-9  EKM%  + - .       , ; ! _&
.SKIP
DASPAN       0-9  EKM%  + - . * / : , ; ! _&
DAISPN       0-9        + -   * / : , ; ! _&
.SKIP
DATEAM       0-9  EKM%  + - .       , ; ! _&
.SKIP
DATREK       0-9            .
.SKIP
DAVERB  A-Z
.FILL
.LEFT MARGIN 0
.SUBTITLE C\\ALLING ^HIERARCHIES AND ^SIZES OF THE ^^FASP R\\OUTINES
.PAGE
.CENTER
^CALLING ^HIERARCHIES AND ^SIZES OF THE ^^FASP R\\OUTINES
.CENTER
------- ----------- --- ----- -- --- ---- --------
.SKIP
^FOR EACH OF THE ROUTINES LISTED IN THE LEFT COLUMN IN THE FOLLOWING
TABLE, THE ROUTINES NAMED TO ITS RIGHT MUST ALSO BE LOADED. ^THE
EXTERNALLY CALLED ROUTINES ARE LISTED ALPHABETICALLY EXCEPT FOR
THOSE ROUTINES WHICH HAVE NAMES IN WHICH THE THIRD LETTER IS ^I,
THESE BEING LISTED JUST BELOW THE CORRESPONDING ROUTINE WITH REAL
NUMBER CAPABILITIES. ^IN PARENTHESES TO THE RIGHT OF EACH ROUTINE
NAME IS THE NUMBER OF ^^FORTRAN \\STATEMENTS, BOTH EXECUTABLE AND
NONEXECUTABLE BUT EXCLUDING COMMENTS, IN THAT PARTICULAR ROUTINE.
^AS AN EXAMPLE, THE TABLE ENTRY
.SKIP
.NOFILL
^^DATALL(119)-DAPLAT(455)-DARITE(312)
                       -PLTCUT( 61)
.LEFT MARGIN 0
.FILL
.SKIP
\\INDICATES THAT ^^DATALL \\WHICH CONTAINS 119 ^^FORTRAN
\\STATEMENTS, CALLS ^^DAPLAT \\WHICH CONTAINS 455 STATEMENTS AND
WHICH IN TURN CALLS THE 2 ROUTINES ^^DARITE \\AND ^^PLTCUT.
.SKIP
.NOFILL
DABASE( 36)
.SKIP
.TEST PAGE 2
DABELT(133)
DAIBLT( 66)
.SKIP
DACASE( 29)
.SKIP
DACOPY( 44)
.SKIP
.TEST PAGE 2
DAFILL( 82)
DAIFLL( 58)
.SKIP
DAFLAG(205)
.SKIP
DAGRID( 90)
.SKIP
.TEST PAGE 2
DAHEFT(177)
DAIHFT(149)
.SKIP
DAHELP( 14)
.SKIP
.TEST PAGE 3
DAHEST(328)-DAHEFT(177)
           -DAVERB(112)
DAIHST(322)-DAVERB(112)
.SKIP
DAJOIN( 82)-DAHEFT(177)
.SKIP
.TEST PAGE 2
DALEAD(104)-DAHEFT(177)
           -DAVERB(112)
.SKIP
DALINE(263)-DARITE(312)
.SKIP
DALIST( 42)-DALONE( 75)-DANUMB( 62)
.SKIP
DALOAD(271)
.SKIP
DALONE( 75)-DANUMB( 62)
.SKIP
DALOOP( 76)
.SKIP
DALOSS( 49)-DAVERB(112)
.SKIP
DAMISS( 54)-DAHEFT(177)
.SKIP
DAMOVE( 33)
.SKIP
DANAME( 69)
.SKIP
.TEST PAGE 2
DANEXT( 83)-DASPAN(120)-DAHEFT(177)
DAINXT( 42)-DAISPN(118)
.SKIP
DANUMB( 62)
.SKIP
.TEST PAGE 2
DAPAIR(146)-DANEXT( 83)-DASPAN(120)-DAHEFT(177)
DAIPAR( 98)-DAHEFT(177)
.SKIP
.TEST PAGE 2
DAPATH( 25)-DAMOVE( 33)
           -DANUMB( 62)
.SKIP
DAPICK(199)
.SKIP
.TEST PAGE 2
DAPLAT(455)-DARITE(312)
           -PLTCUT( 61)
.SKIP
.TEST PAGE 2
DARANK( 88)-DANEXT( 83)-DASPAN(120)-DAHEFT(177)
DAIRNK( 60)-DAMISS( 54)-DAHEFT(177)
.SKIP
DARITE(312)
.SKIP
DAROME( 71)
.SKIP
.TEST PAGE 2
DASAVE(230)-DABOTH( 42)-DANUMB( 62)
           -DANUMB( 62)
.SKIP
.TEST PAGE 2
DASHOW( 23)-DANUMB( 62)
           -DARITE(312)
.SKIP
DASITE( 76)
.SKIP
.TEST PAGE 2
DASPAN(120)-DAHEFT(177)
DAISPN(118)
.SKIP
DASWAP( 25)
.SKIP
.TEST PAGE 2
DATALL(119)-DAPLAT(455)-DARITE(312)
                       -PLTCUT( 61)
.SKIP
DATEAM( 38)-DAHEFT(177)
.SKIP
DATEXT(269)-\\ONE FONT OF APPROXIMATELY 20 STATEMENTS *
.SKIP
^^DATREE(105)
.SKIP
DATREK( 43)
.SKIP
DATURN(273)-\\ONE FONT OF APPROXIMATELY 20 STATEMENTS *
.SKIP
.TEST PAGE 3
^^DAVARY( 58)-DANEXT( 83)-DASPAN(120)-DAHEFT(177)
           -DANUMB( 62)
           -DARITE(312)
.SKIP
DAVERB(112)
.SKIP
.FILL
.TEST PAGE 2
.LEFT MARGIN 2
.INDENT -2
*#T\\HE FONTS CONTAIN DESCRIPTIONS OF THE CHARACTER SHAPES, AND ARE
NAMED ^^TEXT1, TEXT2, TEXT3 \\AND SO ON.
.LEFT MARGIN 0
.SUBTITLE ^AN ^INTRODUCTION TO ^CHARACTER ^MANIPULATION IN ^^FORTRAN
.PAGE
.CENTER
A\N I\\NTRODUCTION TO ^CHARACTER ^MANIPULATION IN ^^FORTRAN
.CENTER
-- ------------ -- --------- ------------ -- -------
.SKIP
I\\NTERACTIVE PROGRAMS OFTEN ALLOW THE USER TO SELECT ONE ITEM FROM
A GROUP OF POSSIBLE CHOICES. ^THE EASIEST WAY FOR THE PROGRAMMER TO
PROVIDE THIS FEATURE IS TO ASSIGN A DIFFERENT NUMBER TO EACH
POSSIBLE CHOICE, THEN TO HAVE THE PROGRAM ASK FOR AND ACCEPT THE
NUMBER. ^THIS PLACES UPON THE USER THE BURDEN EITHER OF REMEMBERING
OR OF FINDING THE NUMBER CORRESPONDING TO THE ITEM BEING SELECTED.
^USING SUCH A METHOD, A TYPICAL INTERACTION WITH THE USER COULD BE
PERFORMED BY THE ^^FORTRAN \\STATEMENTS (IN WHICH THE $ IN THE
FORMAT MERELY ALLOWS THE USER TO ANSWER ON THE SAME LINE)
.SKIP
.NOFILL
    1 ^^TYPE 2
    2 FORMAT(' METHOD OF SHIPMENT (TYPE 0 FOR LIST)? ',$)
      ACCEPT 3,METHOD
    3 FORMAT(I)
      IF((METHOD.GT.0).AND.(METHOD.LE.3))GO TO 5
      TYPE 4
    4 FORMAT(' POSSIBLE CHOICES ARE:'/
     1' 1 TRUCK'/
     2' 2 TRAIN'/
     3' 3 PLANE')
      GO TO 1
    5 CONTINUE
.SKIP
.FILL
T\\HE SAMPLE QUESTION WOULD BE EASIER TO ANSWER CORRECTLY IF THE
WORDS ^^TRUCK, TRAIN \\AND ^^PLANE \\COULD BE TYPED DIRECTLY INSTEAD
OF THE NUMBERS SELECTING THESE RESPONSES. ^IF THE ACCEPTED WORDS ARE
SELECTED TO EACH BEGIN WITH DIFFERENT LETTERS, THEN A SINGLE LETTER
RESPONSE CAN BE READ WITH AN ^A1 FORMAT. ^IN THE ABOVE EXAMPLE, THE
WORDS ^^TRUCK \\AND ^^TRAIN \\BOTH START WITH THE LETTER ^T, BUT THE
^^TRAIN \\RESPONSE CAN INSTEAD BE CHANGED TO ^^RAIL. T\H\E FORTRAN
\\STATEMENTS TO PERFORM THE INTERACTION COULD THEN BE REWRITTEN
.SKIP
.NOFILL
      ^^DIMENSION LETTER(3)
      DATA LETTER/1HT,1HR,1HP/
    1 TYPE 2
    2 FORMAT(' METHOD OF SHIPMENT? ',$)
      ACCEPT 3,IRSPNS
    3 FORMAT(1A1)
      METHOD=1
    4 IF(IRSPNS.EQ.LETTER(METHOD))GO TO 6
      METHOD=METHOD+1
      IF(METHOD.LE.3)GO TO 4
      TYPE 5
    5 FORMAT(' POSSIBLE CHOICES ARE:'/
     1' TRUCK'/
     2' RAIL'/
     3' PLANE')
      GO TO 1
    6 CONTINUE
.SKIP
.FILL
F\\REE FORMAT RESPONSES ARE NOT ACCEPTED BY THE ABOVE ^^FORTRAN
\\STATEMENTS. ^THE IDENTIFYING CHARACTER MUST BE THE FIRST CHARACTER
TYPED BY THE USER. ^THE RESPONSE IS NOT RECOGNIZED IF PRECEDED BY A
SPACE. ^THIS DIFFICULTY COULD BE CIRCUMVENTED BY READING THE
RESPONSE WITH A LARGER ^A FORMAT, PERHAPS ^A4, AND TESTING AGAINST
THE POSSIBLE SEQUENCES
.SKIP
.NOFILL
.LEFT MARGIN 10
4^^HT   ,4H T  ,4H  T ,4H   T
4HR   ,4H R  ,4H  R ,4H   R
4HP   ,4H P  ,4H  P ,4H   P
.LEFT MARGIN 0
.SKIP
.FILL
H\\OWEVER, THE USER WHO TYPED MORE THAN A SINGLE CHARACTER
ABBREVIATION WOULD FIND THAT SUCH A RESPONSE WOULD BE REJECTED, SO
THE RANGE OF CHARACTER SEQUENCES TESTED AGAINST FOR JUST THE SINGLE
WORD ^^TRUCK \\WOULD HAVE TO BE EXPANDED STILL FURTHER TO INCLUDE
.SKIP
.NOFILL
.LEFT MARGIN 10
4^^HT   ,4H T  ,4H  T ,4H   T
4HTR  ,4H TR ,4H  TR
4HTRU ,4H TRU
4HTRUC
.LEFT MARGIN 0
.SKIP
.FILL
S\\UCH A SCHEME BECOMES IMPRACTICAL. ^AN ALTERNATIVE METHOD IS TO
READ THE USER'S RESPONSE INTO AN ARRAY, 1 CHARACTER PER ARRAY
LOCATION, WITH A MULTIPLE OF AN ^A1 FORMAT. ^IF, AS IS PROBABLE, THE
USER TYPES FEWER CHARACTERS THAN THE ARRAY CAN HOLD, THEN SPACES ARE
PLACED INTO THE ARRAY LOCATIONS TO THE RIGHT OF (HAVING HIGHER
SUBSCRIPTS THAN) THOSE CONTAINING THE CHARACTERS ACTUALLY TYPED.
^THE ^^FORTRAN \\STATEMENTS SHOWN BELOW CAN THEN SEARCH FOR THE
FIRST PRINTING CHARACTER IN THE ARRAY.
.SKIP
.FILL
.NOFILL
      ^^DIMENSION LETTER(3),IRSPNS(10)
      DATA ISPACE/1H /,LETTER/1HT,1HR,1HP/
    1 TYPE 2
    2 FORMAT(' METHOD OF SHIPMENT? ',$)
      ACCEPT 3,IRSPNS
    3 FORMAT(10A1)
      INITAL=1
    4 IF(IRSPNS(INITAL).NE.ISPACE)GO TO 5
      IF(INITAL.GE.10)GO TO 7
      INITAL=INITAL+1
      GO TO 4
    5 METHOD=1
    6 IF(IRSPNS(INITAL).EQ.LETTER(METHOD))GO TO 9
      METHOD=METHOD+1
      IF(METHOD.LE.3)GO TO 6
    7 TYPE 8
    8 FORMAT(' POSSIBLE CHOICES ARE:'/
     1' TRUCK'/
     2' RAIL'/
     3' PLANE')
      GO TO 1
    9 CONTINUE
.SKIP
.FILL
I\\F THE PROGRAM MUST ACCEPT EITHER AN ALPHABETIC OR A NUMERIC
RESPONSE TO THE QUESTION, THEN THE FIRST PRINTING CHARACTER MUST
ALSO BE COMPARED WITH EACH OF THE POSSIBLE DIGITS. ^IF A DIGIT IS
FOUND, THEN THE CURRENTLY STORED NUMERIC VALUE, IF ANY, MUST BE
SHIFTED, AND THE VALUE OF THE NEW DIGIT INSERTED INTO THE LEAST
SIGNIFICANT END OF THE STORED VALUE, FOLLOWING WHICH THE NEXT
CHARACTER TYPED BY THE USER MUST BE SIMILARLY TESTED. ^EITHER AN
ALPHABETIC OR A NUMERIC RESPONSE IS IDENTIFIED BY THE FOLLOWING
^^FORTRAN \\STATEMENTS
.SKIP
.NOFILL
      ^^DIMENSION LETTER(3),IRSPNS(10),IDIGIT(10)
      DATA IDIGIT/1H0,1H1,1H2,1H3,1H4,1H5,1H6,1H7,1H8,1H9/
      DATA ISPACE/1H /,LETTER/1HT,1HR,1HP/
C
C     ASK FOR AND ACCEPT RESPONSE
    1 TYPE 2
    2 FORMAT(' METHOD OF SHIPMENT OR MONTHS TO STORE? ',$)
      ACCEPT 3,IRSPNS
    3 FORMAT(10A1)
C
C     LOOK FOR FIRST PRINTING CHARACTER
      INITAL=1
    4 IF(IRSPNS(INITAL).NE.ISPACE)GO TO 5
      IF(INITAL.GE.10)GO TO 10
      INITAL=INITAL+1
      GO TO 4
C
C     CHECK FOR WORDS TRUCK, RAIL AND PLANE
    5 METHOD=1
    6 IF(IRSPNS(INITAL).EQ.LETTER(METHOD))GO TO 12
      METHOD=METHOD+1
      IF(METHOD.LE.3)GO TO 6
      MONTHS=0
C
C     CHECK IF NUMBER ISSUED INSTEAD OF TRANSFER METHOD
    7 LTRTST=IRSPNS(INITAL)
      DO 8 JDIGIT=1,10
      IF(LTRTST.NE.IDIGIT(JDIGIT))GO TO 8
      MONTHS=(10*MONTHS)+JDIGIT-1
      INITAL=INITAL+1
      IF(INITAL.LE.10)GO TO 7
      GO TO 9
    8 CONTINUE
    9 IF(MONTHS.GT.0)GO TO 12
C
C     PROMPT USER IF WRONG RESPONSE GIVEN
   10 TYPE 11
   11 FORMAT(' POSSIBLE CHOICES ARE:'/
     1' TRUCK'/
     2' RAIL'/
     3' PLANE'/
     4' OR NUMBER OF MONTHS WHICH PRODUCT IS TO BE STORED')
      GO TO 1
   12 CONTINUE
.SKIP
.FILL
T\\HE APPEARANCE OF A SIMILAR GROUP OF ^^FORTRAN \\STATEMENTS AFTER
EACH QUESTION FOR THE IDENTIFICATION OF THE USER RESPONSE MIGHT BE
ACCEPTABLE IF ONLY A FEW QUESTIONS ARE ASKED BY THE ENTIRE PROGRAM.
^HOWEVER, IF THE PROGRAM IS TO ASK MANY QUESTIONS, THEN IT BECOMES
REASONABLE TO SEPARATE THE EVALUATION STATEMENTS INTO ONE OR MORE
GENERAL SUBROUTINES WHICH ARE CALLED WHENEVER A RESPONSE MUST BE
EVALUATED. ^EACH SUBROUTINE CAN THEN DO MUCH MORE EVALUATION AND
VALIDATION SINCE THE STATEMENTS APPEAR ONLY WITHIN THE SUBROUTINES
RATHER THAN BEING DUPLICATED AT MANY SITES. ^^FASP \\INCLUDES
SEVERAL SUCH SUBROUTINES. ^CALLING TWO OF THESE SUBROUTINES,
^^DALOSS \\FOR THE IDENTIFICATION AND VALIDATION OF WORDS AND
^^DAHEFT \\FOR THE EVALUATION OF NUMBERS, THE ^^FORTRAN \\STATEMENTS
SHOWN ABOVE CAN BE REWRITTEN
.SKIP
.NOFILL
      ^^DIMENSION LETTER(14),KNTLTR(3),IRSPNS(10)
      DATA LETTER/1HT,1HR,1HU,1HC,1HK,1HR,1HA,1HI,1HL,
     11HP,1HL,1HA,1HN,1HE/,KNTLTR/5,4,5/
C
C     ASK FOR AND ACCEPT RESPONSE
    1 TYPE 2
    2 FORMAT(' METHOD OF SHIPMENT OR MONTHS TO STORE? ',$)
      ACCEPT 3,IRSPNS
    3 FORMAT(10A1)
      INITAL=1
      MANY=0
C
C     CHECK FOR WORDS TRUCK, RAIL AND PLANE
    4 CALL DALOSS(1,14,LETTER,1,3,KNTLTR,IRSPNS,10,INITAL,
     1KIND,METHOD,LCNWRD,LCNKNT,LCNBFR,MANY,LCNERR)
      GO TO(1,5,8,8,6,6,6,6,4,1,4),KIND
C
C     CHECK IF NUMBER ISSUED INSTEAD OF TRANSFER METHOD
    5 METHOD=4
      CALL DAHEFT(0,1,0,IRSPNS,10,INITAL,KIND,
     1ISHIFT,JSHIFT,KSHIFT,LSHIFT,MONTHS,VALUE)
      IF(KIND.NE.3)GO TO 6
      IF(MONTHS.GT.0)GO TO 8
C
C     PROMPT USER IF WRONG RESPONSE GIVEN
    6 TYPE 7
    7 FORMAT(' POSSIBLE CHOICES ARE:'/
     1' TRUCK'/
     2' RAIL'/
     3' PLANE'/
     4' OR NUMBER OF MONTHS WHICH PRODUCT IS TO BE STORED')
      GO TO 1
    8 CONTINUE
.SKIP
.FILL
T\\HROUGH THE USE OF THE ^^FASP \\ROUTINES, ABBREVIATIONS ARE
REJECTED IF AMBIGUOUS OR IF MISSPELLED, NUMBERS CAN INCLUDE SIGN AND
DECIMAL POINT AND EXPONENT, AND COMMENTS CAN BE INCLUDED TO THE
RIGHT OF EITHER EXCLAMATION POINTS OR AMPERSANDS.
.SUBTITLE ^^DABASE, R\\OUTINE TO ^LOCATE ^LOGICAL ^GROUP OF ^NAMED ^ARRAYS
.PAGE
.NOFILL
.LEFT MARGIN 0
^^DDDDD          AAA  BBBBBB          AAA    SSSSSS  EEEEEEEE
DD   DD       AAAA  BB    BB       AAAA  SS        EE
DD    DD     AA AA  BB    BB      AA AA  SS        EE
DD    DD    AA  AA  BBBBBB       AA  AA    SSSS    EEEEE
DD    DD   AAAAAAA  BB    BB    AAAAAAA        SS  EE
DD   DD   AA    AA  BB    BB   AA    AA        SS  EE
DDDDD    AA     AA  BBBBBB    AA     AA  SSSSSS    EEEEEEEE
.SKIP 3
.FILL
.CENTER
DABASE, R\\OUTINE TO ^LOCATE ^LOGICAL ^GROUP OF ^NAMED ^ARRAYS
.CENTER
------##------- -- ------ ------- ----- -- ----- ------
.SKIP
^^DABASE \\LOCATES A DESIRED LOGICAL GROUP OF ARRAY NAMES WITHIN THE
DICTIONARY WHICH IS CREATED BY ^^DALOAD \\AND WHICH IS USED BY
SEVERAL OTHER ROUTINES IN THE ^^FASP \\PACKAGE FOR THE MANIPULATION
OF MULTIPLY SUBSCRIPTED ARRAYS EQUIVALENCED WITH OR OTHERWISE LOADED
INTO A SINGLY SUBSCRIPTED BUFFER. ^^DABASE \\CAN IDENTIFY THE
LOGICAL GROUP BY ITS NAME, BY ITS POSITION IN THE DICTIONARY
RELATIVE TO THE OTHER LOGICAL GROUPS, OR BY A PARTICULAR VALUE BEING
STORED AS SUBSCRIPT RANGE INFORMATION ASSOCIATED WITH THE NAME.
.SKIP
^AFTER ^^DABASE \\HAS LOCATED THE LOGICAL GROUP OF NAMES, THE
ROUTINE ^^DANAME \\CAN BE CALLED TO IDENTIFY THE ARRAY NAME AND
SUBSCRIPTS ASSOCIATED WITH A KNOWN LOCATION IN THE SINGLY
SUBSCRIPTED BUFFER. ^THE COMBINATION OF ^^DABASE \\AND ^^DANAME
\\ENABLE A PROGRAM TO CYCLE THROUGH THE DATA BASE IN SOME
PREDETERMINED FASHION. ^TYPICAL APPLICATIONS OF ^^DABASE \\AND
^^DANAME \\WOULD BE TO ALLOW A PROGRAM TO REPORT THE NON-ZERO VALUES
IN ITS COMMON BLOCKS, OR IN THE WRITING OF A PROGRAM TO COMPARE THE
VALUES IN DATA FILES CONTAINING DIFFERENT VERSIONS OF THE VALUES TO
BE LOADED INTO SUCH COMMON BLOCKS.
.SKIP 3
.CENTER
^THE ^^DABASE A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DABASE \I\S
.SKIP
.NOFILL
      SUBROUTINE DABASE(LOCATE,LTRLFT,LTRRIT,LTRNAM,IVALUE,
     1    LTRLOW,LTRUSD,LTRSTR,NUMLOW,NUMUSD,NUMSTR,LRGLTR,
     2    LRGNUM,LRGKNT)
.SKIP
.FILL
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
.NOFILL
      ^^DIMENSION LTRNAM(LTRRIT),LTRSTR(LTRUSD),NUMSTR(NUMUSD)
.SKIP
.FILL
T\\HE FOLLOWING ARE INPUT ARGUMENTS LEFT UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LOCATE#=#\\IDENTIFIES HOW THE LOGICAL GROUP OF ARRAY NAMES IS TO
BE SELECTED.
.INDENT -2
=#-1, LOOK FOR THE LOGICAL GROUP HAVING AS ITS NAME THE CHARACTERS
STORED IN ^^LTRNAM(LTRLFT) \\THROUGH AND INCLUDING ^^LTRNAM(LTRRIT).
T\\HE NAME OF THE LOGICAL GROUP IS THE NAME APPEARING BETWEEN
SLASHES AT THE START OF THE SPECIFICATION OF THE CONTENTS OF THE
GROUP AS READ BY THE ^^DALOAD \\ROUTINE. ^THE CHARACTERS IN ^^LTRNAM
\\ARE STORED 1 CHARACTER PER ARRAY LOCATION AS READ BY A MULTIPLE OF
^A1 FORMAT OR DEFINED BY SEVERAL 1^H FIELDS. ^THE NAME IN
^^LTRNAM(LTRLFT) \\THROUGH AND INCLUDING ^^LTRNAM(LTRRIT) \\MUST
MATCH THE NAME OF THE LOGICAL GROUP EXACTLY. ^ABBREVIATIONS ARE NOT
RECOGNIZED, AND EXCESS CHARACTERS PREVENT A MATCH. ^IF A PARTICULAR
LOGICAL GROUP IS NOT NAMED, THEN THAT LOGICAL GROUP CANNOT BE
IDENTIFIED IN THIS MANNER.
.INDENT -2
=#0, LOOK FOR THE LOGICAL GROUP THE POSITION OF WHICH RELATIVE TO
ALL LOGICAL GROUPS IN THE DICTIONARY MATCHES THE VALUE INPUT IN
ARGUMENT ^^IVALUE. I\F IVALUE \\HAS THE VALUE 4, THEN THE FOURTH
LOGICAL GROUP IN THE DICTIONARY WOULD BE SEARCHED FOR.
.INDENT -2
=#GREATER THAN ZERO, SEARCH FOR A LOGICAL GROUP HAVING A VALUE EQUAL
TO THE INPUT VALUE OF THE ARGUMENT ^^IVALUE \\IN THE SUBSCRIPT RANGE
STORAGE LOCATION IDENTIFIED BY THE VALUE OF ^^LOCATE. LOCATE=1
\\WOULD TEST AGAINST THE LOWER BOUND OF THE FIRST SUBSCRIPT, =2
AGAINST THE UPPER BOUND OF THE FIRST SUBSCRIPT, AND =4 AGAINST THE
UPPER BOUND OF THE SECOND SUBSCRIPT. ^IF THE SUBSCRIPT RANGE
INFORMATION ASSOCIATED WITH A PARTICULAR LOGICAL GROUP CONTAINS LESS
THAN ^^LOCATE \\VALUES, THEN THAT LOGICAL GROUP CANNOT BE IDENTIFIED
IN THIS MANNER.
.SKIP
.INDENT -9
^^LTRLFT#=#\\SUBSCRIPT OF THE ^^LTRNAM \\ARRAY LOCATION CONTAINING
THE FIRST CHARACTER OF THE NAME TO BE MATCHED AGAINST IF ^^LOCATE=-1.
.SKIP
.INDENT -9
LTRRIT#=#\\SUBSCRIPT OF THE ^^LTRNAM \\ARRAY LOCATION CONTAINING THE
FINAL CHARACTER OF THE NAME TO BE MATCHED AGAINST IF ^^LOCATE=-1.
.SKIP
.INDENT -9
LTRNAM#=#\\ARRAY CONTAINING IN LOCATIONS ^^LTRNAM(LTRLFT) \\THROUGH
AND INCLUDING ^^LTRNAM(LTRRIT) \\THE CHARACTERS OF THE NAME TO BE
MATCHED AGAINST IF ^^LOCATE=-1. T\\HE CHARACTERS IN ^^LTRNAM \\ARE
STORED 1 CHARACTER PER ARRAY LOCATION AS READ BY A MULTIPLE OF AN
^A1 FORMAT OR DEFINED BY SEVERAL 1^H FIELDS.
.SKIP
.INDENT -9
^^IVALUE#=#\\THE SEQUENCE NUMBER OF THE LOGICAL GROUP TO BE FOUND
(THE COUNT RELATIVE TO ALL LOGICAL GROUPS IN THE DICTIONARY) IF
^^LOCATE=0.
.INDENT -2
=#\\THE VALUE TO BE MATCHED AGAINST IN THE SUBSCRIPT RANGE STORAGE
LOCATION IDENTIFIED BY THE VALUE OF ^^LOCATE \I\F LOCATE \I\S
\\GREATER THAN ZERO.
.SKIP
.INDENT -9
^^LTRLOW#=#\\LOWEST SUBSCRIPT OF THE LOCATIONS IN THE ^^LTRSTR
\\ARRAY CONTAINING THE CHARACTERS OF THE NAMES IN THE DICTIONARY AS
ORIGINALLY READ BY ^^DALOAD \\USING A MULTIPLE OF AN ^A1 FORMAT.
^^LTRSTR(LTRLOW) \\CONTAINS EITHER THE FIRST LETTER OF THE NAME OF
THE FIRST LOGICAL GROUP OF NAMES IN THE DICTIONARY OR ELSE (IF THE
FIRST GROUP ITSELF ISN'T NAMED) THE FIRST LETTER OF THE FIRST NAME
WITHIN THE FIRST LOGICAL GROUP IN THE DICTIONARY.
.SKIP
.INDENT -9
^^LTRUSD#=#\\HIGHEST SUBSCRIPT OF THE LOCATIONS IN THE ^^LTRSTR
\\ARRAY CONTAINING THE CHARACTERS OF THE NAMES IN THE DICTIONARY AS
ORIGINALLY READ BY ^^DALOAD \\USING A MULTIPLE OF AN ^A1 FORMAT.
^^LTRSTR(LTRUSD) \\CONTAINS THE LAST CHARACTER OF THE LAST NAME IN
THE DICTIONARY.
.SKIP
.INDENT -9
^^LTRSTR#=#\\ARRAY CONTAINING THE CHARACTERS FORMING THE NAMES IN
THE DICTIONARY, 1 CHARACTER PER ARRAY LOCATION AS ORIGINALLY READ BY
^^DALOAD \\USING A MULTIPLE OF AN ^A1 FORMAT.
.SKIP
.INDENT -9
^^NUMLOW#=#\\LOWEST SUBSCRIPT OF THE LOCATIONS IN THE ^^NUMSTR
\\ARRAY CONTAINING THE NUMERIC INFORMATION CORRESPONDING TO THE
NAMES STORED IN THE ^^LTRSTR \\ARRAY. ^^NUMSTR(NUMLOW) \\MUST
CONTAIN THE START OF THE DESCRIPTION OF A LOGICAL GROUP OF NAMES,
NOT THE START OF THE DESCRIPTION OF AN INDIVIDUAL NAME.
.SKIP
.INDENT -9
^^NUMUSD#=#\\HIGHEST SUBSCRIPT OF THE LOCATIONS IN THE ^^NUMSTR
\\ARRAY CONTAINING THE NUMERIC INFORMATION CORRESPONDING TO THE
NAMES STORED IN THE ^^LTRSTR \\ARRAY.
.SKIP
.INDENT -9
^^NUMSTR#=#\\ARRAY CONTAINING THE NUMERIC INFORMATION CORRESPONDING
TO THE NAMES STORED IN THE ^^LTRSTR \\ARRAY. ^THE CONSTRUCTION OF
THE ^^NUMSTR \\ARRAY IS DESCRIBED IN DETAIL IN THE ^^DALOAD
\\DOCUMENTATION. ^FOR EACH NAME IN THE DICTIONARY, THE ^^NUMSTR
\\ARRAY CONTAINS
.SKIP
.LEFT MARGIN 14
.INDENT -3
A.#THE NUMBER OF CHARACTERS IN THE NAME
.SKIP
.INDENT -3
B.#AN INDICATION OF THE ASSOCIATED DATA TYPE
.SKIP
.INDENT -3
C.#THE NUMBER OF SUBSCRIPT RANGES
.SKIP
.INDENT -3
D.#PAIRS OF STARTING AND ENDING VALUES OF THESE RANGES.
.SKIP
.LEFT MARGIN 9
^IF THE NUMBER OF CHARACTERS IS INSTEAD ZERO OR NEGATIVE, THEN ITS
ABSOLUTE VALUE IS THE NUMBER OF CHARACTERS IN THE NAME OF A LOGICAL
GROUP OF NAMES, AND THE NEXT LOCATION, RATHER THAN INDICATING THE
DATA TYPE, CONTAINS THE NUMBER OF LOCATIONS WITHIN A SINGLY
SUBSCRIPTED BUFFER WHICH WOULD BE NEEDED TO STORE THE VALUES OF THE
MULTIPLY SUBSCRIPTED ARRAYS WHICH ARE WITHIN THE LOGICAL GROUP AND
EQUIVALENCED WITH OR OTHERWISE LOADED INTO SUCH A SINGLY SUBSCRIPTED
BUFFER.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED FOR OUTPUT FROM THIS ROUTINE.
^THEIR INPUT VALUES ARE IGNORED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LRGLTR#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^LTRSTR
\\ARRAY LOCATION WHICH CONTAINS THE FIRST LETTER OF THE NAME
ASSOCIATED WITH THE LOGICAL GROUP OF NAMES IN THE DICTIONARY WHICH
HAS BEEN IDENTIFIED BY THIS ROUTINE. ^IF THE LOGICAL GROUP DOES NOT
HAVE A NAME (^^NUMSTR(LRGNUM) \\BEING ZERO), THEN ^^LRGLTR \I\S
\\RETURNED POINTING TO THE ^^LTRSTR \\ARRAY LOCATION CONTAINING THE
FIRST LETTER OF THE FIRST NAME WITHIN THE GROUP.
.SKIP
.INDENT -9
^^LRGNUM#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^NUMSTR
\\ARRAY LOCATION WHICH CONTAINS THE FIRST OF THE NUMERIC INFORMATION
ASSOCIATED WITH THE LOGICAL GROUP OF NAMES IN THE DICTIONARY WHICH
WAS IDENTIFIED BY THIS ROUTINE. ^^NUMSTR(LRGNUM) \\CONTAINS AS ITS
ABSOLUTE VALUE THE NUMBER OF CHARACTERS STARTING AT ^^LTRSTR(LRGLTR)
\\WHICH ARE CONTAINED IN THE NAME, IF ANY, OF THE LOGICAL GROUP OF
NAMES. ^^NUMSTR(LRGNUM+1) \\CONTAINS THE NUMBER OF LOCATIONS WITHIN
A SINGLY SUBSCRIPTED BUFFER WHICH WOULD BE NEEDED TO STORE THE
VALUES OF THE MULTIPLY SUBSCRIPTED ARRAYS WHICH ARE WITHIN THE
LOGICAL GROUP AND EQUIVALENCED WITH OR OTHERWISE LOADED INTO SUCH A
SINGLY SUBSCRIPTED BUFFER.
.SKIP
.INDENT -9
^^LRGKNT#=#\\RETURNED CONTAINING THE SEQUENCE NUMBER WITHIN THE
DICTIONARY OF THE LOGICAL GROUP OF NAMES IDENTIFIED BY THIS ROUTINE.
^IF THE THIRD LOGICAL GROUP IN THE DICTIONARY IS IDENTIFIED, THEN
^^LRGKNT \\WOULD BE RETURNED CONTAINING THE VALUE 3. ^IF MORE THAN
ONE LOGICAL GROUP MATCHES THE GIVEN SPECIFICATIONS, THEN THE FIRST
GROUP WHICH MATCHES THE SPECIFICATIONS IS THAT IDENTIFIED TO THE
CALLING PROGRAM. ^^LRGKNT \\IS RETURNED CONTAINING ZERO IF NO
LOGICAL GROUP IN THE DICTIONARY MATCHED THE GIVEN SPECIFICATIONS.
.SUBTITLE ^^DABELT, R\\OUTINE TO ^REPRESENT ^COLUMN ^NUMBERS
.PAGE
.NOFILL
.LEFT MARGIN 0
^^DDDDD           AAA   BBBBBB     EEEEEEEE   LL      TTTTTTTT
DD   DD        AAAA   BB    BB   EE         LL         TT
DD    DD      AA AA   BB    BB   EE         LL         TT
DD    DD     AA  AA   BBBBBB     EEEEE      LL         TT
DD    DD    AAAAAAA   BB    BB   EE         LL         TT
DD   DD    AA    AA   BB    BB   EE         LL         TT
DDDDD     AA     AA   BBBBBB     EEEEEEEE   LLLLLLLL   TT
.FILL
.SKIP 3
.CENTER
DABELT, R\\OUTINE TO ^REPRESENT ^COLUMN ^NUMBERS
.CENTER
------##------- -- --------- ------ -------
.SKIP
^WHEN A PROGRAM NEEDS TO DISPLAY TO THE USER A LINE OF CHARACTERS IN
WHICH THE CHARACTERS ARE ORIENTED BY COLUMNS, A BAND OF NUMBERS
IDENTIFYING THE COLUMNS CAN BE PRINTED, EITHER ABOVE OR BELOW THE
MAIN DISPLAY, BY CALLING THE ^^DABELT \\ROUTINE TO GENERATE EACH
LINE OF THE REPRESENTATION OF THE COLUMN NUMBERS IN A BUFFER ARRAY
WHICH THE CALLING PROGRAM CAN THEN PRINT WITH A MULTIPLE OF AN ^A1
FORMAT. ^^DABELT \\IS CALLED AS MANY TIMES AS THERE ARE LINES IN THE
REPRESENTATION OF THE COLUMN NUMBERS, THE CALLING PROGRAM PRINTING
THE RETURNED CHARACTERS BEFORE AGAIN ASKING ^^DABELT \\TO GENERATE
THE NEXT LINE.
.SKIP
^THE NUMBERS CAN BE GENERATED WITH EACH LINE CONTAINING DIGITS
CORRESPONDING TO THE SAME POWER OF 10 AS IN THE FOLLOWING EXAMPLE
.SKIP
.NOFILL
.LEFT MARGIN 14
5432109876543210123456789012345
111111---------          111111
------
.FILL
.LEFT MARGIN 0
.SKIP
OR WITH EACH LINE CONTAINING DIGITS OF THE SAME SIGNIFICANCE AS IN
THE FOLLOWING EXAMPLE.
.SKIP
.NOFILL
.LEFT MARGIN 14
---------------0123456789111111
111111987654321          012345
543210
.SKIP
.FILL
.LEFT MARGIN 0
^THE NUMBERS CAN DECREASE FROM LEFT TO RIGHT AS IN THE FOLLOWING
EXAMPLE
.SKIP
.NOFILL
.LEFT MARGIN 14
5432109876543210123456789012345
111111          ---------111111
                         ------
.SKIP
.FILL
.LEFT MARGIN 0
AND CAN HAVE ANY DESIRED SPACING AND INCREMENT BETWEEN ADJACENT
NUMBERS AS IN THE FOLLOWING EXAMPLE.
.SKIP
.NOFILL
.LEFT MARGIN 7
- - 0 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2
2 1   0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0
0 0   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0                     0 0 0 0 0 0 0 0 0 0 0
.FILL
.LEFT MARGIN 0
.SKIP
^TWO VERSIONS OF THE ROUTINE ARE PROVIDED. ^^DABELT \\CAN PRODUCE
ALL OF THE FORMAT VARIATIONS DESCRIBED ABOVE. ^^DAIBLT \\CAN ONLY
PRODUCE NUMBERS OF THE FORM SHOWN IN THE FIRST ILLUSTRATION ABOVE.
^EACH LINE OF THE NUMBER REPRESENTATION PRODUCED BY ^^DAIBLT
\\CONTAINS DIGITS CORRESPONDING TO THE SAME POWER OF 10, WITH
ADJACENT NUMBERS INCREASING BY AN INCREMENT OF ONE FROM LEFT TO
RIGHT WITH NO EXTRA SPACING. ^BOTH ^^DABELT \\AND ^^DAIBLT \\CAN
PRODUCE ANY SELECTED LINE OF THE REPRESENTATION OF THE NUMBERS, SO
COLUMNS CAN BE PRINTED TO BE READ EITHER FROM TOP TO BOTTOM OR FROM
BOTTOM TO TOP.
.SKIP 3
.LEFT MARGIN 0
.FILL
.CENTER
^THE ^^DABELT \\AND ^^DAIBLT A\\RGUMENT ^LISTS
.CENTER
--- ------ --- ------ -------- -----
.SKIP
^THE ARGUMENT LISTS OF ROUTINES ^^DABELT \\AND ^^DAIBLT \\ARE
.SKIP
.NOFILL
      ^^SUBROUTINE DABELT(KOLUMN,INTRVL,JSTIFY,LINE  ,ILEFT ,
     1    IRIGHT,LFTCOL,MAXBFR,IBUFFR,MAXLIN,MAXPRT,MAXUSD)
.SKIP
\\AND
.SKIP
      ^^SUBROUTINE DAIBLT(                     LINE  ,ILEFT ,
     1    IRIGHT,LFTCOL,MAXBFR,IBUFFR,MAXLIN,MAXPRT,MAXUSD)
.SKIP
.FILL
\\BOTH WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
.NOFILL
      ^^DIMENSION IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE ARGUMENT LISTS OF THE 2 ROUTINES ARE IDENTICAL EXCEPT THAT THE
FIRST 3 ARGUMENTS IN THE ^^DABELT \\ARGUMENT LIST DO NOT APPEAR IN
THE ^^DAIBLT \\ARGUMENT LIST. ^FOR ^^DAIBLT \\THESE MISSING
ARGUMENTS EFFECTIVELY HAVE THE VALUES ^^KOLUMN=1, INTRVL=1 \\AND
^^JSTIFY=0. A\\LSO, FOR ^^DAIBLT, \I\F ILEFT \\IS GREATER THAN
^^IRIGHT, \\THEN NO REPRESENTATION IS GENERATED, AND ^^MAXPRT \\AND
^^MAXUSD \\ARE BOTH RETURNED SET EQUAL TO THE INPUT VALUE OF ^^LFTCOL.
.SKIP
T\\HE FOLLOWING ARE INPUT ARGUMENTS LEFT UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KOLUMN#=#\\NUMBER OF COLUMNS TO BE USED FOR A SINGLE NUMBER. ^IF
^^KOLUMN \\IS GREATER THAN 1, THEN ^^KOLUMN-1 \\COLUMNS OF SPACES
WILL BE INSERTED BETWEEN THE NUMBERS. ^NO EXTRA SPACES WILL APPEAR
TO THE RIGHT OF THE RIGHT NUMBER EVEN IF ^^KOLUMN \\IS GREATER THAN
1. ^THE EFFECTIVE VALUE OF ^^KOLUMN \\IS 1 IF ^^KOLUMN \\IS INPUT
LESS THAN OR EQUAL TO ZERO.
.SKIP
.INDENT -9
^^INTRVL#=#\\DIFFERENCE BETWEEN ADJACENT NUMBERS WHICH ARE TO BE
REPRESENTED IN THE ^^IBUFFR \\ARRAY. ^IF THE SIGN OF ^^INTRVL \I\S
\\WRONG TO PROCEED FROM ^^ILEFT \T\O IRIGHT, \\THEN THE SIGN OF THE
EFFECTIVE VALUE OF ^^INTRVL \\IS REVERSED, BUT THE SIGN AND VALUE OF
THE ARGUMENT SUPPLIED BY THE CALLING PROGRAM ARE LEFT UNCHANGED.
^THE EFFECTIVE VALUE OF ^^INTRVL \\IS 1 IF ^^INTRVL \\IS INPUT EQUAL
TO ZERO.
.SKIP
.INDENT -9
^^JSTIFY#=#0, \\EACH LINE IS TO CONTAIN DIGITS CORRESPONDING TO THE
SAME POWER OF 10 AS IN THE FIRST EXAMPLE AT THE START OF THE
DOCUMENTATION OF THIS ROUTINE. ^^LINE \\EQUAL TO 1 SELECTS THE
DIGITS OF THE LOWEST SIGNIFICANCE IN THE NUMBERS. ^^LINE \\EQUAL TO
^^MAXLIN \\WILL SELECT EITHER THE MINUS SIGN OR THE DIGITS OF
HIGHEST SIGNIFICANCE IF POSITIVE IN THE NUMBER OR NUMBERS REQUIRING
THE MOST CHARACTERS TO REPRESENT.
.INDENT -2
=#1, EACH LINE IS TO CONTAIN DIGITS OF THE SAME SIGNIFICANCE AS IN
THE SECOND EXAMPLE AT THE START OF THE DOCUMENTATION OF THIS
ROUTINE. ^^LINE \\EQUAL 1 SELECTS EITHER THE MINUS SIGNS OR THE
DIGITS OF HIGHEST SIGNIFICANCE IF POSITIVE IN THE NUMBERS. ^^LINE
\\EQUAL TO ^^MAXLIN \\WILL SELECT THE DIGITS OF LOWEST SIGNIFICANCE
IN THE NUMBER OR NUMBERS REQUIRING THE MOST CHARACTERS TO REPRESENT.
.SKIP
.INDENT -9
^^LINE###=#\\SELECTS WHICH LINE OF THE REPRESENTATION OF THE NUMBERS
IS TO BE CONSTRUCTED. ^^LINE \\EQUAL 1 WILL SELECT THE DIGITS OF
LOWEST SIGNIFICANCE IF ^^JSTIFY \\IS ZERO, OR THE MINUS SIGNS OR
DIGITS OF HIGHEST SIGNIFICANCE OF POSITIVE NUMBERS IF ^^JUSTIFY
\\EQUALS 1. ^^LINE \\EQUAL TO ^^MAXLIN \\WILL SELECT THE MINUS SIGNS
OR THE DIGITS OF HIGHEST SIGNIFICANCE IF POSITIVE OF THE NUMBER OR
NUMBERS REQUIRING THE MOST CHARACTERS TO REPRESENT IF ^^JSTIFY \I\S
\\ZERO, OR THE DIGITS OF LOWEST SIGNIFICANCE OF THE NUMBER OR
NUMBERS REQUIRING THE MOST CHARACTERS TO REPRESENT IF ^^JSTIFY
\\EQUALS 1. ^^MAXPRT \\AND ^^MAXUSD \\ARE BOTH RETURNED EQUAL TO THE
INPUT VALUE OF ^^LFTCOL \I\F LINE \\IS INPUT GREATER THAN ^^MAXLIN.
.SKIP
T\\HE FOLLOWING EXAMPLES ILLUSTRATE THE DEFINITION OF ^^LINE \\FOR
^^JSTIFY \\EQUAL TO BOTH ZERO AND ONE.
.SKIP
.NOFILL
.TEST PAGE 7
^^KOLUMN=2,INTRVL=75,JSTIFY=0,ILEFT=-1052,IRIGHT=2000
LINE=1  2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 3 8 3 8 3 8 3
LINE=2  5 7 0 2 5 7 0 2 5 7 0 2 5 7 - 7 4 2 9 7 4 2
LINE=3  0 9 9 8 7 6 6 5 4 3 3 2 1 -     1 2 2 3 4 5
LINE=4  1 - - - - - - - - - - - -
LINE=5  -
LINE=6
.SKIP
.TEST PAGE 7
KOLUMN=2,INTRVL=75,JSTIFY=1,ILEFT=-1052,IRIGHT=2000
LINE=1  - - - - - - - - - - - - - - - 7 1 2 2 3 4 5
LINE=2  1 9 9 8 7 6 6 5 4 3 3 2 1 7 2 3 4 2 9 7 4 2
LINE=3  0 7 0 2 5 7 0 2 5 7 0 2 5 7     8 3 8 3 8 3
LINE=4  5 7 2 7 2 7 2 7 2 7 2 7 2
LINE=5  2
LINE=6
.FILL
.SKIP
S\\INCE THE EFFECTIVE VALUE OF ^^MAXLIN \\IS NOT KNOWN PRIOR TO THE
FIRST CALL TO THIS ROUTINE, ^^LINE \\CAN BE SET TO ZERO TO REPRESENT
THE SAME LINE AS IF ^^LINE \\WAS INPUT EQUAL TO THE RETURNED VALUE
OF ^^MAXLIN. LINE \\IS RETURNED UNCHANGED, SO THE CALLING PROGRAM
WOULD IN THIS CASE HAVE TO SET ^^LINE \\EQUAL TO THE RETURNED VALUE
OF ^^MAXLIN-1 \\PRIOR TO THE SECOND CALL TO THIS ROUTINE.
.SKIP
.INDENT -9
^^ILEFT##=#\\THE LEFT OR FIRST NUMBER TO BE REPRESENTED.
.SKIP
.INDENT -9
^^IRIGHT#=#\\THE RIGHT OR FINAL LIMIT OF THE NUMBERS TO BE
REPRESENTED. ^UNLIKE ^^ILEFT \\WHICH IS ALWAYS REPRESENTED, ^^IRIGHT
\\IS REPRESENTED ONLY IF THE BUFFER IS LARGE ENOUGH TO INCLUDE THE
NUMBERS THROUGH ^^IRIGHT \\PLUS THE EXTRA SPACES IF ^^KOLUMN \I\S
\\GREATER THAN 1, AND IF ^^IRIGHT-ILEFT \\IS EXACTLY A WHOLE NUMBER
MULTIPLE OF ^^INTRVL. I\F IRIGHT-ILEFT \\IS NOT EXACTLY A WHOLE
NUMBER MULTIPLE OF ^^INTRVL, \\THEN THE RIGHTMOST NUMBER WHICH COULD
BE REPRESENTED IF THE BUFFER IS LARGE ENOUGH IS THE NUMBER WHICH IS
EQUAL TO ^^ILEFT \\PLUS THE NEXT SMALLER WHOLE NUMBER MULTIPLE OF
^^INTRVL.
.SKIP
.INDENT -9
LFTCOL#=#\\THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION TO THE
IMMEDIATE LEFT OF THE LOCATION INTO WHICH IS TO BE PLACED THE DIGIT
OR SIGN FORMING THE REPRESENTATION UPON THE CURRENT LINE OF THE LEFT
NUMBER.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE HIGHEST LOCATION IN THE ^^IBUFFR
\\ARRAY INTO WHICH CAN BE PLACED THE REPRESENTATIONS OF THE NUMBERS
FROM ^^ILEFT \\THROUGH ^^IRIGHT. T\\HIS WOULD NORMALLY BE THE
DIMENSION OF THE ^^IBUFFR \\ARRAY.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED FOR OUTPUT. ^THEIR INPUT VALUES
ARE IGNORED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IBUFFR#=#\\ARRAY IN WHICH THE NUMBERS ARE TO BE REPRESENTED AND
WHICH CAN THEN BE PRINTED BY THE CALLING PROGRAM USING A MULTIPLE OF
AN ^A1 FORMAT.
.SKIP
.INDENT -9
^^MAXLIN#=#\\RETURNED CONTAINING THE NUMBER OF LINES NEEDED TO
REPRESENT THE NUMBERS ^^ILEFT \\THROUGH ^^IRIGHT. T\\HE ACTUAL
NUMBER OF LINES WHICH WOULD INCLUDE PRINTING CHARACTERS MAY BE LESS
SINCE THE RIGHT NUMBER ACTUALLY DISPLAYED CAN REQUIRE FEWER
CHARACTERS FOR ITS REPRESENTATION THAN WOULD ^^IRIGHT.
.SKIP
.INDENT -9
MAXPRT#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE RIGHT LOCATION
IN THE ^^IBUFFR \\ARRAY CONTAINING A PRINTING CHARACTER GENERATED BY
THIS ROUTINE. ^IF THE CURRENT CALL TO THIS ROUTINE HAS NOT ADDED ANY
PRINTING CHARACTERS TO ^^IBUFFR, \\THEN ^^MAXPRT \\WILL BE RETURNED
EQUAL TO ^^LFTCOL.
.SKIP
.INDENT -9
MAXUSD#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE RIGHT LOCATION
IN THE ^^IBUFFR \\ARRAY CONTAINING ANY CHARACTER GENERATED BY THIS
ROUTINE. ^IF ^^LINE \\IS LESS THAN OR EQUAL TO ^^MAXLIN, \\THEN
^^MAXUSD \\WILL BE RETURNED EQUAL TO THE VALUE OF ^^MAXPRT \\WHICH
WOULD BE RETURNED IF ^^LINE \\WAS INPUT AS 1. ^SINCE THE RIGHTMOST
PRINTING CHARACTER GENERATED BY THE CURRENT CALL TO THIS ROUTINE CAN
BE TO THE LEFT OF THAT GENERATED IF ^^LINE \\IS 1, THE ARRAY
LOCATIONS STARTING AT ^^IBUFFR(MAXPRT+1) \\THROUGH ^^IBUFFR(MAXUSD)
\\WILL CONTAIN SPACES. ^IF ^^LINE \\IS GREATER THAN THE RETURNED
VALUE OF ^^MAXLIN, \\THEN ^^MAXUSD \\IS RETURNED EQUAL TO ^^LFTCOL.
.PAGE
.LEFT MARGIN 0
.RIGHT MARGIN 60
.CENTER
DABELT \\OUTPUT FOR ^VARIOUS ^VALUES OF ^ARGUMENTS AND ^^JSTIFY=0
.CENTER
------ ------ --- ------- ------ -- --------- --- ------#-
.SKIP
.NOFILL
KOLUMN=  1, INTRVL=       1, ILEFT=     -25, IRIGHT=      25
#
LINE=3   ----------------
LINE=2   2222221111111111---------          1111111111222222
LINE=1   543210987654321098765432101234567890123456789012345
#
KOLUMN=  1, INTRVL=       1, ILEFT=      25, IRIGHT=     -25
#
LINE=3                                      ----------------
LINE=2   2222221111111111          ---------1111111111222222
LINE=1   543210987654321098765432101234567890123456789012345
#
KOLUMN=  1, INTRVL=       5, ILEFT=    -125, IRIGHT=     125
#
LINE=4   ------
LINE=3   111111------------------                     111111
LINE=2   221100998877665544332211-  112233445566778899001122
LINE=1   505050505050505050505050505050505050505050505050505
#
KOLUMN=  2, INTRVL=      10, ILEFT=    -125, IRIGHT=     125
#
LINE=4   - - -
LINE=3   1 1 1 - - - - - - - - -                       1 1 1
LINE=2   2 1 0 9 8 7 6 5 4 3 2 1 -   1 2 3 4 5 6 7 8 9 0 1 2
LINE=1   5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
#
KOLUMN=  2, INTRVL=      10, ILEFT=    -250, IRIGHT=       0
#
LINE=4   - - - - - - - - - - - - - - - -
LINE=3   2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 - - - - - - - - -
LINE=2   5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1
LINE=1   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#
KOLUMN=  2, INTRVL=      10, ILEFT=       0, IRIGHT=     250
#
LINE=3                       1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2
LINE=2     1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
LINE=1   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#
KOLUMN=  5, INTRVL=       6, ILEFT=     -30, IRIGHT=      30
#
LINE=3   -    -    -    -
LINE=2   3    2    1    1    -              1    1    2    3
LINE=1   0    4    8    2    6    0    6    2    8    4    0
#
KOLUMN=  5, INTRVL=       6, ILEFT=     -29, IRIGHT=      31
#
LINE=3   -    -    -    -
LINE=2   2    2    1    1    -              1    1    2    3
LINE=1   9    3    7    1    5    1    7    3    9    5    1
.FILL
.SKIP 3
.TEST PAGE 7
.LEFT MARGIN 0
.FILL
.CENTER
A\N E\\XAMPLE OF THE ^USE OF ^^DABELT
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE SAMPLE PROGRAM LISTED ON THE FOLLOWING PAGE DEMONSTRATES THE
MANNER IN WHICH ^^DABELT \\IS USED. ^THE PROGRAM ASKS THE USER FOR
THE DESIRED SPACING, INTERVAL, AND LEFT AND RIGHT LIMITS, THEN
GENERATES THE HIGHEST NUMBERED LINE THROUGH LINE 1 AND BACK AGAIN TO
AND BEYOND THE HIGHEST NUMBERED LINE FOR ^^JSTIFY \\EQUAL FIRST TO
ZERO THEN TO ONE.
.SKIP
^A SAMPLE DIALOG BETWEEN THE PROGRAM AND THE USER IS PRESENTED
FOLLOWING THE LISTING OF THE PROGRAM.
.SKIP
^FOR A PRACTICAL APPLICATION OF THE ^^DABELT \\ROUTINE, SEE THE
FIRST DEMONSTRATION PROGRAM IN THE DESCRIPTION OF THE ^^DALOAD
\\ROUTINE.
.PAGE
.NOFILL
.LEFT MARGIN 0
      ^^DATA MAXBFR,ITTY,ISPACE/51,5,1H /
      DIMENSION IBUFFR(51),JBUFFR(51)
C
C     GET VALUES OF ARGUMENTS FROM USER
    1 WRITE(ITTY,2)
    2 FORMAT(' LFTCOL, KOLUMN, INTRVL, ILEFT, IRIGHT ',$)
      READ(ITTY,3)LFTCOL,KOLUMN,INTRVL,ILEFT,IRIGHT
    3 FORMAT(10I)
C
C     REPRESENT THE NUMBERS
      DO 4 I=1,MAXBFR
    4 IBUFFR(I)=ISPACE
      DO 9 JSTIFY=0,1
      WRITE(ITTY,5)JSTIFY
    5 FORMAT(' JSTIFY=',1I1)
      LINE=0
    6 CALL DABELT(KOLUMN,INTRVL,JSTIFY,LINE,ILEFT,
     1IRIGHT,LFTCOL,MAXBFR,IBUFFR,MAXLIN,MAXPRT,MAXUSD)
      IF(LINE.EQ.0)LINE=MAXLIN
      WRITE(ITTY,7)LINE,(IBUFFR(I),I=1,MAXPRT)
    7 FORMAT(' LINE=',I1,3X,100A1)
      LINE=LINE-1
      IF(LINE.GT.0)GO TO 6
      LINE=1
    8 LINE=LINE+1
      CALL DABELT(KOLUMN,INTRVL,JSTIFY,LINE,ILEFT,
     1IRIGHT,LFTCOL,MAXBFR,IBUFFR,MAXLIN,MAXPRT,MAXUSD)
      IF(MAXPRT.LE.LFTCOL)WRITE(ITTY,7)LINE
      IF(MAXPRT.GT.LFTCOL)WRITE(ITTY,7)LINE,
     1(IBUFFR(I),I=1,MAXPRT)
      IF(LINE.LE.MAXLIN)GO TO 8
    9 CONTINUE
C
C     REPORT THE EXPECTED VALUES
      KOUNT=0
      IF(INTRVL.LT.0)INTRVL=-INTRVL
      IF(INTRVL.EQ.0)INTRVL=1
      IF(ILEFT.GT.IRIGHT)INTRVL=-INTRVL
      IF(KOLUMN.LE.0)KOLUMN=1
   10 LFTCOL=LFTCOL+1
      IF(LFTCOL.GT.MAXBFR)GO TO 13
      IF(INTRVL.GT.0)GO TO 11
      IF(ILEFT.LT.IRIGHT)GO TO 13
      GO TO 12
   11 IF(ILEFT.GT.IRIGHT)GO TO 13
   12 KOUNT=KOUNT+1
      JBUFFR(KOUNT)=ILEFT
      LFTCOL=LFTCOL+KOLUMN-1
      ILEFT=ILEFT+INTRVL
      GO TO 10
   13 IF(KOUNT.GT.0)WRITE(ITTY,14)(JBUFFR(I),I=1,KOUNT)
   14 FORMAT(6I10)
      GO TO 1
      END
.PAGE
T\\YPICAL ^DIALOG ^BETWEEN ^^DABELT D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
^^LFTCOL, KOLUMN, INTRVL, ILEFT, IRIGHT 0 2 6 108 -108
.SKIP
JSTIFY=0
LINE=4
LINE=3   1 1                                     - - - - - -
LINE=2   0 0 9 9 8 7 7 6 6 5 4 4 3 3 2 1 1     - 1 1 2 3 3 4
LINE=1   8 2 6 0 4 8 2 6 0 4 8 2 6 0 4 8 2 6 0 6 2 8 4 0 6 2
LINE=2   0 0 9 9 8 7 7 6 6 5 4 4 3 3 2 1 1     - 1 1 2 3 3 4
LINE=3   1 1                                     - - - - - -
LINE=4
LINE=5
JSTIFY=1
LINE=4
LINE=3   8 2                                     2 8 4 0 6 2
LINE=2   0 0 6 0 4 8 2 6 0 4 8 2 6 0 4 8 2     6 1 1 2 3 3 4
LINE=1   1 1 9 9 8 7 7 6 6 5 4 4 3 3 2 1 1 6 0 - - - - - - -
LINE=2   0 0 6 0 4 8 2 6 0 4 8 2 6 0 4 8 2     6 1 1 2 3 3 4
LINE=3   8 2                                     2 8 4 0 6 2
LINE=4
LINE=5
      108       102        96        90        84        78
       72        66        60        54        48        42
       36        30        24        18        12         6
        0        -6       -12       -18       -24       -30
      -36       -42
LFTCOL, KOLUMN, INTRVL, ILEFT, IRIGHT 0 2 6 -108 108
.SKIP
JSTIFY=0
LINE=4   - -
LINE=3   1 1 - - - - - - - - - - - - - - -
LINE=2   0 0 9 9 8 7 7 6 6 5 4 4 3 3 2 1 1 -     1 1 2 3 3 4
LINE=1   8 2 6 0 4 8 2 6 0 4 8 2 6 0 4 8 2 6 0 6 2 8 4 0 6 2
LINE=2   0 0 9 9 8 7 7 6 6 5 4 4 3 3 2 1 1 -     1 1 2 3 3 4
LINE=3   1 1 - - - - - - - - - - - - - - -
LINE=4   - -
LINE=5
JSTIFY=1
LINE=4   8 2
LINE=3   0 0 6 0 4 8 2 6 0 4 8 2 6 0 4 8 2
LINE=2   1 1 9 9 8 7 7 6 6 5 4 4 3 3 2 1 1 6     2 8 4 0 6 2
LINE=1   - - - - - - - - - - - - - - - - - - 0 6 1 1 2 3 3 4
LINE=2   1 1 9 9 8 7 7 6 6 5 4 4 3 3 2 1 1 6     2 8 4 0 6 2
LINE=3   0 0 6 0 4 8 2 6 0 4 8 2 6 0 4 8 2
LINE=4   8 2
LINE=5
     -108      -102       -96       -90       -84       -78
      -72       -66       -60       -54       -48       -42
      -36       -30       -24       -18       -12        -6
        0         6        12        18        24        30
       36        42
.LEFT MARGIN 0
.RIGHT MARGIN 60
.SUBTITLE ^^DACASE, C\\ONVERTS ^LOWER ^CASE ^LETTERS TO ^UPPER ^CASE
.PAGE
.LEFT MARGIN 0
.NOFILL
^^DDDDD          AAA     CCCCC        AAA    SSSSSS  EEEEEEEE
DD   DD       AAAA   CC            AAAA  SS        EE
DD    DD     AA AA  CC            AA AA  SS        EE
DD    DD    AA  AA  CC           AA  AA    SSSS    EEEEE
DD    DD   AAAAAAA  CC          AAAAAAA        SS  EE
DD   DD   AA    AA   CC        AA    AA        SS  EE
DDDDD    AA     AA     CCCCC  AA     AA  SSSSSS    EEEEEEEE
.SKIP 2
.CENTER
DACASE, C\\ONVERTS ^LOWER ^CASE ^LETTERS TO ^UPPER ^CASE
.CENTER
------##-------- ----- ---- ------- -- ----- ----
.FILL
.SKIP
^ALTHOUGH LOWER CASE ALPHABETIC LETTERS ARE TREATED AS EQUIVALENT TO
THE UPPER CASE FORMS OF THESE LETTERS BY THE ^^FASP \\ROUTINES
^^DAHEFT, DAIHFT \\AND ^^DAVERB (\\AND BY ANY OTHER ^^FASP
\\ROUTINES SUCH AS ^^DAHEST \\AND ^^DANEXT \\WHICH CALL ^^DAHEFT,
DAIHFT \O\R DAVERB \\EITHER DIRECTLY OR INDIRECTLY), LOWER CASE
LETTERS ARE NOT RECOGNIZED BY THE ^^FASP \\ROUTINES ^^DALOAD,
DAPICK, DATEXT \\AND ^^DATURN. I\\F THESE LATTER ROUTINES ARE CALLED
UPON A COMPUTER SYSTEM WHICH SUPPORTS LOWER CASE, BUT REQUIRING THAT
THE USER LOCK THE TERMINAL INTO UPPER CASE SHIFT IS NOT ACCEPTABLE,
THEN THE CONTENTS OF THE INPUT TEXT BUFFER CAN INSTEAD BE PROCESSED
BY THE ^^DACASE \\ROUTINE WHICH REPLACES LOWER CASE LETTERS WITH THE
CORRESPONDING UPPER CASE LETTERS. ^ALL OTHER CHARACTERS ARE RETURNED
UNCHANGED BY THE ^^DACASE \\ROUTINE.
.SKIP
^^DACASE \\CONTAINS A LIST OF THE LOWER CASE LETTERS AND A LIST OF
THE CORRESPONDING UPPER CASE LETTERS. ^THE LOWER CASE LETTERS ARE
DEFINED BY A ^^DATA \\STATEMENT TO BE IN THE ORDER 1^HA THROUGH 1^HZ
WHICH ON THE ^^PDP10 \\COMPUTER RESULTS IN THE ASSOCIATED INTEGER
VALUES BEING SORTED INTO AN INCREASING ORDER. ^EACH LOWER CASE
LETTER IN THE INPUT TEXT BUFFER IS IDENTIFIED BY A TERNARY SEARCH
FOR A MATCH WITHIN THE SORTED LIST OF LOWER CASE LETTERS. ^IF THIS
ROUTINE IS USED UPON A COMPUTER SYSTEM IN WHICH THE ALPHABETICAL
ORDER OF THE LETTERS 1^HA THROUGH 1^HZ DOES NOT RESULT IN AN
INCREASING ORDER FOR THE ASSOCIATED INTEGER VALUES, THEN THE ^^DATA
\\STATEMENT WHICH DEFINES THE ARRAY WHICH CONTAINS THE LOWER CASE
LETTERS SHOULD BE REWRITTEN SO THAT THE VALUES ASSOCIATED WITH THE
LETTERS WILL BE IN INCREASING NUMERICAL ORDER, AND THEN THE ^^DATA
\\STATEMENT WHICH DEFINES THE CORRESPONDING UPPER CASE LETTERS MUST
BE REWRITTEN SO THAT THE LOWER AND UPPER CASE VERSIONS OF EACH
LETTER APPEAR IN LOCATIONS IN THE RESPECTIVE ARRAYS HAVING THE SAME
SUBSCRIPTS.
.SKIP
^OPERATION OF THE ^^DACASE \\ROUTINE REQUIRES THAT THE COMPILER NOT
TRANSLATE INTO UPPER CASE ANY LOWER CASE LETTERS INCLUDED IN
^HOLLERITH STRINGS IN THE ROUTINE. ^ON THE ^^PDP10 \\COMPUTER, THIS
ROUTINE CAN BE USED WITH THE ^F10 COMPILER, BUT NOT WITH THE OLDER
^F40 COMPILER WHICH DOES SUCH A TRANSLATION OF LOWER CASE LETTERS IN
^HOLLERITH STRINGS INTO UPPER CASE. ^OF COURSE, THIS ROUTINE IS NOT
NEEDED AT ALL IF THE RUN TIME SYSTEM ITSELF TRANSLATES LOWER CASE
LETTERS TO UPPER CASE BEFORE THESE ARE SENT TO THE USER'S PROGRAM.
.SKIP 2
.TEST PAGE 6
.CENTER
^THE ^^DACASE A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DACASE \I\S
.SKIP
.NOFILL
      SUBROUTINE DACASE(MINBFR,MAXBFR,IBUFFR)
.SKIP
.FILL
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
.NOFILL
      ^^DIMENSION IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^MINBFR#=#\\SUBSCRIPT OF THE FIRST LOCATION IN THE ^^IBUFFR \\ARRAY
CONTAINING A CHARACTER WHICH IS TO BE CONVERTED TO UPPER CASE IF
INPUT IN LOWER CASE.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE FINAL LOCATION IN THE ^^IBUFFR \\ARRAY
CONTAINING A CHARACTER WHICH IS TO BE CONVERTED TO UPPER CASE IF
INPUT IN LOWER CASE.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED BOTH FOR INPUT TO AND FOR OUTPUT
FROM THIS ROUTINE.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^IBUFFR#=#\\ARRAY CONTAINING IN LOCATIONS HAVING SUBSCRIPTS
^^MINBFR \\THROUGH ^^MAXBFR \\THE CHARACTERS READ BY A MULTIPLE OF
AN 1^A FORMAT WHICH ARE TO BE CONVERTED TO UPPER CASE IF INPUT IN
LOWER CASE.
.SUBTITLE ^^DACOPY, R\\OUTINE TO ^EXPAND ^TAB ^CHARACTERS TO ^SPACES
.LEFT MARGIN 0
.PAGE
.NOFILL
 ^^DDDDD          AAA     CCCCC   OOOOO    PPPPPP    YY    YY
 DD   DD       AAAA   CC       OO   OO   PP    PP   YY  YY
 DD    DD     AA AA  CC       OO     OO  PP    PP    YYYY
 DD    DD    AA  AA  CC       OO     OO  PPPPPP       YY
 DD    DD   AAAAAAA  CC       OO     OO  PP           YY
 DD   DD   AA    AA   CC       OO   OO   PP           YY
 DDDDD    AA     AA     CCCCC   OOOOO    PP           YY
.SKIP
.FILL
.CENTER
DACOPY, R\\OUTINE TO ^EXPAND ^TAB ^CHARACTERS TO ^SPACES
.CENTER
------##------- -- ------ --- ---------- -- ------
.SKIP
^COMPUTER TERMINALS OFTEN CAN GENERATE 2 TYPES OF FORWARD SPACING
BUT NONPRINTING CHARACTERS. ^THE SIMPLER OF THESE, THE SPACE, MERELY
CAUSES THE CHARACTER TO ITS RIGHT TO BE SHIFTED OVER BY 1 COLUMN AND
IS EXACTLY EQUIVALENT TO AN EMPTY COLUMN ON A PUNCHED CARD. ^THE TAB
CHARACTER (SOMETIMES CALLED ^H^T OR HORIZONTAL TAB), HOWEVER, SHIFTS
THE CHARACTER TO ITS RIGHT BEYOND THE NEXT COLUMN POSITION WHICH IS
A WHOLE MULTIPLE OF 8 (OR SOME OTHER, GENERALLY FIXED TAB STOP
INTERVAL), AND IS CONVENIENT FOR QUICKLY SPACING ACROSS THE WIDTH OF
THE INPUT LINE. ^THE READING PROGRAM CAN DISTINGUISH A TAB CHARACTER
FROM A SPACE, SO APPROPRIATE TREATMENT OF THE TAB CHARACTER POSES
LITTLE OR NO DIFFICULTY TO A PROGRAM WHICH IS DOING PARSING OR WHICH
IS READING NUMERIC INFORMATION, SINCE THE TAB CHARACTER CAN BE
TREATED AS EQUIVALENT TO A SPACE OR NOT, WHICHEVER IS APPROPRIATE TO
THE PARTICULAR APPLICATION.
.SKIP
^IF THE PROGRAM MUST INSERT TEXT CONTAINING TAB CHARACTERS INTO
PRINTED OR TYPED OUTPUT, THE ORIGINAL ALIGNMENT OF THE TEXT WITH THE
TAB STOP COLUMNS WILL PROBABLY NOT BE MAINTAINED, CAUSING THE
APPEARANCE OF THE TEXT UPON OUTPUT TO BE QUITE DIFFERENT FROM THAT
SEEN ON THE ORIGINAL TERMINAL FROM WHICH THE TEXT WAS ENTERED INTO
THE COMPUTER SYSTEM. ^ALSO, WHEN THIS ALIGNMENT CHANGES, THE
EFFECTIVE NUMBER OF COLUMNS ACROSS THE WIDTH OF THE TEXT CHANGES, SO
THAT INFORMATION INSERTED INTO FIELDS TO THE RIGHT OF THE TEXT
CONTAINING THE TAB CHARACTERS WILL ALSO BE SHIFTED INTO DIFFERENT
COLUMNS THAN INTENDED. ^THIS DIFFICULTY CAN BE AVOIDED BY CONVERSION
OF THE TAB CHARACTERS INTO THE CORRECT NUMBER OF SPACES PRIOR TO
OUTPUT.
.SKIP
^^DACOPY \\IS ONE OF TWO ROUTINES IN THE ^^FASP \\PACKAGE WHICH
CONVERT TAB CHARACTERS TO SPACES IN BUFFERS READ BY AN ^A1 FORMAT.
^^DACOPY \\PERFORMS THE TAB CHARACTER TO SPACE EXPANSION WHILE
COPYING FROM AN INPUT BUFFER TO A SEPARATE OUTPUT BUFFER WHICH CAN
BE WRITTEN BY THE CALLING PROGRAM WITH A MULTIPLE OF AN ^A1 FORMAT.
^THE EXPANDED TEXT IS NOT COPIED BACK INTO THE ORIGINAL BUFFER SINCE
THE NUMBER OF CHARACTERS CAN INCREASE DURING THE CONVERSION.
^^DAFILL, \\THE OTHER TAB TO SPACE CONVERSION ROUTINE, COPIES THE
EXPANDED TEXT BACK INTO THE INPUT BUFFER, OVERWRITING ANY CHARACTERS
WHICH COULD NOT BE REPRESENTED DUE TO THE BUFFER BEING TOO SMALL.
.PAGE
.CENTER
THE ^^DACOPY A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DACOPY \I\S
.SKIP
.NOFILL
      SUBROUTINE DACOPY(INITAL,INTRVL,IBUFFR,IBEGIN,IFINAL,
     1JFINAL,JUSED,JBUFFR,NXTINI,NXTBGN,MAXPRT)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(IFINAL),JBUFFR(JFINAL)
.FILL
.SKIP
T\\HE ARGUMENTS ^^INITAL, INTRVL, IBUFFR, IBEGIN, IFINAL, \\AND
^^JFINAL \\ARE USED ONLY FOR INPUT AND THEIR ORIGINAL VALUES ARE
RETURNED UNCHANGED. ^THE ARGUMENT ^^JUSED \\IS USED FOR BOTH INPUT
AND OUTPUT. ^THE PORTION OF THE ^^JBUFFR \\ARRAY ABOVE
^^JBUFFR(JUSED) \\AS WELL AS THE ARGUMENTS ^^NXTINI, NXTBGN \\AND
^^MAXPRT \\ARE USED ONLY FOR OUTPUT AND THEIR ORIGINAL VALUES ARE
IGNORED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^INITAL#=#\\LESS THAN ZERO AND PROVIDING THAT ^^INTRVL \\IS GREATER
THAN ZERO, THE ABSOLUTE VALUE OF ^^INITAL \\IS THE NUMBER OF EXTRA
SPACES TO BE INSERTED AT THE START OF THE OUTPUT BUFFER BEFORE THE
CONTENTS OF THE INPUT BUFFER ARE COPIED INTO THE OUTPUT BUFFER. ^IF
^^INITAL \\IS LESS THAN ZERO, REGARDLESS OF WHETHER ^^INTRVL \I\S
\\POSITIVE OR NEGATIVE, THE FIRST TAB STOP WILL BE OF THE WIDTH
SPECIFIED BY THE ABSOLUTE VALUE OF ^^INTRVL. I\F INTRVL \\IS LESS
THAN OR EQUAL TO ZERO, THEN NO LEADING SPACES WILL BE INSERTED INTO
THE OUTPUT BUFFER WHETHER REQUESTED BY A NEGATIVE VALUE OF ^^INITAL
\\OR BY LEADING SPACES OR TAB CHARACTERS IN THE INPUT BUFFER.
.INDENT -2
=#EQUAL TO OR GREATER THAN ZERO, ^^INITAL \\IS THE DISTANCE TO THE
FIRST TAB STOP. (^DISTANCE IS HERE DEFINED AS A NUMBER OF CHARACTERS
OR, SINCE THE BUFFERS CONTAIN A SINGLE CHARACTER IN EACH LOCATION OF
THE ARRAYS, AS A SUBSCRIPT RANGE.) ^IF ^^INITAL \\IS ZERO, THEN IT
IS ASSUMED THAT COPYING HAS ALREADY PASSED BEYOND THE FIRST TAB STOP
AND THE DISTANCE TO THE NEXT TAB STOP IS THEN TAKEN AS THE ABSOLUTE
VALUE OF ^^INTRVL. I\\F THE LEFT TAB STOP IS TO BE OF THE SAME WIDTH
AS THOSE TO ITS RIGHT, THEN ^^INITAL \\CAN EQUAL EITHER ZERO OR THE
ABSOLUTE VALUE OF ^^INTRVL. I\\F THE FIRST CHARACTER IN THE INPUT
BUFFER IS A TAB CHARACTER, THEN IT WILL BE EXPANDED TO THE NUMBER OF
SPACES SPECIFIED BY ^^INITAL (\\OR BY A POSITIVE VALUE OF ^^INTRVL
\I\F INITAL \\IS ZERO). ^IF THE FIRST CHARACTER IS NOT A TAB
CHARACTER, BUT THE SECOND CHARACTER IS A TAB CHARACTER, THEN THE
SECOND CHARACTER WILL BE EXPANDED TO ^^INITAL-1 \\SPACES, AND SO ON
THROUGH THE FIRST ^^INITAL \\CHARACTERS PROVIDING IN EACH CASE THAT
NONE OF THE CHARACTERS TO THE LEFT ARE TAB CHARACTERS. ^AFTER THE
SUM OF THE NUMBER OF CHARACTERS WHICH HAVE BEEN INSERTED INTO THE
OUTPUT BUFFER, WHETHER THESE CHARACTERS ARE PRINTING CHARACTERS OR
SPACES ORIGINALLY IN THE INPUT BUFFER OR SPACES RESULTING FROM THE
EXPANSION OF TAB CHARACTERS, AND, IF ^^INTRVL \\IS EQUAL TO OR LESS
THAN ZERO, OF THE NUMBER OF SPACES WHICH HAVE BEEN SUPPRESSED,
EQUALS THE VALUE OF ^^INITAL, \\THEN THE TAB STOP INTERVAL BECOMES
THAT GIVEN BY THE ABSOLUTE VALUE OF THE ARGUMENT ^^INTRVL.
.SKIP
.INDENT -9
INTRVL#=#\\NOT EQUAL TO ZERO, THE ABSOLUTE VALUE OF ^^INTRVL \I\S
\\THE TAB STOP INTERVAL. ^ON THE ^^PDP-10 \\COMPUTER, THE
APPROPRIATE ABSOLUTE VALUE OF ^^INTRVL \\IS 8, AND, ASSUMING THAT
THE FIRST CHARACTER IN THE INPUT BUFFER CORRESPONDS TO COLUMN 1, THE
VALUE OF ^^INITAL \\AT THE START OF THE PROCESSING OF THE CONTENTS
OF THE INPUT BUFFER CAN BE EITHER 0 OR 8. ^AFTER THE SUM OF THE
NUMBER OF CHARACTERS INSERTED INTO THE OUTPUT BUFFER AND OF THE
NUMBER OF SPACES, IF ANY, SUPPRESSED BY A NEGATIVE OR ZERO VALUE OF
^^INTRVL, \\HAS REACHED AT LEAST THE ABSOLUTE VALUE OF ^^INITAL,
\\THEN A TAB CHARACTER ENCOUNTERED IN THE INPUT BUFFER CAUSES
SUFFICIENT SPACES TO BE INSERTED INTO THE OUTPUT BUFFER OR ELSE TO
BE SUPPRESSED SO THAT THE TOTAL NUMBER OF CHARACTERS INSERTED INTO
THE OUTPUT BUFFER OR SUPPRESSED BY THE PRESENT CALL TO ^^DACOPY
\\EQUALS THE SUM OF THE ABSOLUTE VALUE OF ^^INITAL \\AND THE NEXT
HIGHER WHOLE MULTIPLE OF THE ABSOLUTE VALUE OF ^^INTRVL.
.INDENT -2
=#\\LESS THAN ZERO, NO LEADING SPACES ARE TO BE INSERTED INTO THE
OUTPUT BUFFER WHETHER SUCH LEADING SPACES ARE REQUESTED BY A
NEGATIVE VALUE OF ^^INITAL \\OR BY LEADING SPACES OR TAB CHARACTERS
IN THE INPUT BUFFER. ^ONCE A PRINTING CHARACTER HAS BEEN COPIED INTO
THE OUTPUT BUFFER, HOWEVER, THEN ALL SUBSEQUENT SPACES WILL BE
COPIED AND ALL SUBSEQUENT TAB CHARACTERS WILL BE EXPANDED TO SPACES.
.INDENT -2
=#ZERO, NO SPACES ARE TO BE INSERTED INTO THE OUTPUT BUFFER. ^TAB
CHARACTERS AND SPACES IN THE INPUT BUFFER ARE IGNORED.
.INDENT -2
=#GREATER THAN ZERO, ALL SPACES WHETHER REQUESTED BY A NEGATIVE
VALUE OF ^^INITAL \\OR BY SPACES OR TAB CHARACTERS IN THE INPUT
BUFFER ARE TO BE INSERTED INTO THE OUTPUT BUFFER.
.SKIP
.INDENT -9
^^IBUFFR#=#\\THE INPUT BUFFER CONTAINING THE CHARACTERS WHICH ARE TO
BE COPIED INTO THE OUTPUT BUFFER EXPANDING ANY TABS FOUND. ^THE
CHARACTERS IN THE ^^IBUFFR \\ARRAY MUST HAVE BEEN READ BY A MULTIPLE
OF AN ^A1 FORMAT.
.SKIP
.INDENT -9
^^IBEGIN#=#\\THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION AT WHICH
IS TO BE FOUND THE FIRST CHARACTER TO BE COPIED.
.SKIP
.INDENT -9
^^IFINAL#=#\\THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION AT WHICH
IS TO BE FOUND THE FINAL CHARACTER TO BE COPIED.
.SKIP
.INDENT -9
^^JFINAL#=#\\THE DIMENSION OF, OR SUBSCRIPT OF THE HIGHEST AVAILABLE
LOCATION WITHIN, THE ^^JBUFFR \\ARRAY.
.SKIP
.INDENT -9
^^JUSED##=#\\THE SUBSCRIPT OF THE LOWEST LOCATION IN THE ^^JBUFFR
\\ARRAY WHICH IS CURRENTLY IN USE AND WHICH CONTAINS DATA WHICH MUST
BE MAINTAINED. ^^JUSED \\IS RETURNED CONTAINING THE SUBSCRIPT OF THE
HIGHEST LOCATION INTO WHICH ^^DACOPY \\HAS PLACED A CHARACTER.
.SKIP
.INDENT -9
^^JBUFFR#=#\\THE ARRAY INTO WHICH THE CONTENTS OF ^^IBUFFR \\ARE TO
BE COPIED EXPANDING TAB CHARACTERS TO SPACES.
.SKIP
.INDENT -9
^^NXTINI#=#\\RETURNED CONTAINING THE VALUE WHICH SHOULD BE NEXT
GIVEN TO ^^INITAL \\IF THE CURRENT CALL COULD NOT COMPLETELY
REPRESENT THE CONTENTS OF THE INPUT BUFFER DUE TO THE ROOM AVAILABLE
IN THE OUTPUT BUFFER BEING TO SMALL. ^IF A TAB CHARACTER WAS
ENCOUNTERED IN THE INPUT BUFFER BUT COULD NOT BE COMPLETELY
REPRESENTED IN THE OUTPUT BUFFER, THEN ^^NXTINI \\WILL BE RETURNED
NEGATIVE. ^IF THE LAST CHARACTER ENCOUNTERED IN THE INPUT BUFFER WAS
NOT A TAB CHARACTER, THEN ^^NXTINI \\WILL BE RETURNED CONTAINING THE
REMAINING DISTANCE TO THE NEXT TAB STOP.
.SKIP
.INDENT -9
^^NXTBGN#=#\\RETURNED CONTAINING THE SUBSCRIPT WITHIN THE ^^IBUFFR
\\ARRAY OF THE FIRST CHARACTER WHICH COULD NOT BE REPRESENTED IN THE
OUTPUT BUFFER. ^IF ALL CHARACTERS COULD BE REPRESENTED, THEN
^^NXTBGN \\WILL BE RETURNED EQUAL TO ^^IFINAL+1. N\\OTE THAT IF A
TAB CHARACTER IS REPRESENTED EVEN BY SINGLE SPACE, THEN ^^NXTBGN
\\IS PASSED BEYOND THIS TAB CHARACTER ALTHOUGH THERE MIGHT NOT BE
ENOUGH ROOM IN THE OUTPUT BUFFER TO FILL COMPLETELY TO THE NEXT TAB
STOP.
.SKIP
.INDENT -9
^^MAXPRT#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE HIGHEST
LOCATION IN THE ^^JBUFFR \\ARRAY INTO WHICH ^^DACOPY \\HAS PLACED A
PRINTING (NONSPACE) CHARACTER. ^IF NO PRINTING CHARACTERS ARE PLACED
INTO THE OUTPUT BUFFER, THEN ^^MAXPRT \\WILL BE RETURNED EQUAL TO
THE INPUT VALUE OF ^^JUSED.
.LEFT MARGIN 0
.PAGE
.CENTER
E\\XAMPLES OF ^TAB ^CHARACTER ^EXPANSIONS
.CENTER
-------- -- --- --------- ----------
.SKIP
^IN THE FOLLOWING EXAMPLES OF THE EXPANSION OF TABS TO SPACES WITH A
TAB STOP INTERVAL OF 8 (^^INITAL=INTRVL=8), \\THE SYMBOL <^H^T>
REPRESENTS A SINGLE TAB CHARACTER STORED IN A SINGLE COMPUTER WORD,
AND THE DIGITS REPRESENT CHARACTERS OTHER THAN THE TAB CHARACTER
STORED ONE PER COMPUTER WORD. ^IF, ACCORDING TO THIS NOTATION, THE
INPUT BUFFER CONTAINS
.SKIP
1<^^HT>90<HT>789<HT>5678<HT>34567<HT>123456<HT>9012345<HT>7
.SKIP
\\THEN AFTER EXPANSION, THE OUTPUT BUFFER WOULD CONTAIN
.SKIP
1#######90######789#####5678####34567###123456##9012345#7
.SKIP
^IN SIMILAR MANNER, THE INPUT BUFFER CONTENTS
.SKIP
1234567<^^HT>901234<HT>78901<HT>5678<HT>345<HT>12<HT>9<HT>7
.SKIP
\\WOULD BE CHANGED TO THE FOLLOWING IN THE OUTPUT BUFFER
.SKIP
1234567#901234##78901###5678####345#####12######9#######7
.SKIP 3
.FILL
.CENTER
^AN ^EXAMPLE OF THE ^USE OF ^^DACOPY
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE SAMPLE PROGRAM LISTED ON THE FOLLOWING PAGE DEMONSTRATES THE
MANNER IN WHICH ^^DACOPY \\IS USED. ^THE PROGRAM PROMPTS THE USER
WITH AN ASTERISK, THEN READS A LINE OF TEXT INCLUDING TABS TO BE
EXPANDED TO THE CORRESPONDING NUMBER OF SPACES. ^THE TAB STOP
INTERVAL IS 8. ^SINCE THE ASTERISK TYPED BY THE PROGRAM APPEARS IN
COLUMN 1, AN INITIAL TAB WOULD ONLY CORRESPOND TO AN ADDITIONAL 7
SPACES.
.SKIP
^THE PROGRAM ALLOCATES THE OUTPUT BUFFER IN SECTIONS, ALLOWING AS
MUCH AS POSSIBLE OF THE INPUT BUFFER TO BE REPRESENTED IN A
PARTICULAR SECTION, THEN MOVING TO THE NEXT SECTION OF THE OUTPUT
BUFFER AND AGAIN CALLING ^^DACOPY. T\\HIS SEQUENCE IS REPEATED UNTIL
EITHER THE OUTPUT BUFFER FILLS OR THE INPUT BUFFER IS EXHAUSTED. ^IF
THE RIGHTMOST CHARACTER OF THE INPUT BUFFER WHICH HAS BEEN
REPRESENTED IN THE OUTPUT SECTION IS A TAB, THEN THE LOCATION OF THE
RIGHTMOST CHARACTER OF THE OUTPUT SECTION IS MARKED WITH A DIGIT
CORRESPONDING TO THE POSITION OF THE TAB RELATIVE TO THE OTHER TABS
IN THE INPUT BUFFER. ^THE PROGRAM DISPLAYS THE EXPANSION FOR OUTPUT
BUFFER SECTION SIZES 1, 5, 9, 13, 17 AND 21.
.SKIP
^A SAMPLE DIALOG BETWEEN THE PROGRAM AND THE USER IS PRESENTED
FOLLOWING THE LISTING OF THE PROGRAM.
.PAGE
.NOFILL
      ^^DIMENSION IBUFFR(70),JBUFFR(85),IDIGIT(10)
      DATA INTRVL,IWIDTH,IFINAL,MAXOUT/8,59,70,85/
      DATA IDIGIT/1H1,1H2,1H3,1H4,1H5,1H6,1H7,1H8,1H9,1H0/
      DATA ITAB/1H	/
C     ASK FOR AND READ TEXT CONTAINING TABS TO BE CONVERTED
      LOWER=IFINAL-IWIDTH+1
      ISTART=MAXOUT-IWIDTH+1
    1 TYPE 2
    2 FORMAT(1X/' *',$)
      ACCEPT 3,(IBUFFR(I),I=LOWER,IFINAL)
    3 FORMAT(60A1)
C     LOOP THRU DESTINATION FIELD SIZES 1 TO 21, INCREMENT 4
      DO 9 ISIZE=1,21,4
      IBEGIN=LOWER
      JUSED=ISTART-1
      INITAL=INTRVL-1
      LIMIT=JUSED
    4 JFINAL=JUSED+ISIZE
      IF(JFINAL.GT.MAXOUT)JFINAL=MAXOUT
      JSTART=JUSED+1
C     CONVERT TAB CHARACTERS INTO SPACES
      CALL DACOPY(INITAL,INTRVL,IBUFFR,IBEGIN,IFINAL,JFINAL,
     1JUSED,JBUFFR,NXTINI,NXTBGN,MAXPRT)
      IF(JUSED.LT.JSTART)GO TO 8
      IF(MAXPRT.GE.JSTART)LIMIT=MAXPRT
C     MARK RIGHT END OF AREA INTO WHICH TAB WAS EXPANDED
      IF(IBUFFR(NXTBGN-1).NE.ITAB)GO TO 7
      KOUNT=0
      INDEX=LOWER-1
    5 INDEX=INDEX+1
      IF(INDEX.GE.NXTBGN)GO TO 6
      IF(IBUFFR(INDEX).NE.ITAB)GO TO 5
      KOUNT=KOUNT+1
      IF(KOUNT.GT.10)KOUNT=1
      GO TO 5
    6 JBUFFR(JUSED)=IDIGIT(KOUNT)
C     PREPARE FOR NEXT AREA INTO WHICH TAB CAN BE EXPANDED
    7 INITAL=NXTINI
      IBEGIN=NXTBGN
      GO TO 4
C     REPORT RESULTS TO USER
    8 IF(LIMIT.LT.ISTART)GO TO 1
    9 TYPE 10,(JBUFFR(I),I=ISTART,LIMIT)
   10 FORMAT(2X,200A1)
C     IDENTIFY COLUMNS
      LINE=1
      IRIGHT=LIMIT-ISTART+2
   11 CALL DABELT(1,1,0,LINE,2,
     1IRIGHT,0,MAXOUT,JBUFFR,MAXLIN,MAXPRT,MAXUSD)
      TYPE 10,(JBUFFR(I),I=1,MAXPRT)
      LINE=LINE+1
      IF(LINE.LE.MAXLIN)GO TO 11
      GO TO 1
      END
.PAGE
T\\YPICAL ^DIALOG ^BETWEEN ^^DACOPY D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
.FILL
^THE FIRST LINE TYPED BY THE USER CONSISTED MERELY OF 7 TAB
CHARACTERS FOLLOWED BY THE LETTER ^A. ^THE SECOND LINE CONSISTS OF
ALTERNATING TABS AND LETTERS. ^THE THIRD LINE CONSISTS OF SEVERAL
REPETITIONS OF A SEQUENCE FORMED OF SEVERAL SPACES, A SINGLE LETTER
AND A SINGLE TAB. ^THE FINAL LINE CONSISTS OF A RANDOM SEQUENCE OF
TABS, SPACES AND LETTERS.
.SKIP
.NOFILL
*                                                       ^A
.SKIP
 1111111222222223333333344444444555555556666666677777777^A
     1    2    2    3    4    4    5    6    6    7    7^A
         2        3        4        5        6        7 ^A
             2            4            5            7   ^A
                 3                5                7    ^A
                     3                    6             ^A
 23456789012345678901234567890123456789012345678901234567
         111111111122222222223333333333444444444455555555
.SKIP
*       ^^A       B       C       D       E       F       G
.SKIP
 1111111A2222222B3333333C4444444D5555555E6666666F7777777G
     1  A 2    2B   3   C4    4 D  5    E    6  F 7    7G
        A2      B 3     C  4    D   5   E    6  F     7 G
        A    2  B       C 4     D      5E       F   7   G
        A       B3      C       D 5     E       F  7    G
        A       B    3  C       D       E 6     F       G
 23456789012345678901234567890123456789012345678901234567
         111111111122222222223333333333444444444455555555
.SKIP
*   A       B       C       D       E       F       G
.SKIP
    A111    B222    C333    D444    E555    F666    G
    A1      B  2    C       D 4     E       F6      G
    A       B       C       D       E       F6      G
    A       B2      C       D       E  5    F       G
    A       B       C       D       E       F       G
    A       B       C3      D       E       F       G
 2345678901234567890123456789012345678901234567890123
         11111111112222222222333333333344444444445555
.SKIP
*               A       B C      D       EF     GH I    J K
.SKIP
 1111111  222222A   3333B C 4444 D  5555 EF66666GH I7777J K
     1    2    2A   3   B C   4  D       EF  6  GH I   7J K
                A       B C      D  5    EF  6  GH I  7 J K
             2  A       B C      D     5 EF     GH I7   J K
                A       B C      D       EF     GH I    J K
                A    3  B C      D       EF     GH I    J K
 2345678901234567890123456789012345678901234567890123456789
         11111111112222222222333333333344444444445555555555
.SUBTITLE ^^DAFILL, R\\OUTINE TO ^EXPAND ^TAB ^CHARACTERS TO ^SPACES
.PAGE
.LEFT MARGIN 0
.NOFILL
^^DDDDDDD       AAA     FFFFFFFFF  IIIII  LLL        LLL
DDD   DDD   AAA AAA   FFF         III   LLL        LLL
DDD   DDD  AAA   AAA  FFFFFF      III   LLL        LLL
DDD   DDD  AAAAAAAAA  FFF         III   LLL        LLL
DDDDDDD    AAA   AAA  FFF        IIIII  LLLLLLLLL  LLLLLLLLL
.SKIP 2
.FILL
.CENTER
DAFILL, R\\OUTINE TO ^EXPAND ^TAB ^CHARACTERS TO ^SPACES
.CENTER
------##------- -- ------ --- ---------- -- ------
.SKIP
^COMPUTER TERMINALS OFTEN CAN GENERATE 2 TYPES OF FORWARD SPACING
BUT NONPRINTING CHARACTERS. ^THE SIMPLER OF THESE, THE SPACE, MERELY
CAUSES THE CHARACTER TO ITS RIGHT TO BE SHIFTED OVER BY 1 COLUMN AND
IS EXACTLY EQUIVALENT TO AN EMPTY COLUMN ON A PUNCHED CARD. ^THE TAB
CHARACTER (SOMETIMES CALLED ^H^T OR HORIZONTAL TAB), HOWEVER, SHIFTS
THE CHARACTER TO ITS RIGHT BEYOND THE NEXT COLUMN POSITION WHICH IS
A WHOLE MULTIPLE OF 8 (OR SOME OTHER, GENERALLY FIXED TAB STOP
INTERVAL), AND IS CONVENIENT FOR QUICKLY SPACING ACROSS THE WIDTH OF
THE INPUT LINE. ^THE READING PROGRAM CAN DISTINGUISH A TAB CHARACTER
FROM A SPACE, SO APPROPRIATE TREATMENT OF THE TAB CHARACTER POSES
LITTLE OR NO DIFFICULTY TO A PROGRAM WHICH IS DOING PARSING OR WHICH
IS READING NUMERIC INFORMATION, SINCE THE TAB CHARACTER CAN BE
TREATED AS EQUIVALENT TO A SPACE OR NOT, WHICHEVER IS APPROPRIATE TO
THE PARTICULAR APPLICATION.
.SKIP
^IF THE PROGRAM MUST INSERT TEXT CONTAINING TAB CHARACTERS INTO
PRINTED OR TYPED OUTPUT, THE ORIGINAL ALIGNMENT OF THE TEXT WITH THE
TAB STOP COLUMNS WILL PROBABLY NOT BE MAINTAINED, CAUSING THE
APPEARANCE OF THE TEXT UPON OUTPUT TO BE QUITE DIFFERENT FROM THAT
SEEN ON THE ORIGINAL TERMINAL FROM WHICH THE TEXT WAS ENTERED INTO
THE COMPUTER SYSTEM. ^ALSO, WHEN THIS ALIGNMENT CHANGES, THE
EFFECTIVE NUMBER OF COLUMNS ACROSS THE WIDTH OF THE TEXT CHANGES, SO
THAT INFORMATION INSERTED INTO FIELDS TO THE RIGHT OF THE TEXT
CONTAINING THE TAB CHARACTERS WILL ALSO BE SHIFTED INTO DIFFERENT
COLUMNS THAN INTENDED. ^THIS DIFFICULTY CAN BE AVOIDED BY CONVERSION
OF THE TAB CHARACTERS INTO THE CORRECT NUMBER OF SPACES PRIOR TO
OUTPUT.
.SKIP
^^DAFILL \\IS ONE OF TWO ROUTINES IN THE ^^FASP \\PACKAGE WHICH
CONVERT TAB CHARACTERS TO SPACES IN BUFFERS READ BY AN ^A1 FORMAT.
^^DAFILL \\COPIES THE EXPANDED TEXT BACK INTO THE INPUT BUFFER,
OVERWRITING ANY CHARACTERS WHICH COULD NOT BE REPRESENTED DUE TO THE
BUFFER BEING TOO SMALL. ^^DACOPY, \\THE OTHER TAB TO SPACE
CONVERSION ROUTINE, COPIES THE INPUT BUFFER INTO A SEPARATE OUTPUT
BUFFER AND PROVIDES THE CALLING PROGRAM WITH SUFFICIENT INFORMATION
TO PROPERLY CONTINUE THE EXPANSION OF ANY TEXT WHICH MIGHT REMAIN
UNPROCESSED DUE TO THE OUTPUT BUFFER BEING TOO SMALL. ^^DAFILL
\\REQUIRES MORE EXECUTION TIME SINCE THE PROCESSING IS ITERATIVE,
AND IS A LONGER ROUTINE, BUT IT DOES NOT REQUIRE THE EXTRA OUTPUT
BUFFER.
.SKIP
^A SHORTER VERSION OF ^^DAFILL, \\NAMED ^^DAIFLL, \\IS ALSO PROVIDED
WHICH DOES NOT PROVIDE FOR THE INSERTION OF EXTRA INITIAL SPACES
OTHER THAN THOSE RESULTING FROM THE EXPANSION OF INITIAL TABS, AND
WHICH DOES NOT PROVIDE FOR THE SUPPRESSION OF EITHER TABS OR SPACES.
.SKIP 3
.CENTER
THE ^^DAFILL \\AND ^^DAIFLL A\\RGUMENT ^LISTS
.CENTER
--- ------ --- ------ -------- -----
.SKIP
^THE ARGUMENT LISTS OF ROUTINES ^^DAFILL \\AND ^^DAIFLL \\ARE
.SKIP
.NOFILL
      ^^SUBROUTINE DAFILL(INITAL,INTRVL,IBEGIN,IFINAL,MAXBFR,
     1IBUFFR,MAXPRT,MAXUSD)
.SKIP
\\AND
.SKIP
      ^^SUBROUTINE DAIFLL(INITAL,INTRVL,IBEGIN,IFINAL,MAXBFR,
     1IBUFFR,MAXPRT,MAXUSD)
.SKIP
\\BOTH WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR)
.FILL
.SKIP
T\\HE ARGUMENT LISTS OF THE 2 ROUTINES ARE IDENTICAL EXCEPT THAT,
FOR ^^DAIFLL, \\THE ARGUMENT ^^INITAL \\MUST BE GREATER THAN OR
EQUAL TO ZERO, AND THE ARGUMENT ^^INTRVL \\MUST BE GREATER THAN ZERO.
.SKIP
^THE ARGUMENTS ^^INITAL, INTRVL, IBEGIN, IFINAL, \\AND ^^MAXBFR
\\ARE USED ONLY FOR INPUT AND THEIR ORIGINAL VALUES ARE RETURNED
UNCHANGED. ^THE ARRAY ^^IBUFFR \\IS USED FOR BOTH INPUT AND OUTPUT.
^THE ARGUMENTS ^^MAXPRT \\AND ^^MAXUSD \\ARE USED ONLY FOR OUTPUT
AND THEIR ORIGINAL VALUES ARE IGNORED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^INITAL#=#\\LESS THAN ZERO AND PROVIDING THAT ^^INTRVL \\IS GREATER
THAN ZERO, THE ABSOLUTE VALUE OF ^^INITAL \\IS THE NUMBER OF EXTRA
SPACES TO BE INSERTED AT THE START OF THE PROCESSED TEXT. ^IF
^^INITAL \\IS LESS THAN ZERO, REGARDLESS OF WHETHER ^^INTRVL \I\S
\\POSITIVE OR NEGATIVE, THEN THE FIRST TAB STOP WILL BE OF THE WIDTH
SPECIFIED BY THE ABSOLUTE VALUE OF ^^INTRVL. I\F INTRVL \\IS LESS
THAN OR EQUAL TO ZERO, THEN NO LEADING SPACES WILL BE INSERTED INTO
THE PROCESSED TEXT WHETHER REQUESTED BY A NEGATIVE VALUE OF ^^INITAL
\\OR BY LEADING SPACES OR TAB CHARACTERS IN THE ORIGINAL TEXT.
.INDENT -2
=#EQUAL TO OR GREATER THAN ZERO, ^^INITAL \\IS THE DISTANCE TO THE
FIRST TAB STOP. (^DISTANCE IS HERE DEFINED AS A NUMBER OF CHARACTERS
OR, SINCE THE BUFFERS CONTAIN A SINGLE CHARACTER IN EACH LOCATION OF
THE ARRAY, AS A SUBSCRIPT RANGE.)# ^IF ^^INITAL \\IS ZERO, THEN THE
DISTANCE TO THE FIRST TAB STOP IS TAKEN TO BE THE ABSOLUTE VALUE OF
^^INTRVL. I\\F THE LEFT TAB STOP IS TO BE SAME WIDTH AS THOSE TO ITS
RIGHT, THEN ^^INITAL \\CAN EQUAL EITHER ZERO OR THE ABSOLUTE VALUE
OF ^^INTRVL. I\\F THE FIRST CHARACTER IN THE ORIGINAL TEXT IS A TAB
CHARACTER, THEN IT WILL BE EXPANDED TO THE NUMBER OF SPACES
SPECIFIED BY ^^INITAL (\\OR BY A POSITIVE VALUE OF ^^INTRVL \I\F
INITAL \\IS ZERO). ^IF THE FIRST CHARACTER IS NOT A TAB CHARACTER,
BUT THE SECOND CHARACTER IS A TAB CHARACTER, THEN THE SECOND
CHARACTER WILL BE EXPANDED TO ^^INITAL-1 \\SPACES, AND SO ON THROUGH
THE FIRST ^^INITAL \\CHARACTERS PROVIDING IN EACH CASE THAT NONE OF
THE CHARACTERS TO THE LEFT ARE TAB CHARACTERS. ^AFTER THE SUM OF THE
NUMBER OF CHARACTERS WHICH HAVE BEEN INSERTED INTO THE PROCESSED
TEXT, WHETHER THESE CHARACTERS ARE PRINTING CHARACTERS OR SPACES IN
THE ORIGINAL TEXT OR SPACES RESULTING FROM THE EXPANSION OF TAB
CHARACTERS, AND, IF ^^INTRVL \\IS EQUAL TO OR LESS THAN ZERO, OF THE
NUMBER OF SPACES WHICH HAVE BEEN SUPPRESSED, EQUALS THE VALUE OF
^^INITAL, \\THEN THE TAB STOP INTERVAL BECOMES THAT GIVEN BY THE
ABSOLUTE VALUE OF THE ARGUMENT ^^INTRVL.
.SKIP
.INDENT -9
INTRVL#=#\\NOT EQUAL TO ZERO, THE ABSOLUTE VALUE OF ^^INTRVL \I\S
\\THE TAB STOP INTERVAL. ^ON THE ^^PDP-10 \\COMPUTER, THE
APPROPRIATE ABSOLUTE VALUE OF ^^INTRVL \\IS 8, AND, ASSUMING THAT
THE FIRST CHARACTER IN THE BUFFER CORRESPONDS TO COLUMN 1, THE VALUE
OF ^^INITAL \\AT THE START OF THE PROCESSING OF THE CONTENTS OF THE
ORIGINAL TEXT CAN BE EITHER 0 OR 8. ^AFTER THE SUM OF THE NUMBER OF
CHARACTERS INSERTED INTO THE PROCESSED TEXT AND OF THE NUMBER OF
SPACES, IF ANY, SUPPRESSED BY A NEGATIVE OR ZERO VALUE OF ^^INTRVL,
\\HAS REACHED AT LEAST THE ABSOLUTE VALUE OF ^^INITAL, \\THEN A TAB
CHARACTER ENCOUNTERED IN THE ORIGINAL TEXT CAUSES SUFFICIENT SPACES
TO BE INSERTED INTO THE PROCESSED TEXT OR ELSE TO BE SUPPRESSED SO
THAT THE TOTAL NUMBER OF CHARACTERS INSERTED INTO THE PROCESSED TEXT
OR SUPPRESSED BY THE PRESENT CALL TO ^^DAFILL \\EQUALS THE SUM OF
THE ABSOLUTE VALUE OF ^^INITAL \\AND THE NEXT HIGHER WHOLE MULTIPLE
OF THE ABSOLUTE VALUE OF ^^INTRVL.
.INDENT -2
=#\\LESS THAN ZERO, NO LEADING SPACES ARE TO BE INSERTED INTO THE
PROCESSED TEXT WHETHER SUCH LEADING SPACES ARE REQUESTED BY A
NEGATIVE VALUE OF ^^INITAL \\OR BY LEADING SPACES OR TAB CHARACTERS
IN THE ORIGINAL TEXT. ^ONCE A PRINTING CHARACTER HAS BEEN COPIED
INTO THE PROCESSED TEXT, HOWEVER, THEN ALL SUBSEQUENT SPACES WILL BE
COPIED AND ALL SUBSEQUENT TAB CHARACTERS WILL BE EXPANDED TO SPACES.
.INDENT -2
=#ZERO, NO SPACES ARE TO BE INSERTED INTO THE PROCESSED TEXT. ^TAB
CHARACTERS AND SPACES IN THE ORIGINAL TEXT ARE IGNORED.
.INDENT -2
=#GREATER THAN ZERO, ALL SPACES WHETHER REQUESTED BY A NEGATIVE
VALUE OF ^^INITAL \\OR BY SPACES OR TAB CHARACTERS IN THE ORIGINAL
TEXT ARE TO BE INSERTED INTO THE PROCESSED TEXT.
.SKIP
.INDENT -9
^^IBEGIN#=#\\THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION AT WHICH
IS TO BE FOUND THE FIRST CHARACTER OF THE TEXT TO BE PROCESSED.
^FOLLOWING THE CONVERSION OF TAB CHARACTERS IN THE TEXT TO THE
PROPER NUMBER OF SPACES, THE PROCESSED TEXT IS PLACED BACK INTO THE
^^IBUFFR \\ARRAY STARTING AT SUBSCRIPT ^^IBEGIN.
.SKIP
.INDENT -9
IFINAL#=#\\THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION AT WHICH
IS TO BE FOUND THE FINAL CHARACTER OF THE TEXT TO BE PROCESSED.
.SKIP
.INDENT -9
^^MAXBFR#=#\\THE SUBSCRIPT OF THE HIGHEST LOCATION IN THE ^^IBUFFR
\\ARRAY AT WHICH A CHARACTER OF THE PROCESSED TEXT CAN BE PLACED.
^^MAXBFR \\MUST EQUAL OR BE GREATER THAN ^^IFINAL. A\\NY CHARACTERS
WHICH REQUIRE SHIFTING TO A HIGHER SUBSCRIPT THAN THAT INDICATED BY
^^MAXBFR \\ARE INSTEAD DISCARDED.
.SKIP
.INDENT -9
^^IBUFFR#=#\\THE ARRAY USED FOR INPUT OF THE TEXT CONTAINING TAB
CHARACTERS WHICH ARE TO BE EXPANDED TO THE PROPER NUMBER OF SPACES,
AND USED FOR OUTPUT OF THE TEXT AFTER THIS EXPANSION OF TAB
CHARACTERS TO SPACES HAS BEEN PERFORMED. ^THE CHARACTERS IN THE
^^IBUFFR \\ARRAY MUST HAVE BEEN READ BY A MULTIPLE OF AN ^A1 FORMAT.
.SKIP
.INDENT -9
^^MAXPRT#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE HIGHEST
LOCATION IN THE PROCESSED TEXT INTO WHICH ^^DAFILL \\HAS PLACED A
PRINTING (NONSPACE) CHARACTER. ^IF NO PRINTING CHARACTERS ARE PLACED
INTO THE PROCESSED TEXT, THEN ^^MAXPRT \\WILL BE RETURNED CONTAINING
THE VALUE ^^IBEGIN-1.
.SKIP
.INDENT -9
MAXUSD#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE HIGHEST LOCATION
IN THE ^^IBUFFR \\ARRAY CONTAINING A CHARACTER OF THE TEXT AFTER
PROCESSING. ^IF ^^INTRVL \\IS LESS THAN OR EQUAL TO ZERO, AND THE
ORIGINAL TEXT CONTAINED ONLY SPACES AND/OR TAB CHARACTERS, THEN
^^MAXUSD \\IS RETURNED CONTAINING THE VALUE ^^IBEGIN-1. I\F INTRVL
\\IS GREATER THAN ZERO, THEN ^^MAXUSD \\WILL BE RETURNED CONTAINING
A VALUE IN THE RANGE ^^IFINAL \\THROUGH ^^MAXBFR.
.PAGE
.LEFT MARGIN 0
.FILL
.CENTER
A\N E\\XAMPLE OF THE ^USE OF ^^DAFILL
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE SAMPLE PROGRAM LISTED BELOW AND ON THE FOLLOWING PAGE
DEMONSTRATES THE MANNER IN WHICH ^^DAFILL \\IS USED. ^THE PROGRAM
ASKS THE USER FOR THE VALUES OF THE ARGUMENTS ^^INITAL \\AND
^^INTRVL, \\THEN PROMPTS THE USER WITH AN ASTERISK BEFORE READING A
LINE OF TEXT INCLUDING TABS TO BE EXPANDED TO THE CORRESPONDING
NUMBER OF SPACES. ^SINCE THE ASTERISK IS TYPED IN THE FIRST COLUMN,
THE FIRST TAB STOP INTERVAL WOULD BE 1 LESS THAN THE SUBSEQUENT
INTERVALS. ^ON THE ^^PDP-10, \\APPROPRIATE VALUES WOULD BE
^^INITAL=7 \\AND ^^INTRVL=+/-8. T\\HE USE OF OTHER VALUES FOR THESE
ARGUMENTS WOULD GIVE RESULTS DIFFERENT THAN THAT SHOWN DIRECTLY ON
THE TERMINAL IN RESPONSE TO THE USER'S TYPING.
.SKIP
^THE PROGRAM CALLS ^^DACOPY \\ONCE FOR EACH CHARACTER TYPED BY THE
USER TO MARK WITH DIGITS IN A SECOND BUFFER THE LOCATIONS OF THE
SPACES RESULTING FROM THE EXPANSION OF TAB CHARACTERS. ^IF MERELY
COPYING WITH TAB EXPANSION WAS DESIRED, A SINGLE CALL TO ^^DACOPY
\\SIMILAR TO THE FOLLOWING SINGLE CALL TO ^^DAFILL \\WOULD BE
SUFFICIENT TO EXPAND THE TABS WHILE COPYING THE TEXT TYPED BY THE
USER.
.SKIP
^A SAMPLE DIALOG BETWEEN THE PROGRAM AND THE USER IS PRESENTED
FOLLOWING THE LISTING OF THE PROGRAM.
.SKIP 3
.NOFILL
      ^^DATA ITTY,JTTY/5,5/
      DATA IBEGIN,IFINAL,MAXBFR/6,55,72/
      DATA IBLANK,ITAB/1H ,1H	/
      DIMENSION IBUFFR(72),JBUFFR(72),IDIGIT(10)
      DATA IDIGIT/1H1,1H2,1H3,1H4,1H5,1H6,1H7,1H8,1H9,1H0/
C
C     ASK USER FOR THE INITIAL AND SUBEQUENT TAB STOPS
    1 WRITE(JTTY,2)
    2 FORMAT(1X/15H INITAL,INTRVL=,$)
      READ(ITTY,3)INITAL,INTRVL
    3 FORMAT(2I)
C
C     ASK FOR THE TEXT IN WHICH TABS ARE TO BE EXPANDED
      WRITE(JTTY,4)
    4 FORMAT(2H *,$)
      READ(ITTY,5)(IBUFFR(I),I=IBEGIN,IFINAL)
    5 FORMAT(60A1)
C
C     USE DACOPY TO REPORT LOCATIONS OF TABS
      JUSED=IBEGIN-1
      JNITAL=INITAL
      KOUNT=0
      MOST=JUSED
      JNTRVL=INTRVL
      DO 8 JBEGIN=IBEGIN,IFINAL
      KUSED=JUSED
      CALL DACOPY(JNITAL,JNTRVL,IBUFFR,JBEGIN,JBEGIN,
     1MAXBFR,JUSED,JBUFFR,NXTINI,NXTBGN,MAXPRT)
      IF(JUSED.EQ.KUSED)GO TO 8
      IF(JNTRVL.LT.0)JNTRVL=-JNTRVL
      IF(IBUFFR(JBEGIN).EQ.IBLANK)GO TO 8
      IF(IBUFFR(JBEGIN).NE.ITAB)GO TO 7
      KOUNT=KOUNT+1
      IF(KOUNT.GT.10)KOUNT=1
    6 KUSED=KUSED+1
      JBUFFR(KUSED)=IDIGIT(KOUNT)
      IF(KUSED.LT.JUSED)GO TO 6
      GO TO 8
    7 MOST=MAXPRT
    8 JNITAL=NXTINI
      IF(MOST.GE.IBEGIN)WRITE(JTTY,11)
     1(JBUFFR(I),I=IBEGIN,MOST)
C
C     USE DAFILL TO EXPAND SAME TEXT
      CALL DAFILL(INITAL,INTRVL,IBEGIN,IFINAL,MAXBFR,
     1IBUFFR,MAXPRT,MAXUSD)
      IF(MAXUSD.LT.IBEGIN)GO TO 1
      DO 9 I=IBEGIN,MAXUSD
    9 IF(IBUFFR(I).EQ.ITAB)WRITE(JTTY,10)
   10 FORMAT(6H ERROR)
      IF(MAXPRT.LT.IBEGIN)GO TO 1
      WRITE(JTTY,11)(IBUFFR(I),I=IBEGIN,MAXPRT)
   11 FORMAT(2H  ,100A1)
C
C     REPORT COLUMN NUMBERS
      LINE=1
      IRIGHT=MAXPRT-IBEGIN+2
   12 CALL DABELT(1,1,0,LINE,2,
     1IRIGHT,0,MAXBFR,IBUFFR,MAXLIN,MAXPRT,MAXUSD)
      WRITE(JTTY,11)(IBUFFR(I),I=1,MAXPRT)
      LINE=LINE+1
      IF(LINE.LE.MAXLIN)GO TO 12
      GO TO 1
      END
.SKIP 3
T\\YPICAL ^DIALOG ^BETWEEN ^^DAFILL D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
.TEST PAGE 8
^^INITAL,INTRVL=7 8
.SKIP
*       A        B                C                        D
.SKIP
 1111111A 222222 B  333344444444  C   55   66666   77777   D
        A        B                C                        D
 23456789012345678901234567890123456789012345678901234567890
         111111111122222222223333333333444444444455555555556
.SKIP
.TEST PAGE 8
INITAL,INTRVL=7 8
.SKIP
*       A               B               C               D
.SKIP
 1111111A2222222 3333333B4444444  555555C6666666   77777D
        A               B               C               D
 23456789012345678901234567890123456789012345678901234567
         111111111122222222223333333333444444444455555555
.SKIP
.TEST PAGE 8
INITAL,INTRVL=7 8
.SKIP
*ABCDEF GHIJK   LMNO    PQR     ST      U
.SKIP
 ABCDEF1GHIJK222LMNO3333PQR44444ST555555U
 ABCDEF GHIJK   LMNO    PQR     ST      U
 2345678901234567890123456789012345678901
         11111111112222222222333333333344
.SKIP
.TEST PAGE 8
INITAL,INTRVL=7 8
.SKIP
*A      BC      DEF     GHIJ    KLMNO   PQRSTU
.SKIP
 A111111BC222222DEF33333GHIJ4444KLMNO555PQRSTU
 A      BC      DEF     GHIJ    KLMNO   PQRSTU
 234567890123456789012345678901234567890123456
         1111111111222222222233333333334444444
.SKIP
.TEST PAGE 8
INITAL,INTRVL=7 8
.SKIP
*                 ABC             DEF             GHI
.SKIP
   1111122222222  ABC  344444444  DEF  566666666  GHI
                  ABC             DEF             GHI
 2345678901234567890123456789012345678901234567890123
         11111111112222222222333333333344444444445555
.SKIP
.TEST PAGE 8
INITAL,INTRVL=7 -8
.SKIP
*                 ABC             DEF             GHI
.SKIP
 ABC  122222222  DEF  344444444  GHI
 ABC             DEF             GHI
 23456789012345678901234567890123456
         111111111122222222223333333
.SKIP
.TEST PAGE 8
INITAL,INTRVL=-7 -8
.SKIP
*                 ABC             DEF             GHI
.SKIP
 ABC  122222222  DEF  344444444  GHI
 ABC             DEF             GHI
 23456789012345678901234567890123456
         111111111122222222223333333
.SUBTITLE ^^DAFLAG, R\\OUTINE TO ^LOCATE ^COMPONENTS OF ^FILE ^SPECIFICATION
.PAGE
.NOFILL
^^DDDDD          AAA  FFFFFFFF  LL              AAA     GGGGG
DD   DD       AAAA  FF        LL             AAAA   GG
DD    DD     AA AA  FF        LL            AA AA  GG
DD    DD    AA  AA  FFFFF     LL           AA  AA  GG  GGGG
DD    DD   AAAAAAA  FF        LL          AAAAAAA  GG    GG
DD   DD   AA    AA  FF        LL         AA    AA   GG   GG
DDDDD    AA     AA  FF        LLLLLLLL  AA     AA     GGGGG
.SKIP 2
.FILL
.CENTER
DAFLAG, R\\OUTINE TO ^LOCATE ^COMPONENTS OF ^FILE ^SPECIFICATION
.CENTER
------##------- -- ------ ---------- -- ---- -------------
.SKIP
^^DAFLAG \\LOCATES THE COMPONENTS OF A FILE SPECIFICATION CONTAINED
IN A BUFFER READ BY THE CALLING PROGRAM WITH A MULTIPLE OF AN ^A1
FORMAT. ^ALTHOUGH THE LEADING AND SEPARATING CHARACTERS ARE THOSE
EXPECTED IN FILE SPECIFICATIONS FOR ^DIGITAL ^EQUIPMENT ^CORPORATION
(^^DEC) \\COMPUTERS, NO EVALUATION OF THE COMPONENTS IS PERFORMED,
SO THIS ROUTINE COULD BE USED TO FIND THE PARTS OF SPECIFICATIONS
HAVING THE SAME LEADING AND SEPARATING CHARACTERS BUT WHICH ARE
MEANT FOR OTHER PURPOSES.
.SKIP
^THE BASIC FORM OF A FILE SPECIFICATION IS
.SKIP
^^DEVICE:NAME.EXT[NUMBER,NUMBER]/SWITCH:'TEXT'/SWITCH:NUMBER
.SKIP
\O\R
.SKIP
[NUMBER,NUMBER]DEVICE:NAME.EXT/SWITCH:'TEXT'/SWITCH:NUMBER
.SKIP
\\IN WHICH ^^NUMBER \\MERELY IMPLIES A LOCATION AT WHICH A NUMBER
MIGHT BE PRESENT, BUT WHICH COULD INSTEAD CONTAIN ANY SEQUENCE OF
PRINTING CHARACTERS OTHER THAN THE SEPARATION AND DELIMITER
CHARACTERS. ^ONLY ONE DEVICE FIELD, ONE NAME FIELD AND ONE BRACKETED
FIELD CAN APPEAR TOGETHER IN A SINGLE FILE SPECIFICATION. ^THE
DEVICE FIELD MUST APPEAR BEFORE THE NAME FIELD, BUT THE BRACKETED
FIELD CAN BE BEFORE, BETWEEN, OR AFTER THE DEVICE AND NAME FIELDS.
^THE CALLING PROGRAM IS ALSO INFORMED IF AN AT SIGN APPEARS ANYWHERE
WITHIN THE FILE SPECIFICATION OTHER THAN WITHIN A SWITCH FIELD.
^SWITCH FIELDS CONSISTING OF INITIAL SLASHES FOLLOWED BY WORDS
CONNECTED BY COLONS ARE REPORTED SEPARATELY FROM THE REST OF THE
FILE SPECIFICATION AND SEPARATELY FROM EACH OTHER BY SEPARATE CALLS
TO THIS ROUTINE. ^COMPLETE FILE SPECIFICATIONS CAN BE SEPARATED BY
COMMAS, SEMICOLONS OR EQUAL SIGNS. ^COMMENTS WHICH ARE OTHERWISE
IGNORED CAN APPEAR TO THE RIGHT OF EXCLAMATION POINTS AND AMPERSANDS.
.SKIP
^SPACES AND/OR TAB CHARACTERS CAN APPEAR TO EITHER SIDE OF THE ITEMS
ENCLOSED WITHIN THE BRACKETS, AND CAN APPEAR AFTER THE LEADING
SLASHES OF SWITCH FIELDS AND BOTH BEFORE AND AFTER THE CONNECTING
COLONS IN SWITCH FIELDS. ^THE CALLING PROGRAM CAN SPECIFY WHETHER
OTHER SPACES ARE TO TERMINATE THE FILE SPECIFICATION, OR ARE TO
TERMINATE A PARTICULAR FIELD WITHIN THE FILE SPECIFICATION OR ARE TO
MERELY TERMINATE A PARTICULAR COMPONENT WITHIN THE FIELD. ^IN A
BRACKETED FIELD, COMMAS ARE NOT NECESSARY BETWEEN ITEMS WHICH ARE
SEPARATED BY SPACES AND/OR TAB CHARACTERS PROVIDING THE ITEMS BEING
SEPARATED ARE PRESENT. ^FOR EXAMPLE, THE FILE SPECIFICATION
^^DAFLAG[6001,56] \\COULD ALSO BE WRITTEN AS ^^DAFLAG[6001#56] \O\R
\A\S DAFLAG[6001#,#56] \\BUT THE COMMA IN ^^DAFLAG[,56] \O\R
DAFLAG[#,#56] \\IS NECESSARY SINCE THIS COMMA INDICATES THAT THE
FIRST NUMBER WITHIN THE BRACKETED FIELD IS MISSING.
.SKIP
^THE COMPONENTS OF EACH FIELD WITHIN THE FILE SPECIFICATION ARE
IDENTIFIED TO THE CALLING PROGRAM BY LENGTH AND BY STARTING LOCATION
WITHIN THE BUFFER. ^THIS INFORMATION IS RETURNED WITHIN THE 2 ARRAYS
^^KNTLTR \\AND ^^INILTR \\RESPECTIVELY. ^THE DESCRIPTIONS OF THE
COMPONENTS OF EACH FIELD ARE GROUPED TOGETHER IN THE ARRAYS RETURNED
TO THE CALLING PROGRAM. ^SINCE EACH FIELD CAN CONSIST OF ANY NUMBER
OF COMPONENTS CONNECTED BY THE APPROPRIATE CHARACTER (COLON, COMMA
OR PERIOD), AND SINCE FOR SOME APPLICATIONS A TERMINAL SEPARATOR
CHARACTER HAS SPECIAL MEANING, AN EXTRA ZERO IS RETURNED IN THE
^^KNTLTR \\ARRAY IF A CONNECTING CHARACTER TERMINATES THE FIELD BUT
IS NOT NECESSARY. ^SINCE THERE IS NEVER ANY QUESTION ABOUT WHETHER
AN ITEM IN THE DEVICE FIELD WAS FOLLOWED BY THE CONNECTING
CHARACTER, THE DESCRIPTION OF THE DEVICE FIELD DOES NOT INCLUDE AN
EXTRA ZERO. ^WHETHER AN EXTRA ZERO APPEARS WITHIN THE DESCRIPTION OF
THE BRACKETED FIELD IS INDEPENDENT OF WHETHER THE RIGHT BRACKET IS
PRESENT.
.SKIP
^TEXT STRINGS DELIMITED BY APOSTROPHES ARE RECOGNIZED ONLY WITHIN
THE SWITCH FIELDS. ^IF A TEXT STRING IS FOUND WHICH HAS NOT BEEN
PRECEDED BY A SLASH THEN THIS TEXT STRING IS TREATED AS THOUGH IT
WERE THE ONLY COMPONENT OF A SWITCH FIELD WHICH CANNOT BE EXTENDED
BY A SUBSEQUENT COLON, SO THAT ANYTHING APPEARING TO THE RIGHT OF
THE TEXT STRING WOULD HAVE TO BE EVALUATED BY THE NEXT CALL TO THIS
ROUTINE. ^THE LOCATION OF A TEXT STRING AS RETURNED TO THE CALLING
PROGRAM IS THAT OF THE INITIAL APOSTROPHE, AND THE LENGTH OF THE
TEXT STRING INCLUDES THE INITIAL, BUT NOT THE FINAL, APOSTROPHE. ^IF
THE FINAL APOSTROPHE IS MISSING, THEN THE TEXT STRING IS ASSUMED TO
EXTEND THROUGH THE RIGHTMOST PRINTING CHARACTER IN THE BUFFER.
^WITHIN A TEXT STRING, TWO IMMEDIATELY ADJACENT APOSTROPHES INDICATE
A SINGLE APOSTROPHE WHICH IS TO BE INCLUDED WITHIN THE STRING. ^IF
TWO IMMEDIATELY ADJACENT APOSTROPHES ARE ENCOUNTERED WITHIN THE TEXT
STRING, THEN THE REMAINING PORTION OF THE STRING IS MOVED 1
CHARACTER TO THE LEFT SO THAT THE RETURNED CONTENTS OF THE BUFFER
AND THE RETURNED LENGTH IN THE ^^KNTLTR \\ARRAY DO NOT INCLUDE THE
EXTRA APOSTROPHE.
.SKIP
.TEST PAGE 3
^FOR EXAMPLE, IF THE CONTENTS OF THE BUFFER ARE
.SKIP
.NOFILL
^^DSK:DAFLAG.F4[6001,56,FASP]/LINE:60:/TITLE:'(JAN 76)'
.SKIP
.FILL
\\THEN THE INFORMATION RETURNED BY THE FIRST CALL TO THIS ROUTINE
WOULD BE
.SKIP
.NOFILL
.LEFT MARGIN 5
.TEST PAGE 10
FIELD         ^^KNTLTR \\CONTENTS      ^^INILTR \\CONTENTS
.SKIP
DEVICE              3                    1
.SKIP
NAME                6                    5
                    2                   12
.SKIP
BRACKETED           4                   15
                    2                   20
                    4                   23
.SKIP
.TEST PAGE 6
.LEFT MARGIN 0
.FILL
AND THE INFORMATION RETURNED BY THE SECOND CALL TO THIS ROUTINE
WOULD BE
.NOFILL
.LEFT MARGIN 5
.SKIP
SWITCH              4                   29
                    2                   34
                    0                UNDEFINED
.SKIP
.TEST PAGE 5
.LEFT MARGIN 0
.FILL
AND THE INFORMATION RETURNED BY THE THIRD CALL TO THIS ROUTINE WOULD
BE
.NOFILL
.LEFT MARGIN 5
.SKIP
SWITCH              5                   38
                    9                   44
.LEFT MARGIN 0
.FILL
.SKIP
^SOME ^^DEC\\SYSTEM-10 PROGRAMS INTERPRET AN ASTERISK WHICH IS
ATTACHED DIRECTLY TO THE RIGHT END OF ONE OF THE COMPONENTS OF A
FILE SPECIFICATION AS INDICATING A WILD-CARD MATCH OF ANY AND OF ALL
CHARACTERS AT OR TO THE RIGHT OF THAT POSITION WITHIN THE COMPONENT.
^A LEFTMOST ASTERISK WOULD THEN BE MATCHED BY ANY CHARACTER
SEQUENCE. ^SINCE THE ASTERISK LOGICALLY TERMINATES THE SPECIFICATION
OF A PARTICULAR COMPONENT, ANY ASTERISK WHICH IS FOLLOWED
IMMEDIATELY BY A PRINTING CHARACTER OTHER THAN A PUNCTUATION MARK IS
TREATED BY THE ^^DAFLAG \\ROUTINE AS THOUGH SEPARATED FROM THIS
FOLLOWING CHARACTER BY A PERIOD IF WITHIN A NAME FIELD, BY A COMMA
IF WITHIN A BRACKETED FIELD, OR BY A COLON IF WITHIN A SWITCH FIELD.
^THEREFORE, THE TEXT STRINGS ^^FASP*.F4[*,56] \\AND ^^FASP*F4[*56]
\\WOULD BOTH BE TREATED THE SAME BY THE ^^DAFLAG \\ROUTINE. ^THESE
TEXT STRINGS WOULD SPECIFY ALL FILES IN WHICH THE FIRST NAME BEGINS
WITH THE LETTERS ^^FASP, \\WHICH HAVE THE SECOND NAME ^F4 AND WHICH
BELONG TO ANY USER IDENTIFIED BY THE SECOND NUMBER 56. ^THIS
INTERPRETATION OF THE ASTERISK IS OF COURSE DEPENDENT UPON THE
EXISTENCE OF THE PROPER LOGIC WITHIN THE PROGRAM WHICH CALLS
^^DAFLAG \\AND IS IN NO WAY SUPPORTED BY THE ^^DAFLAG \\ROUTINE
ITSELF.
.SKIP 2
.TEST PAGE  8
.CENTER
^THE ^^DAFLAG A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DAFLAG \I\S
.SKIP
.NOFILL
      SUBROUTINE DAFLAG(KONECT,LOWSTR,MAXSTR,MAXBFR,IBUFFR,
     1    LOWBFR,MANY  ,KIND  ,INILTR,KNTLTR,MAXDSK,MAXNAM,
     2    MAXNUM,MAXFLG,KONTNT,MINPRT,MAXPRT)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION KNTLTR(MAXSTR),INILTR(MAXSTR),IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED ONLY FOR INPUT, AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KONECT#=#-1, \\SPACES AND TAB CHARACTERS MARK THE END OF THE
CURRENT COMPONENT OF THE CURRENT FIELD, BUT DO NOT INDICATE EITHER
THE END OF THE FIELD OR THE END OF THE FILE SPECIFICATION. ^SPACES
AND TAB CHARACTERS CAN APPEAR BEFORE AND AFTER ANY FIELD, BEFORE AND
AFTER COLONS IN THE DEVICE FIELD, BETWEEN THE COMPONENTS OF THE NAME
FIELD, BETWEEN THE COMPONENTS OF THE BRACKETED FIELD, AND FOLLOWING
THE INITIAL SLASH AND BEFORE AND AFTER THE SEPARATING COLONS IN THE
SWITCH FIELD. ^PERIODS ARE NOT NECESSARY BETWEEN COMPONENTS OF THE
NAME FIELD WHICH ARE SEPARATED BY SPACES AND/OR TAB CHARACTERS.
^COMMAS ARE NOT NECESSARY BETWEEN COMPONENTS OF THE BRACKETED FIELD
WHICH ARE SEPARATED BY SPACES AND/OR TAB CHARACTERS. ^THE FILE
SPECIFICATION WILL EXTEND THROUGH THE END OF THE BUFFER, OR UP TO
THE FOLLOWING AMPERSAND, EQUALS SIGN, SEMICOLON OR EXCLAMATION
POINT, OR UP TO THE FOLLOWING COMMA WHICH IS NOT IN A BRACKETED
FIELD. ^ALL OF THE SPECIAL CHARACTERS MENTIONED HERE INCLUDING THE
SPACE AND TAB CHARACTERS ARE OF COURSE TREATED NO DIFFERENTLY THAN
ANY OTHER CHARACTERS WHEN THESE APPEAR WITHIN A TEXT STRING
DELIMITED BY APOSTROPHES. ^IF ^^KONECT=-1, \\THEN THE TEXT STRINGS
.NOFILL
^^DSK : DAFLAG F4 [ 6007 56 ] / HEADER : 0 / DISPOSE
     \\AND
^^DSK:DAFLAG.F4[6007,56]/HEADER:0/DISPOSE
.FILL
\\ARE EQUIVALENT.
.INDENT -2
=#0, SPACES AND TAB CHARACTERS WHICH ARE NOT WITHIN EITHER BRACKETED
FIELDS OR SWITCH FIELDS MARK THE END OF THE FILE SPECIFICATION.
^SPACES AND TAB CHARACTERS CAN APPEAR BETWEEN THE COMPONENTS OF THE
BRACKETED FIELD, AND FOLLOWING THE INITIAL SLASH AND BEFORE AND
AFTER THE SEPARATING COLONS IN THE SWITCH FIELD. ^COMMAS ARE NOT
NECESSARY BETWEEN COMPONENTS OF THE BRACKETED FIELD WHICH ARE
SEPARATED BY SPACES AND/OR TAB CHARACTERS. ^THE FILE SPECIFICATION
WILL EXTEND THROUGH THE END OF THE BUFFER, OR UP TO THE FOLLOWING
AMPERSAND, EQUALS SIGN, SEMICOLON OR EXCLAMATION POINT, OR UP TO THE
FOLLOWING COMMA WHICH IS NOT IN A BRACKETED FIELD, OR UP THE THE
NEXT SPACE OR TAB CHARACTER WHICH IS WITHIN NEITHER A BRACKETED
FIELD NOR WITHIN A SWITCH FIELD. ^ALL OF THE SPECIAL CHARACTERS
MENTIONED HERE INCLUDING THE SPACE AND TAB CHARACTERS ARE OF COURSE
TREATED NO DIFFERENTLY THAN ANY OTHER CHARACTERS WHEN THESE APPEAR
WITHIN A TEXT STRING DELIMITED BY APOSTROPHES. ^IF ^^KONECT=0,
\\THEN THE TEXT STRINGS
.NOFILL
^^DSK:DAFLAG.F4[6007 56]/ HEADER : 0 / DISPOSE
     \\AND
^^DSK:DAFLAG.F4[6007,56]/HEADER:0/DISPOSE
.FILL
\\ARE EQUIVALENT.
.INDENT -2
=#1, SPACES AND TAB CHARACTERS WHICH ARE NOT WITHIN EITHER BRACKETED
FIELDS OR SWITCH FIELDS MARK THE END OF THE DEVICE OR NAME FIELD,
BUT DO NOT INDICATE THE END OF THE FILE SPECIFICATION. ^SPACES AND
TAB CHARACTERS CAN APPEAR BEFORE AND AFTER ANY FIELD, BETWEEN THE
COMPONENTS OF THE BRACKETED FIELD, AND FOLLOWING THE INITIAL SLASH
AND BEFORE AND AFTER THE SEPARATING COLONS IN THE SWITCH FIELD.
^COMMAS ARE NOT NECESSARY BETWEEN COMPONENTS OF THE BRACKETED FIELD
WHICH ARE SEPARATED BY SPACES AND/OR TAB CHARACTERS. ^THE FILE
SPECIFICATION WILL EXTEND THROUGH THE END OF THE BUFFER, OR UP TO
THE FOLLOWING AMPERSAND, EQUALS SIGN, SEMICOLON OR EXCLAMATION
POINT, OR UP TO THE FOLLOWING COMMA WHICH IS NOT IN A BRACKETED
FIELD. ^ALL OF THE SPECIAL CHARACTERS MENTIONED HERE INCLUDING THE
SPACE AND TAB CHARACTERS ARE OF COURSE TREATED NO DIFFERENTLY THAN
ANY OTHER CHARACTERS WHEN THESE APPEAR WITHIN A TEXT STRING
DELIMITED BY APOSTROPHES. ^IF ^^KONECT=1, \\THEN THE TEXT STRINGS
.NOFILL
^^DSK: DAFLAG.F4 [6007 56] / HEADER : 0 / DISPOSE
     \\AND
^^DSK:DAFLAG.F4[6007,56]/HEADER:0/DISPOSE
.FILL
\\ARE EQUIVALENT.
.SKIP
.INDENT -9
^^LOWSTR#=#\\SUBSCRIPT OF THE FIRST LOCATION WITHIN THE ^^INILTR
\\AND ^^KNTLTR \\ARRAYS WHICH CAN BE USED TO HOLD A DESCRIPTION OF
THE COMPONENTS OF THE FILE SPECIFICATION.
.SKIP
.INDENT -9
^^MAXSTR#=#\\SUBSCRIPT OF THE FINAL LOCATION WITHIN THE ^^INILTR
\\AND ^^KNTLTR \\ARRAYS WHICH CAN BE USED TO HOLD A DESCRIPTION OF
THE COMPONENTS OF THE FILE SPECIFICATION.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE FINAL (RIGHTMOST) LOCATION WITHIN THE
^^IBUFFR \\ARRAY WHICH CONTAINS A CHARACTER WHICH CAN BE PART OF THE
FILE SPECIFICATION.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED FOR BOTH INPUT TO, AND OUTPUT FROM
THIS ROUTINE.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IBUFFR#=#\\ARRAY CONTAINING IN LOCATIONS ^^IBUFFR(LOWBFR)
\\THROUGH ^^IBUFFR(MAXBFR) \\THE CHARACTERS READ BY THE CALLING
PROGRAM WITH A MULTIPLE OF AN ^A1 FORMAT AND WHICH CAN FORM THE FILE
SPECIFICATION. ^THE CONTENTS OF THE ^^IBUFFR \\ARRAY ARE RETURNED
UNCHANGED, WITH THE EXCEPTION THAT THE PORTION OF A TEXT STRING TO
THE RIGHT OF ADJACENT APOSTROPHES IN A TEXT STRING IN A SWITCH FIELD
IS MOVED 1 CHARACTER TO THE LEFT.
.SKIP
.INDENT -9
^^LOWBFR#=#\\SUBSCRIPT OF THE FIRST (LEFTMOST) LOCATION WITHIN THE
^^IBUFFR \\ARRAY WHICH CONTAINS A CHARACTER WHICH CAN BE PART OF THE
FILE SPECIFICATION. ^^LOWBFR \\IS RETURNED POINTING TO THE FIRST
CHARACTER WHICH SHOULD BE EVALUATED BY THE SUBSEQUENT CALL TO THIS
ROUTINE, OR ELSE IS RETURNED POINTING BEYOND THE END OF THE BUFFER
IF THE BUFFER IS EMPTY OR IF THE BUFFER CONTAINS MERELY A COMMENT
INDICATED BY A LEADING EXCLAMATION POINT OR BY A LEADING AMPERSAND.
.SKIP
.INDENT -9
^^MANY###=#\\SHOULD BE INPUT CONTAINING ZERO EACH TIME THIS ROUTINE
IS CALLED TO BEGIN PROCESSING OF A NEW LOGICAL SECTION OF TEXT, AS
FOR EXAMPLE WHEN BEGINNING PROCESSING OF A LINE OF TEXT NOT TIED TO
THE PREVIOUS LINE BY AN AMPERSAND AT THE END OF THE PREVIOUS LINE,
OR WHEN PROCESSING THE TEXT TO THE RIGHT OF A SEMICOLON OR TO THE
RIGHT OF AN EQUALS SIGN. ^THE INITIAL ZEROING OF THIS ARGUMENT MUST
BE DONE BY THE CALLING PROGRAM, BUT THEREAFTER THE VALUE RETURNED BY
THE PREVIOUS CALL TO THIS ROUTINE CAN USUALLY BE USED.
.INDENT -2
.LEFT MARGIN 9
.INDENT -2
=#RETURNED CONTAINING THE VALUE WHICH ^^MANY \\SHOULD HAVE WHEN THIS
ROUTINE OR ANY OTHER IN THE ^^FASP \\PACKAGE HAVING ^^MANY \\AS AN
ARGUMENT IS NEXT CALLED. ^THE RETURNED VALUE OF ^^MANY \\SHOULD NOT
BE CHANGED BY THE CALLING PROGRAM UNLESS THE INTERPRETATION OF THE
CONTENTS OF THE BUFFER IS BEING ABANDONED PREMATURELY, IN WHICH CASE
^^MANY \\SHOULD BE RESET TO HAVE A ZERO VALUE.
.INDENT -2
=#-1, RETURNED IF A MISSING ITEM IS TO BE INDICATED IF THE NEXT
ROUTINE ENCOUNTERS A LEADING COMMA OR FINDS THAT THE BUFFER CONTAINS
NOTHING OTHER THAN A POSSIBLE COMMENT INDICATED BY A LEADING
EXCLAMATION POINT. ^^MANY \\IS RETURNED CONTAINING -1 IF A COMMA
PRECEDES EITHER AN AMPERSAND OR A SWITCH FIELD.
.INDENT -2
=#0, RETURNED IF A MISSING ITEM IS TO BE INDICATED IF THE NEXT
ROUTINE ENCOUNTERS A LEADING COMMA, BUT A MISSING ITEM IS NOT
INDICATED IF THE BUFFER CONTAINS NOTHING OTHER THAN A POSSIBLE
COMMENT INDICATED BY A LEADING EXCLAMATION POINT. ^^MANY \I\S
\\RETURNED CONTAINING ZERO IF THE BUFFER IS FOUND TO BE EMPTY, OR IF
THE FIRST PRINTING CHARACTER AT OR TO RIGHT OF ^^IBUFFR(LOWBFR) \I\S
\\FOUND TO BE AN EXCLAMATION POINT, A SEMICOLON OR AN EQUALS SIGN.
^THESE ARE ALL CONDITIONS UNDER WHICH THE NEXT CALL TO THIS ROUTINE
WOULD EVALUATE THE START OF A NEW GROUP OF FILE SPECIFICATIONS.
^^MANY \\IS RETURNED UNCHANGED IF A SWITCH FIELD IS FOUND AT THE
START OF THE CONTENTS OF THE BUFFER.
.INDENT -2
=#1, RETURNED IF A MISSING ITEM IS NOT TO BE INDICATED IF THE NEXT
ROUTINE ENCOUNTERS A LEADING COMMA OR FINDS THAT THE BUFFER CONTAINS
NOTHING OTHER THAN A POSSIBLE COMMENT INDICATED BY A LEADING
EXCLAMATION POINT. ^^MANY \\IS RETURNED CONTAINING ONE IF A FILE
SPECIFICATION CONSISTING OF MORE THAN JUST A SWITCH FIELD IS FOUND,
OR IF A MISSING ITEM IS BEING INDICATED.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR OUTPUT. ^THEIR INPUT
VALUES ARE IGNORED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KIND###=#\\RETURNED DESCRIBING THE TYPE OF ITEM ENCOUNTERED.
.INDENT -2
=#1, NOTHING, EXCEPT POSSIBLY A COMMENT INDICATED BY A LEADING
EXCLAMATION POINT, WAS FOUND AT OR TO THE RIGHT OF ^^IBUFFR(LOWBFR).
LOWBFR \\IS RETURNED POINTING BEYOND THE END OF THE BUFFER.
.INDENT -2
=#2, THE FIRST PRINTING CHARACTER AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR) \\IS A SEMICOLON. ^^LOWBFR \\IS RETURNED POINTING
TO THE CHARACTER TO THE RIGHT OF THE SEMICOLON. ^IT IS SUGGESTED
THAT THE CALLING PROGRAM TREAT THIS AS AN INDICATION BY THE USER
THAT THE PRECEDING COMMAND HAS BEEN COMPLETED AND THAT A SUBSEQUENT
COMMAND WILL FOLLOW ON THE SAME LINE.
.INDENT -2
=#3, THE FIRST PRINTING CHARACTER AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR) \\IS AN EQUALS SIGN. ^^LOWBFR \\IS RETURNED
POINTING TO THE CHARACTER TO THE RIGHT OF THE EQUALS SIGN. ^ON THE
^^PDP-10 \\COMPUTER, AN EQUALS SIGN IS USED IN FILE TRANSFER
COMMANDS TO SEPARATE DESTINATION AND SOURCE FILE SPECIFICATIONS.
.INDENT -2
=#4, THE FIRST PRINTING CHARACTER AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR) \\IS AN AMPERSAND. ^THE CHARACTERS TO THE RIGHT OF
THE AMPERSAND ARE TAKEN TO BE A COMMENT. ^^LOWBFR \\IS RETURNED
POINTING BEYOND THE END OF THE BUFFER. ^IT IS SUGGESTED THAT THE
CALLING PROGRAM TREAT THIS AS A REQUEST BY THE USER THAT THE COMMAND
BE CONTINUED ON THE FOLLOWING LINE. ^THE EFFECT IS NOT QUITE THE
SAME AS IF THE USER HAD TYPED ALL OF THE FILE SPECIFICATIONS ON A
SINGLE LINE SINCE A FILE SPECIFICATION CANNOT BE SPLIT ACROSS A LINE
BOUNDARY.
.INDENT -2
=#5, A MISSING FILE SPECIFICATION WAS INDICATED BY AN EXTRA COMMA.
.INDENT -2
=#6, A PARTIAL FILE SPECIFICATION WAS FOUND WHICH WILL BE CONTINUED
BY THE SUBSEQUENT CALL TO THIS ROUTINE. ^A SINGLE CALL TO THIS
ROUTINE CAN ONLY RETURN THE DESCRIPTION OF A SINGLE SWITCH FIELD, OR
OF THE PORTION OF A FILE SPECIFICATION EXCLUSIVE OF A TRAILING
SWITCH FIELD IF ANY.
.SKIP
^FOR EXAMPLE, IF THE TEXT BUFFER CONTAINS:
.INDENT 5
^^NAME.EXT/FIRST:SECOND/THIRD:FOURTH
.BREAK
\\THEN THE FIRST CALL TO THIS ROUTINE WOULD RETURN THE DESCRIPTION
OF THE NAME FIELD ^^NAME.EXT \\AND WOULD RETURN ^^KIND=6, \\THE
SECOND CALL WOULD RETURN THE DESCRIPTION OF THE SWITCH FIELD
/^^FIRST:SECOND \\AND WOULD AGAIN RETURN ^^KIND=6, \\AND THE THIRD
CALL WOULD RETURN THE DESCRIPTION OF THE SWITCH FIELD
/^^THIRD:FOURTH \\AND WOULD FINALLY RETURN ^^KIND=7.
.INDENT -2
=#7, \\A FILE SPECIFICATION (POSSIBLY CONSISTING MERELY OF A SWITCH
FIELD) WAS FOUND. ^IF THE PREVIOUS CALL TO THIS ROUTINE RETURNED
^^KIND=6 \\INDICATING A PARTIAL SPECIFICATION, THEN THE INFORMATION
RETURNED BY THE CURRENT CALL TO THIS ROUTINE COMPLETES THE FILE
SPECIFICATION. ^IF THE ENTIRE FILE SPECIFICATION CONSISTED ONLY OF
SWITCH FIELDS, AND IF THESE SWITCH FIELDS WERE PRECEDED BY A COMMA
AND/OR ARE FOLLOWED BY A COMMA, THEN THE NEXT CALL TO THIS ROUTINE
WILL RETURN ^^KIND=5 \\INDICATING A MISSING ITEM UNLESS THE CALLING
PROGRAM FIRST SETS ^^MANY \\TO HAVE THE VALUE 1.
.INDENT -2
=#8, A FILE SPECIFICATION WAS FOUND, BUT THIS WAS FOLLOWED BY AN
UNEXPECTED CHARACTER POINTED TO BY THE RETURNED VALUE OF ^^LOWBFR.
F\\OR EXAMPLE, THE TEXT ^^DEVICE:NAME.EXTENSION: \\WOULD BE
EVALUATED AS THOUGH THE BUFFER TERMINATED PRIOR TO THE SECOND COLON,
AND ^^LOWBFR \\WOULD BE RETURNED POINTING TO THIS SECOND COLON. ^THE
TEXT ^^DEVICE:NAME.EXTENSION[6001,56][22,56] \\WOULD BE EVALUATED AS
THOUGH THE BUFFER TERMINATED PRIOR TO THE SECOND BRACKETED FIELD,
AND ^^LOWBFR \\WOULD BE RETURNED POINTING TO THE SECOND LEFT BRACKET.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^INILTR#=#\\ARRAY RETURNED CONTAINING THE SUBSCRIPTS WITHIN THE THE
^^IBUFFR \\ARRAY OF THE INITIAL CHARACTERS OF THE WORDS FORMING THE
FILE SPECIFICATION.
.SKIP
^LOCATIONS ^^INILTR(LOWSTR) \\THROUGH ^^INILTR(MAXDSK) \\ARE
RETURNED CONTAINING THE LOCATIONS IN THE BUFFER OF THE INITIAL
CHARACTERS OF THE DEVICE NAMES.
.SKIP
^LOCATIONS ^^INILTR(MAXDSK+1) \\THROUGH ^^INILTR(MAXNAM) \\ARE
RETURNED CONTAINING THE LOCATIONS IN THE BUFFER OF THE INITIAL
CHARACTERS OF THE WORDS IN THE NAME FIELD.
.SKIP
^LOCATIONS ^^INILTR(MAXNAM+1) \\THROUGH ^^INILTR(MAXNUM) \\ARE
RETURNED CONTAINING THE LOCATIONS IN THE BUFFER OF THE INITIAL
CHARACTERS OF THE WORDS IN THE BRACKETED FIELD.
.SKIP
^IF ^^MAXFLG \\IS RETURNED GREATER THAN OR EQUAL TO ^^LOWSTR, \\THEN
^^MAXDSK \\AND ^^MAXNAM \\AND ^^MAXNUM \\ARE ALL RETURNED SET TO
^^LOWSTR-1, KONTNT \\IS RETURNED SET TO ZERO, AND LOCATIONS
^^INILTR(LOWSTR) \\THROUGH ^^INILTR(MAXFLG) \\ARE RETURNED
CONTAINING THE LOCATIONS IN THE BUFFER OF THE INITIAL CHARACTERS OF
THE WORDS AND TEXT STRINGS APPEARING IN THE SWITCH FIELD. ^IF A TEXT
STRING APPEARS IN A SWITCH FIELD, THE LOCATION IN THE ^^IBUFFR
\\ARRAY INDICATED BY THE ^^INILTR \\ARRAY WILL CONTAIN AN APOSTROPHE.
.SKIP
^IF A SWITCH IS FOUND WHICH CAN TAKE A FILE SPECIFICATION AS ITS
ARGUMENT, AND IF AN ADDITIONAL SWITCH FIELD COMPONENT WAS FOUND TO
THE RIGHT OF THIS SWITCH NAME, THEN ^^LOWBFR \\SHOULD BE RESET TO
THE VALUE RETURNED FOR THIS NEXT COMPONENT IN THE ^^INILTR \\ARRAY
AND THIS ROUTINE SHOULD THEN BE CALLED AGAIN TO EVALUATE THE FILE
SPECIFICATION WHICH APPEARS AS AN ARGUMENT.
.SKIP
.INDENT -9
^^KNTLTR#=#\\ARRAY RETURNED CONTAINING THE NUMBERS OF CHARACTERS IN
EACH OF THE WORDS FOR WHICH THE FIRST CHARACTERS ARE IN THE BUFFER
LOCATIONS INDICATED BY THE VALUES IN THE ^^INILTR \\ARRAY. ^THE
SUBSCRIPTS OF THE ^^INILTR \\ARRAY AND ^^KNTLTR \\ARRAY LOCATIONS
DESCRIBING A PARTICULAR WORD ARE IDENTICAL. ^IF A LOCATION WITHIN
THE ^^KNTLTR \\ARRAY IS RETURNED SET TO ZERO, THEN THE CORRESPONDING
LOCATION WITHIN THE ^^INILTR \\ARRAY IS RETURNED UNDEFINED.
.SKIP
.INDENT -9
^^MAXDSK#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^INILTR \\AND
^^KNTLTR \\ARRAY LOCATIONS DESCRIBING THE RIGHTMOST COMPONENT OF THE
DEVICE FIELD OF THE FILE SPECIFICATION. ^IF A DEVICE FIELD IS NOT
FOUND, THEN ^^MAXDSK \\WILL BE RETURNED CONTAINING ^^LOWSTR-1.
.SKIP
.INDENT -9
MAXNAM#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^INILTR \\AND
^^KNTLTR \\ARRAY LOCATIONS DESCRIBING THE RIGHTMOST COMPONENT OF THE
NAME FIELD OF THE FILE SPECIFICATION. ^IF A NAME FIELD IS NOT FOUND,
THEN ^^MAXNAM \\WILL BE RETURNED EQUAL TO ^^MAXDSK.
.SKIP
.INDENT -9
MAXNUM#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^INILTR \\AND
^^KNTLTR \\ARRAY LOCATIONS DESCRIBING THE RIGHTMOST COMPONENT OF THE
BRACKETED FIELD OF THE FILE SPECIFICATION. ^IF A BRACKETED FIELD IS
NOT FOUND, THEN ^^MAXNUM \\WILL BE RETURNED EQUAL TO ^^MAXNAM.
.SKIP
.INDENT -9
MAXFLG#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^INILTR \\AND
^^KNTLTR \\ARRAY LOCATIONS DESCRIBING THE RIGHTMOST COMPONENT OF THE
SWITCH FIELD. ^IF A SWITCH FIELD IS NOT FOUND, THEN ^^MAXFLG \I\S
\\RETURNED EQUAL TO ^^LOWSTR-1.
.SKIP
.LEFT MARGIN 9
.INDENT -9
KONTNT#=#\\BIT CODED NUMBER RETURNED DESCRIBING THE LOCATION OF THE
BRACKETED FIELD RELATIVE TO THE DEVICE AND NAME FIELDS. ^THE RIGHT
BIT IS ONE IF AND ONLY IF A NAME FIELD IS FOUND. ^THE SECOND BIT
FROM THE RIGHT IS ONE IF AND ONLY IF A DEVICE FIELD IS FOUND. ^THE
FOURTH AND THIRD BITS FROM THE RIGHT ARE 00 IF NO BRACKETED FIELD IS
FOUND, 01 IF A BRACKETED FIELD APPEARS FIRST, 10 IF A BRACKETED
FIELD FOLLOWS A DEVICE FIELD, AND 11 IF A BRACKETED FIELD FOLLOWS A
NAME FIELD.
.SKIP
^THE FOLLOWING TABLE PRESENTS THE VALUES OF ^^KONTNT \\RETURNED FOR
ALL POSSIBLE COMBINATIONS OF DEVICE, NAME AND BRACKETED FIELDS. ^THE
MINUS SIGNS REPRESENT VALUES OF ^^KONTNT \\WHICH CANNOT BE RETURNED.
^THE VALUE ZERO INDICATES THAT NEITHER DEVICE, NOR NAME NOR
BRACKETED FIELDS WERE FOUND, BUT DOES NOT INDICATE IF A SWITCH FIELD
WAS FOUND.
.SKIP
.NOFILL
.TEST PAGE 10
DECIMAL BINARY          DECIMAL BINARY
      0    0  NOTHING         8 1000  ------
      1    1  ^^NAME            9 1001  ------
      2   10  DEVICE:        10 1010  DEVICE:[]
      3   11  DEVICE:NAME    11 1011  DEVICE:[]NAME
      4  100  []             12 1100  ------
      5  101  []NAME         13 1101  NAME[]
      6  110  []DEVICE:      14 1110  ------
      7  111  []DEVICE:NAME  15 1111  DEVICE:NAME[]
.FILL
.SKIP
16 \\IS ADDED TO ^^KONTNT \\IF AN AT SIGN (@) IS FOUND BEFORE OR
AFTER DEVICE, NAME OR BRACKETED FIELD. ^THE AT SIGN, LIKE THE
BRACKETS AND PERIOD, ARE TREATED NO DIFFERENTLY THAN ANY ALPHABETIC
CHARACTER WITHIN A SWITCH FIELD.
.SKIP
.INDENT -9
^^MINPRT#=#\\THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION WHICH
CONTAINS THE LEFTMOST PRINTING CHARACTER IN THE PORTION OF THE FILE
SPECIFICATION EVALUATED BY THE CURRENT CALL TO THIS ROUTINE IF
^^KIND \\IS RETURNED CONTAINING THE VALUE 6 OR GREATER. ^^MINPRT
\\AND ^^MAXPRT \\CAN BE USED AS THE LIMITS OF THE ^^IBUFFR \\ARRAY
SUBSCRIPTS IF THE TEXT EVALUATED BY THE CURRENT CALL TO THIS ROUTINE
MUST BE DISPLAYED TO THE USER. ^^MINPRT \\AND ^^MAXPRT \\ARE
RETURNED UNDEFINED IF ^^KIND \\IS RETURNED SET TO A VALUE LESS THAN 6.
.SKIP
.INDENT -9
^^MAXPRT#=#\\THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION WHICH
CONTAINS THE RIGHTMOST PRINTING CHARACTER OF THE PORTION OF THE FILE
SPECIFICATION EVALUATED BY THE CURRENT CALL TO THIS ROUTINE IF
^^KIND \\IS RETURNED CONTAINING THE VALUE 6 OR GREATER. ^^MAXPRT
\\CAN BE RETURNED SET TO LESS THAN THE RETURNED VALUE OF ^^LOWBFR
\\IF THE TEXT TO THE RIGHT OF THE FILE SPECIFICATION HAD TO BE
SEARCHED FOR A CONTINUATION OF THE FILE SPECIFICATION.
.SKIP 3
.TEST PAGE 15
.LEFT MARGIN 0
.FILL
.CENTER
^DEMONSTRATION ^PROGRAM TO ^INTERACTIVELY ^TEST ^^DAFLAG
.CENTER
------------- ------- -- ------------- ---- ------
.SKIP
T\\HE PROGRAM LISTED ON THE FOLLOWING PAGES ACCEPTS A LINE OF TEXT
FROM THE USER, THEN SUMMARIZES THE COMPONENTS OF THE FILE
SPECIFICATIONS LOCATED WITHIN THIS TEXT BY ^^DAFLAG. T\\HE ARGUMENT
NAMED ^^KONECT \\INITIALLY HAS THE VALUE ZERO, BUT THIS VALUE CAN BE
CHANGED TO -1, BACK TO 0 OR TO 1 IF A MINUS SIGN, A ZERO OR A PLUS
SIGN RESPECTIVELY IS IS FOUND AS THE FIRST CHARACTER OF A NEW LINE
TYPED BY THE USER. ^AFTER EACH CALL TO ^^DAFLAG, \\THE PROGRAM
REPORTS THE RETURNED VALUE OF THE ARGUMENT NAMED ^^KONTNT,
\\TOGETHER WITH A DESCRIPTION OF THE TYPE OF ITEM FOUND AS INDICATED
BY THE RETURNED VALUE OF THE ARGUMENT NAMED ^^KIND. T\\HIS IS
FOLLOWED BY A LISTING OF THE LENGTH OF AND THE CHARACTERS FORMING
EACH OF THE COMPONENTS OF EACH OF THE FIELDS OF THE FILE
SPECIFICATION.
.SKIP
^A SAMPLE DIALOG BETWEEN THE PROGRAM AND THE USER IS PRESENTED
FOLLOWING THE LISTING OF THE PROGRAM.
.SKIP
.TEST PAGE 10
.NOFILL
^^C     PROGRAM TO DEMONSTRATE DAFLAG ROUTINE
C
      DIMENSION KNTLTR(25),INILTR(25),IBUFFR(60)
      DATA ITTY,JTTY/5,5/
      DATA MINUS,IZERO,IPLUS,IONE,IGREAT/
     11H-,1H0,1H+,1H1,1H>/
      DATA LOWSTR,MAXSTR,MAXBFR/4,20,60/
      KONECT=0
      MANY=0
      WRITE(JTTY,1)
    1 FORMAT(1X,37HPROGRAM TO DEMONSTRATE DAFLAG ROUTINE/
     146H INDICATE KONECT BY -, 0 OR + AS 1ST CHARACTER/
     244H KONECT IS UNCHANGED IF -, 0 OR + IS NOT 1ST)
    2 WRITE(JTTY,3)
    3 FORMAT(1X,1H*,$)
      READ(ITTY,4)IBUFFR
    4 FORMAT(60A1)
      LOWBFR=1
C
C     OBTAIN VALUE OF KONECT FROM START OF TEXT
      I=-2
      IF(IBUFFR(1).EQ.MINUS)I=-1
      IF(IBUFFR(1).EQ.IZERO)I=0
      IF(IBUFFR(1).EQ.IPLUS)I=1
      IF(IBUFFR(1).EQ.IONE)I=1
      IF(I.EQ.-2)GO TO 5
      KONECT=I
      LOWBFR=2
C
C     LOCATE COMPONENTS OF FILE DESCRIPTION
    5 CALL DAFLAG(KONECT,LOWSTR,MAXSTR,MAXBFR,IBUFFR,
     1LOWBFR,MANY,KIND,INILTR,KNTLTR,MAXDSK,MAXNAM,
     2MAXNUM,MAXFLG,KONTNT,MINPRT,MAXPRT)
C
C     REPORT TYPE OF ITEM LOCATED
      IF(KIND.GE.6)WRITE(JTTY,6)
     1(IBUFFR(I),I=MINPRT,MAXPRT),IGREAT
    6 FORMAT(1X,1H<,100A1)
      IF(KIND.EQ.1)WRITE(JTTY,7)
    7 FORMAT(6H EMPTY)
      IF(KIND.EQ.2)WRITE(JTTY,8)
    8 FORMAT(10H SEMICOLON)
      IF(KIND.EQ.3)WRITE(JTTY,9)
    9 FORMAT(7H EQUALS)
      IF(KIND.EQ.4)WRITE(JTTY,10)
   10 FORMAT(10H AMPERSAND)
      IF(KIND.EQ.5)WRITE(JTTY,11)
   11 FORMAT(8H MISSING)
      IF(KIND.EQ.6)WRITE(JTTY,12)KONTNT
   12 FORMAT(8H PARTIAL,I4)
      IF(KIND.EQ.7)WRITE(JTTY,13)KONTNT
   13 FORMAT(9H TERMINAL,I3)
      IF(KIND.EQ.8)WRITE(JTTY,14)KONTNT
   14 FORMAT(8H ERROR  ,I4)
C
C     SUMMARIZE COMPONENTS OF FILE SPECIFICATION
      LIMIT=LOWSTR-1
      DO 20 IPART=1,4
      ISTART=LIMIT+1
      IF(IPART.EQ.1)LIMIT=MAXDSK
      IF(IPART.EQ.2)LIMIT=MAXNAM
      IF(IPART.EQ.3)LIMIT=MAXNUM
      IF(IPART.EQ.4)LIMIT=MAXFLG
   15 IF(ISTART.GT.LIMIT)GO TO 20
      J=INILTR(ISTART)
      K=KNTLTR(ISTART)
      K=J+K-1
      IF(K.LT.J)K=J
      IF(IPART.EQ.1)WRITE(JTTY,16)KNTLTR(ISTART),
     1(IBUFFR(I),I=J,K)
   16 FORMAT(9H   DEVICE,I3,1X,100A1)
      IF(IPART.EQ.2)WRITE(JTTY,17)KNTLTR(ISTART),
     1(IBUFFR(I),I=J,K)
   17 FORMAT(9H   NAME  ,I3,1X,100A1)
      IF(IPART.EQ.3)WRITE(JTTY,18)KNTLTR(ISTART),
     1(IBUFFR(I),I=J,K)
   18 FORMAT(9H   BRCKTD,I3,1X,100A1)
      IF(IPART.EQ.4)WRITE(JTTY,19)KNTLTR(ISTART),
     1(IBUFFR(I),I=J,K)
   19 FORMAT(9H   SWITCH,I3,1X,100A1)
      ISTART=ISTART+1
      GO TO 15
   20 CONTINUE
      IF(KIND.EQ.1)GO TO 2
      IF(KIND.EQ.4)GO TO 2
      GO TO 5
      END
.SKIP 3
.TEST PAGE 6
T\\YPICAL ^DIALOG ^BETWEEN ^^DAFLAG D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
.TEST PAGE   3
^^PROGRAM TO DEMONSTRATE DAFLAG ROUTINE
INDICATE KONECT BY -, 0 OR + AS 1ST CHARACTER
KONECT IS UNCHANGED IF -, 0 OR + IS NOT 1ST
.TEST PAGE   5
*/ONE:TWO [THREE,FOUR,FIVE]SIX:SEVEN.EIGHT.NINE/'TEN':'ZERO'
</ONE:TWO>
PARTIAL   0
  SWITCH  3 ONE
  SWITCH  3 TWO
.TEST PAGE   9
<[THREE,FOUR,FIVE]SIX:SEVEN.EIGHT.NINE>
PARTIAL   7
  DEVICE  3 SIX
  NAME    5 SEVEN
  NAME    5 EIGHT
  NAME    4 NINE
  BRCKTD  5 THREE
  BRCKTD  4 FOUR
  BRCKTD  4 FIVE
.TEST PAGE   5
</'TEN':'ZERO>
TERMINAL  0
  SWITCH  4 'TEN
  SWITCH  5 'ZERO
EMPTY
.TEST PAGE   5
*-/ ONE : TWO [ THREE FOUR , FIVE ] SIX : SEVEN EIGHT . NINE
</ ONE : TWO>
PARTIAL   0
  SWITCH  3 ONE
  SWITCH  3 TWO
.TEST PAGE  10
<[ THREE FOUR , FIVE ] SIX : SEVEN EIGHT . NINE>
TERMINAL  7
  DEVICE  3 SIX
  NAME    5 SEVEN
  NAME    5 EIGHT
  NAME    4 NINE
  BRCKTD  5 THREE
  BRCKTD  4 FOUR
  BRCKTD  4 FIVE
EMPTY
.TEST PAGE   5
*0/ ONE : TWO [ THREE FOUR , FIVE ] SIX : SEVEN EIGHT . NINE
</ ONE : TWO>
PARTIAL   0
  SWITCH  3 ONE
  SWITCH  3 TWO
.TEST PAGE   5
<[ THREE FOUR , FIVE ]>
TERMINAL  4
  BRCKTD  5 THREE
  BRCKTD  4 FOUR
  BRCKTD  4 FIVE
.TEST PAGE   3
<SIX>
TERMINAL  1
  NAME    3 SIX
.TEST PAGE   3
<:>
TERMINAL  2
  DEVICE  0
.TEST PAGE   3
<SEVEN>
TERMINAL  1
  NAME    5 SEVEN
.TEST PAGE   3
<EIGHT>
TERMINAL  1
  NAME    5 EIGHT
.TEST PAGE   4
<.>
TERMINAL  1
  NAME    0
  NAME    0
.TEST PAGE   4
<NINE>
TERMINAL  1
  NAME    4 NINE
EMPTY
.TEST PAGE   5
*+/ ONE : TWO [ THREE FOUR , FIVE ] SIX : SEVEN EIGHT . NINE
</ ONE : TWO>
PARTIAL   0
  SWITCH  3 ONE
  SWITCH  3 TWO
.TEST PAGE   6
<[ THREE FOUR , FIVE ] SIX>
ERROR     5
  NAME    3 SIX
  BRCKTD  5 THREE
  BRCKTD  4 FOUR
  BRCKTD  4 FIVE
.TEST PAGE   4
<: SEVEN>
ERROR     3
  DEVICE  0 :
  NAME    5 SEVEN
.TEST PAGE   3
<EIGHT>
ERROR     1
  NAME    5 EIGHT
.TEST PAGE   4
<.>
ERROR     1
  NAME    0 .
  NAME    0
.TEST PAGE   4
<NINE>
TERMINAL  1
  NAME    4 NINE
EMPTY
.TEST PAGE   2
*,'ONE'TWO'THREE',=,FOUR,;@FIVE,SIX@_&SPECIAL CHARACTERS
MISSING
.TEST PAGE   3
<'ONE>
PARTIAL   0
  SWITCH  4 'ONE
.TEST PAGE   3
<TWO>
PARTIAL   1
  NAME    3 TWO
.TEST PAGE   6
<'THREE>
TERMINAL  0
  SWITCH  6 'THREE
MISSING
EQUALS
MISSING
.TEST PAGE   5
<FOUR>
TERMINAL  1
  NAME    4 FOUR
MISSING
SEMICOLON
.TEST PAGE   3
<@FIVE>
TERMINAL 17
  NAME    4 FIVE
.TEST PAGE   4
<SIX@>
TERMINAL 17
  NAME    3 SIX
AMPERSAND
.TEST PAGE   5
*,SEVEN,_&NO MISSING ITEM AT START OF THIS LINE
<SEVEN>
TERMINAL  1
  NAME    5 SEVEN
AMPERSAND
.TEST PAGE   2
*,EIGHT!COMMAS IN BOTH LINES INDICATE SINGLE MISSING ITEM
MISSING
.TEST PAGE   4
<EIGHT>
TERMINAL  1
  NAME    5 EIGHT
EMPTY
.TEST PAGE   2
*!DEMONSTRATE POSSIBLE VALUES OF KONTNT IN RANGE 1 THRU 15
EMPTY
.TEST PAGE   4
*A,B:,C:D,[E],[F]G,[H]I:,[J]K:L,M:[N],O:[P]Q,R[S],T:U[V]
<A>
TERMINAL  1
  NAME    1 A
.TEST PAGE   3
<B:>
TERMINAL  2
  DEVICE  1 B
.TEST PAGE   4
<C:D>
TERMINAL  3
  DEVICE  1 C
  NAME    1 D
.TEST PAGE   3
<[E]>
TERMINAL  4
  BRCKTD  1 E
.TEST PAGE   4
<[F]G>
TERMINAL  5
  NAME    1 G
  BRCKTD  1 F
.TEST PAGE   4
<[H]I:>
TERMINAL  6
  DEVICE  1 I
  BRCKTD  1 H
.TEST PAGE   5
<[J]K:L>
TERMINAL  7
  DEVICE  1 K
  NAME    1 L
  BRCKTD  1 J
.TEST PAGE   4
<M:[N]>
TERMINAL 10
  DEVICE  1 M
  BRCKTD  1 N
.TEST PAGE   5
<O:[P]Q>
TERMINAL 11
  DEVICE  1 O
  NAME    1 Q
  BRCKTD  1 P
.TEST PAGE   4
<R[S]>
TERMINAL 13
  NAME    1 R
  BRCKTD  1 S
.TEST PAGE   6
<T:U[V]>
TERMINAL 15
  DEVICE  1 T
  NAME    1 U
  BRCKTD  1 V
EMPTY
.TEST PAGE   2
*!DEMONSTRATE EMPTY STATEMENTS AND  MISSING COMPONENTS
EMPTY
.TEST PAGE   2
*;:ONE::TWO:.THREE..FOUR.[,FIVE,,SIX,]/:SEVEN::EIGHT:;
SEMICOLON
.TEST PAGE  16
<:ONE::TWO:.THREE..FOUR.[,FIVE,,SIX,]>
PARTIAL  15
  DEVICE  0 :
  DEVICE  3 ONE
  DEVICE  0 :
  DEVICE  3 TWO
  NAME    0 .
  NAME    5 THREE
  NAME    0 .
  NAME    4 FOUR
  NAME    0 [
  BRCKTD  0 ,
  BRCKTD  4 FIVE
  BRCKTD  0 ,
  BRCKTD  3 SIX
  BRCKTD  0 ]
.TEST PAGE   9
</:SEVEN::EIGHT:>
TERMINAL  0
  SWITCH  0 :
  SWITCH  5 SEVEN
  SWITCH  0 :
  SWITCH  5 EIGHT
  SWITCH  0 ;
SEMICOLON
EMPTY
.TEST PAGE   2
*!DEMONSTRATE ASTERISKS IN ALL BUT DEVICE FIELD
EMPTY
.TEST PAGE   6
*DSK:ONE*[THREE*]/FIVE*/'SEVEN'*
<DSK:ONE*[THREE*]>
PARTIAL  15
  DEVICE  3 DSK
  NAME    4 ONE*
  BRCKTD  6 THREE*
.TEST PAGE   3
</FIVE*>
PARTIAL   0
  SWITCH  5 FIVE*
.TEST PAGE   3
</'SEVEN>
PARTIAL   0
  SWITCH  6 'SEVEN
.TEST PAGE   4
<*>
TERMINAL  1
  NAME    1 *
EMPTY
.TEST PAGE   8
*DSK:*TWO[*FOUR]/*SIX/*'EIGHT'
<DSK:*TWO[*FOUR]>
PARTIAL  15
  DEVICE  3 DSK
  NAME    1 *
  NAME    3 TWO
  BRCKTD  1 *
  BRCKTD  4 FOUR
.TEST PAGE   4
</*SIX>
PARTIAL   0
  SWITCH  1 *
  SWITCH  3 SIX
.TEST PAGE   5
</*'EIGHT>
TERMINAL  0
  SWITCH  1 *
  SWITCH  6 'EIGHT
EMPTY
.TEST PAGE   8
*DSK:**[**]/** !**:** WOULD BE TAKEN AS *.* FOLLOWED BY :*.*
<DSK:**[**]>
PARTIAL  15
  DEVICE  3 DSK
  NAME    1 *
  NAME    1 *
  BRCKTD  1 *
  BRCKTD  1 *
.TEST PAGE   5
</**>
TERMINAL  0
  SWITCH  1 *
  SWITCH  1 *
EMPTY
.SKIP 2
.TEST PAGE 5
.LEFT MARGIN 0
.FILL
.CENTER
T\\YPICAL BUT ^MACHINE ^DEPENDENT ^WRAPPER FOR THE ^^DAFLAG R\\OUTINE
.CENTER
------- --- ------- --------- ------- --- --- ------ -------
.SKIP
^^DAFLAG \\LOCATES THE COMPONENTS OF A SINGLE FILE SPECIFICATION,
BUT DOES NOT PACK THE CHARACTERS WHICH FORM THESE COMPONENTS INTO
THE SINGLE OR DOUBLE PRECISION COMPUTER LOCATIONS WHICH CAN BE USED
AS ARGUMENTS IN THE SYSTEM SUBROUTINE CALLS OR ^^FORTRAN OPEN
\\STATEMENTS WHICH ARE NECESSARY TO PREPARE FOR READING OR WRITING
OF THE DESIRED FILE. ^LISTED ON THE FOLLOWING PAGES IS A WRAPPER FOR
THE ^^DAFLAG \\ROUTINE WHICH PACKS THE COMPONENTS OF A FILE
SPECIFICATION INTO THE FORM REQUIRED FOR ^^DEC\\SYSTEM-10 ^^FORTRAN
OPEN \\STATEMENTS. ^THE WRAPPER ROUTINE, NAMED ^^GETFIL, \\SUPPORTS
A MULTIPLE FILE SPECIFICATION OF THE FORM
.SKIP
.INDENT 5
^^LIST OF OUTPUT FILES=LIST OF INPUT FILES
.BREAK
\O\R
.BREAK
.INDENT 5
LIST OF INPUT FILES
.SKIP
\\AND SO MUST SCAN THE COMMAND FROM LEFT TO RIGHT UNTIL ONE MORE
THAN THE NUMBER OF FILES WHICH CAN APPEAR IN THE LIST OF OUTPUT
FILES HAS BEEN FOUND. ^IF THE USER DESIRES TO INPUT SEVERAL LINES,
ALL BUT THE LAST LINE CAN BE TERMINATED BY AN AMPERSAND, OR, IF THE
COMMAND CONSISTS OF A LIST OF FILE SPECIFICATIONS, ALL BUT THE LAST
LINE CAN BE TERMINATED BY A RIGHTMOST COMMA. ^ALTHOUGH ^^GETFIL
\\INITIALLY INTERACTS WITH THE USER, THE USER CAN AT ANY POINT
SPECIFY THAT THE REMAINDER OF THE COMMAND IS TO BE READ FROM A FILE
BY GIVING ITS NAME ALONG WITH AN AT (@) SIGN. ^IF THE COMMAND IS
BEING READ FROM A FILE, THEN THE CONTINUATION INDICATIONS ARE NOT
NECESSARY SINCE THE ENTIRE COMMAND FILE WILL BE READ UNTIL THE END
OF FILE IS ENCOUNTERED.
.SKIP
^SWITCHES CAN APPEAR EITHER BEFORE OR AFTER THE FILE SPECIFICATIONS
WITH WHICH THEY ARE ASSOCIATED. ^THE INTERPRETATION OF SWITCHES IS
LEFT TO THE CALLING PROGRAM. ^SWITCHES ARE REPORTED INDIVIDUALLY
WHEN THEY ARE FOUND, SINCE MANY SWITCHES APPEARING ON MORE THAN JUST
A SINGLE COMMAND LINE COULD PRECEDE THE FILE SPECIFICATION TO WHICH
THE SWITCHES APPLY. ^THE FILE SPECIFICATION ASSOCIATED WITH THE
SWITCH IS IDENTIFIED ONLY BY ITS SERIAL POSITION IN THE ARRAYS IN
WHICH THE FILE SPECIFICATION WILL BE REPORTED BY A SUBSEQUENT CALL
OF THIS ROUTINE, BOTH SINCE THE FILE SPECIFICATION MIGHT NOT YET
HAVE BEEN READ, AND BECAUSE IT IS NOT IMMEDIATELY KNOWN WHETHER A
LEADING FILE SPECIFICATION APPEARS TO THE LEFT OF AN EQUAL SIGN OR
IF NO EQUAL SIGN AT ALL IS PRESENT.
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^GETFIL \I\S
.SKIP
.NOFILL
.TEST PAGE 4
      SUBROUTINE GETFIL(MAXFIL,  ITTY,  JTTY,KMDNUM,KMDDVC,
     1    KMDNAM,KMDEXT,MAXSTR,MAXBFR,  KIND,NEWNUL,NEWDSK,
     2    NEWNAM,NEWPTH,LCNRIT,IBUFFR,MAXFLG,INILTR,KNTLTR,
     3    LCNOWN)
.SKIP
.FILL
\\WITH THE ASSOCIATED ^^DIMENSION \\AND ^^DOUBLE PRECISION
\\STATEMENTS
.NOFILL
.SKIP
      ^^DIMENSION NEWNUL(MAXFIL),NEWDSK(MAXFIL),
     1IBUFFR(MAXBFR),INILTR(MAXSTR),KNTLTR(MAXSTR)
      DOUBLE PRECISION KMDNAM,NEWNAM(MAXFIL),
     1NEWPTH(3,MAXFIL)
.FILL
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED ONLY FOR INPUT AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^MAXFIL#=#1 \\MORE THAN THE NUMBER OF FILES WHICH CAN APPEAR TO THE
LEFT OF THE EQUAL SIGN. ^THE SINGLE PRECISION ARRAYS ^^NEWNUL \\AND
^^NEWDSK, \\AND THE DOUBLE PRECISION ARRAY ^^NEWNAM \\MUST BE
DIMENSIONED TO AT LEAST THE VALUE OF ^^MAXFIL. T\\HE DOUBLE
PRECISION AND DOUBLY DIMENSIONED ARRAY ^^NEWPTH \\MUST HAVE 3 AS ITS
FIRST DIMENSION AND ^^MAXFIL \\AS ITS SECOND DIMENSION. ^SWITCHES
ARE ALWAYS RETURNED INDIVIDUALLY BY SEPARATE CALLS TO THIS ROUTINE
PRIOR TO THE CALL OR CALLS TO THIS ROUTINE WHICH RETURN A
DESCRIPTION OF THE FILE SPECIFICATIONS WITH WHICH THESE SWITCHES ARE
ASSOCIATED. ^ALL SWITCHES LEFT OF THE EQUAL SIGN AND THE SWITCHES
ASSOCIATED WITH THE FIRST FILE SPECIFICATION RIGHT OF THE EQUAL SIGN
WILL HAVE BEEN RETURNED TO THE CALLING PROGRAM BEFORE ANY FILE
SPECIFICATIONS ARE RETURNED. ^THE FIRST CALL TO THIS ROUTINE WHICH
RETURNS FILE SPECIFICATIONS CAN RETURN UP TO ^^MAXFIL \\FILE
SPECIFICATIONS, OF WHICH ONLY THE FILE SPECIFICATION WHICH IS
RETURNED IN THE LOCATION IN EACH ARRAY HAVING THE VALUE OF ^^LCNRIT
\\AS ITS SUBSCRIPT IS TO THE RIGHT OF THE EQUAL SIGN. ^THE
SUBSEQUENT CALLS TO THIS ROUTINE WILL RETURN EITHER A SINGLE SWITCH
SPECIFICATION OR A SINGLE FILE SPECIFICATION. ^AN EQUAL SIGN FOUND
AFTER AN EQUAL SIGN HAS ALREADY BEEN FOUND OR AFTER MORE THAN
^^MAXFIL \\FILE SPECIFICATIONS HAVE BEEN FOUND IS TAKEN TO BE
EQUIVALENT TO A COMMA.
.SKIP
.INDENT -9
^^ITTY###=#\\NUMBER OF THE UNIT FROM WHICH COMMANDS ARE INITIALLY TO
BE READ.
.SKIP
.INDENT -9
^^JTTY###=#\\NUMBER OF THE UNIT TO WHICH ERROR MESSAGES AND PROMPTS
FOR MORE USER INPUT ARE TO BE WRITTEN.
.SKIP
.INDENT -9
^^KMDNUM#=#\\NUMBER OF THE UNIT FROM WHICH THE COMMAND FILE
INDICATED BY AN AT (@) SIGN APPEARING WITH A FILE SPECIFICATION IS
TO BE READ.
.SKIP
.INDENT -9
^^KMDDVC#=#\\NAME IN 5^H FORM OF THE DEVICE FROM WHICH THE COMMAND
FILE IS TO BE READ IF THE USER FAILS TO SUPPLY A DEVICE NAME
FOLLOWED BY A COLON.
.SKIP
.INDENT -9
^^KMDNAM#=#\\NAME IN 6^H FORM WHICH IS TO BE USED AS THE FIRST
COMPONENT OF THE NAME OF THE COMMAND FILE IF NONE IS SUPPLIED BY THE
USER. ^ON THE ^^PDP10, KMDNAM \\MUST BE A DOUBLE PRECISION VARIABLE
IF THE NAME OF THIS VARIABLE APPEARS IN THE ARGUMENT LIST.
.SKIP
.INDENT -9
^^KMDEXT#=#\\NAME IN 3^H FORM WHICH IS TO BE USED AS THE SECOND
COMPONENT (THE FILE NAME EXTENSION) OF THE NAME OF THE COMMAND FILE
IF NONE IS SUPPLIED BY THE USER. ^IF THE COMMAND FILE NAME IS NOT TO
HAVE SUCH A SECOND COMPONENT, THEN THE USER MUST TYPE A PERIOD
FOLLOWING THE FIRST COMPONENT OF THE NAME.
.SKIP
.INDENT -9
^^MAXSTR#=#\\DIMENSION OF THE ^^INILTR \\AND ^^KNTLTR \\ARRAYS IN
WHICH THE DESCRIPTIONS OF THE COMPONENTS OF THE SWITCHES ARE
RETURNED AND WHICH ARE USED INTERNALLY WITHIN THIS ROUTINE FOR THE
STORAGE OF THE DESCRIPTIONS OF THE COMPONENTS OF EACH FILE
SPECIFICATION. ^^MAXSTR \\SHOULD HAVE A VALUE OF AT LEAST 6 WHICH
WOULD BE SUFFICIENT TO ALLOW EITHER A 6 COMPONENT SWITCH OR ELSE THE
COMBINATION OF A 1 PART DEVICE NAME, A 2 PART FILE NAME, AND A 3
PART PATH (DIRECTORY) DESCRIPTION.
.SKIP
.INDENT -9
^^MAXBFR#=#\\DIMENSION OF THE ^^IBUFFR \\ARRAY INTO WHICH EACH LINE
OF THE COMMANDS TYPED BY THE USER OR READ FROM THE COMMAND FILE ARE
STORED IN A MULTIPLE OF AN ^A1 FORMAT. ^^MAXBFR \\IS THE MAXIMUM
NUMBER OF CHARACTERS WHICH CAN APPEAR IN A SINGLE COMMAND LINE.
^^MAXBFR \\MUST NOT EXCEED 132.
.LEFT MARGIN 0
.SKIP
^THE FOLLOWING ARGUMENT MUST BE ZEROED BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS FIRST CALLED, BUT THEN THE VALUE RETURNED BY THIS
ROUTINE SHOULD BE SENT TO THE FOLLOWING CALL OF THIS ROUTINE
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KIND###=#\\SHOULD BE SET TO ZERO BEFORE THIS ROUTINE IS FIRST
CALLED, OR WHENEVER THE INTERPRETATION OF THE PREVIOUS SET OF
COMMANDS IS TO BE ABANDONED. ^^KIND \\IS RETURNED DESCRIBING THE
REASON WHY CONTROL HAS BEEN TRANSFERRED BACK TO THE CALLING PROGRAM,
AND SHOULD NOT BE CHANGED BY THE CALLING PROGRAM IF THIS ROUTINE IS
TO BE CALLED AGAIN TO CONTINUE THE INTERPRETATION OF THE SAME
SEQUENCE OF COMMANDS.
.INDENT -2
=#1, RETURNED IF NO MORE FILE SPECIFICATIONS REMAIN TO BE EVALUATED.
^THE DESCRIPTION OF THE LAST OF THE PREVIOUS SET OF FILE
SPECIFICATIONS WAS RETURNED TO THE CALLING PROGRAM BY THE PREVIOUS
CALL TO THIS ROUTINE AND THAT FILE SPECIFICATION WAS NOT FOLLOWED BY
EITHER AN AMPERSAND OR A SEMICOLON.
.INDENT -2
=#2, RETURNED IF A SEMICOLON WAS FOUND. ^IF THIS ROUTINE IS CALLED
AGAIN WITHOUT ^^KIND \\HAVING FIRST BEEN ZEROED, THEN THE EVALUATION
OF A NEW SET OF FILE SPECIFICATIONS WILL BE BEGUN IN THE TEXT
APPEARING TO THE RIGHT OF THE SEMICOLON. ^THE APPEARANCE OF A
SEMICOLON WHEN THE FILE SPECIFICATION IS KNOWN BY THIS ROUTINE TO BE
INCOMPLETE WILL NOT BE REPORTED TO THE CALLING PROGRAM SINCE THE
TEXT TO THE RIGHT OF THE SEMICOLON IS TREATED AS IF IT CONTINUED THE
FILE SPECIFICATIONS ON A SUBSEQUENT INPUT LINE. ^FOR EXAMPLE, THE
FILE SPECIFICATIONS
.TEST PAGE 6
.INDENT 5
^^A=B,;C
.BREAK
\\AND
.INDENT 5
^A=^B,
.INDENT 5
^C
.BREAK
ARE BOTH EQUIVALENT TO
.INDENT 5
^^A=B,C
.INDENT -2
=#3, \\RETURNED IF THIS ROUTINE IS CURRENTLY REPORTING ALL OF THE
FILE SPECIFICATIONS APPEARING TO THE LEFT OF THE EQUAL SIGN TOGETHER
WITH THE FIRST FILE SPECIFICATION TO THE RIGHT OF THE EQUAL SIGN, OR
IF THIS ROUTINE IS CURRENTLY REPORTING THE FIRST FILE SPECIFICATION
IN A SERIES OF FILE SPECIFICATIONS WHICH DOES NOT INCLUDE AN EQUAL
SIGN.
.INDENT -2
=#4, RETURNED IF THIS ROUTINE IS CURRENTLY REPORTING THE SECOND OR A
SUBSEQUENT FILE SPECIFICATION TO THE RIGHT OF THE EQUAL SIGN, OR IF
THIS ROUTINE IS CURRENTLY REPORTING THE SECOND OR A SUBSEQUENT FILE
SPECIFICATION IN A SERIES OF FILE SPECIFICATIONS WHICH DOES NOT
INCLUDE AN EQUAL SIGN.
.INDENT -2
=#5, RETURNED IF THIS ROUTINE IS CURRENTLY RETURNING THE DESCRIPTION
OF A SWITCH IN THE ^^INILTR \\AND ^^KNTLTR \\ARRAY LOCATIONS HAVING
THE SUBSCRIPTS 1 THROUGH THE RETURNED VALUE OF ^^MAXFLG. LCNOWN \I\S
\\RETURNED CONTAINING THE VALUE OF THE SUBSCRIPT OF THE LOCATIONS IN
THE ^^NEWNUL, NEWDSK, NEWNAM \\AND ^^NEWPTH \\ARRAYS WHICH WILL
DESCRIBE THE FILE SPECIFICATION WHEN ^^KIND \\IS NEXT RETURNED SET
TO EITHER 3 OR 4.
.LEFT MARGIN 0
.SKIP
^THE FOLLOWING ARGUMENTS ARE USED BOTH FOR RETURNING INFORMATION TO
THE CALLING PROGRAM AND FOR TRANSFERRING INFORMATION FROM THE
CURRENT CALL OF THIS ROUTINE TO THE SUBSEQUENT CALL OF THIS ROUTINE.
^THE VALUES OF THESE ARGUMENTS RETURNED BY THE CURRENT CALL OF THIS
ROUTINE SHOULD BE SENT TO THE FOLLOWING CALL OF THIS ROUTINE
UNCHANGED. ^THE ORIGINAL CONTENTS OF THESE ARGUMENTS ARE IGNORED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^NEWNUL#=#\I\F KIND \\IS RETURNED SET TO EITHER 3 OR 4, THEN THE
LOCATIONS IN THE ^^NEWNUL \\ARRAY HAVING THE SUBSCRIPTS 1 THROUGH
THE RETURNED VALUE OF ^^LCNRIT \\ARE RETURNED DESCRIBING WHETHER A
FILE SPECIFICATION WAS FOUND, AND IF SO, WHETHER THE FILE NAME
CONSISTED OF 1 OR 2 COMPONENTS.
.INDENT -2
=#0, AN EXTRA COMMA INDICATED THAT NO FILE WAS BEING SPECIFIED. ^THE
LOCATIONS IN THE ^^NEWDSK, NEWNAM \\AND ^^NEWPTH \\ARRAYS HAVING THE
SAME SUBSCRIPTS AS THE LOCATION IN THE ^^NEWNUL \\ARRAY CONTAINING
THE ZERO ARE RETURNED UNDEFINED.
.INDENT -2
=#1, EITHER A DEVICE NAME OR A PATH (A DIRECTORY) WAS SPECIFIED, BUT
A FILE NAME WAS NOT SPECIFIED. ^THE UNSPECIFIED ITEMS ARE RETURNED
SET EITHER TO ZEROES OR TO SPACES AS IS APPROPRIATE.
.INDENT -2
=#2, A FILE NAME WAS SPECIFIED, BUT THIS DID NOT INCLUDE EITHER A
PERIOD OR A SECOND COMPONENT. ^A NULL SECOND COMPONENT CONSISTING OF
3 SPACES IS BEING RETURNED FOLLOWING A PERIOD IN THE ^^NEWNAM
\\ARRAY. ^THE CALLING PROGRAM CAN SUPPLY A DEFAULT SECOND COMPONENT
IF SUCH IS APPROPRIATE.
.INDENT -2
=#3, A FILE NAME WAS SPECIFIED WHICH INCLUDED A PERIOD. ^A SECOND
COMPONENT CONSISTING OF 3 SPACES IS BEING RETURNED IF NO SECOND
COMPONENT WAS SPECIFIED.
.INDENT -2
=#4, A FILE NAME WAS SPECIFIED WHICH INCLUDED A PERIOD AND A SECOND
COMPONENT, BUT NO FIRST COMPONENT WAS INCLUDED. ^A NULL FIRST
COMPONENT CONSISTING OF 6 SPACES IS BEING RETURNED PRECEDING A
PERIOD IN THE ^^NEWNAM \\ARRAY. ^IT IS EXPECTED THAT THE CALLING
PROGRAM WILL SUPPLY A DEFAULT FIRST COMPONENT.
.SKIP
.INDENT -9
^^NEWDSK#=#\I\F KIND \\IS RETURNED SET TO EITHER 3 OR 4, THEN THE
LOCATIONS IN THE ^^NEWDSK \\ARRAY HAVING THE SUBSCRIPTS 1 THROUGH
THE RETURNED VALUE OF ^^LCNRIT \\ARE RETURNED CONTAINING IN 5^H FORM
THE DEVICE NAMES ASSOCIATED WITH EACH OF THE FILE SPECIFICATIONS.
^IF NO DEVICE NAMES ARE SPECIFIED IN THE FILE SPECIFICATIONS TO THE
LEFT OF THE EQUAL SIGN, THEN THE LOCATIONS CORRESPONDING TO THESE
FILE SPECIFICATIONS IN THE ^^NEWDSK \\ARRAY WILL CONTAIN SPACES. ^IF
NO DEVICE NAMES ARE SPECIFIED IN THE FILE SPECIFICATIONS TO THE
RIGHT OF THE EQUAL SIGN, THEN THESE LOCATIONS EITHER CONTAIN THE
PREVIOUSLY SPECIFIED DEVICE NAME IF ANY HAS BEEN SPECIFIED TO THE
RIGHT OF THE EQUAL SIGN, OR ELSE CONTAIN SPACES IF NO DEVICES NAME
HAS YET BEEN SPECIFIED TO THE RIGHT OF THE EQUAL SIGN.
.SKIP
.INDENT -9
^^NEWNAM#=#\I\F KIND \\IS RETURNED SET TO EITHER 3 OR 4, THEN THE
LOCATIONS IN THE ^^NEWNAM \\DOUBLE PRECISION ARRAY HAVING THE
SUBSCRIPTS 1 THROUGH THE RETURNED VALUE OF ^^LCNRIT \\ARE RETURNED
CONTAINING BOTH COMPONENTS OF THE FILE NAME (THE 6 CHARACTER FILE
NAME AND ITS 3 CHARACTER EXTENSION) IN AN ^A10 FORM (FORMAT
1^^A6,1H.,1A3).
.SKIP
.INDENT -9
NEWPTH#=#\I\F KIND \\IS RETURNED SET TO EITHER 3 OR 4, THEN THE
LOCATIONS IN THE ^^NEWPTH \\DOUBLE PRECISION AND DOUBLY DIMENSIONED
ARRAY HAVING 1 THROUGH THE RETURNED VALUE OF ^^LCNRIT \\AS THEIR
SECOND SUBSCRIPTS ARE RETURNED CONTAINING THE PATH (THE DIRECTORY)
UPON WHICH THE FILE IS LOCATED. ^IF NO PATHS ARE SPECIFIED IN THE
FILE SPECIFICATIONS TO THE LEFT OF THE EQUAL SIGN, THEN THE
LOCATIONS CORRESPONDING TO THESE FILE SPECIFICATIONS IN THE ^^NEWPTH
\\ARRAY WILL CONTAIN ZEROES. ^IF NO PATHS ARE SPECIFIED IN THE FILE
SPECIFICATIONS TO THE RIGHT OF THE EQUAL SIGN, THEN THESE LOCATIONS
EITHER CONTAIN THE PREVIOUSLY SPECIFIED PATH IF ANY HAS BEEN
SPECIFIED TO THE RIGHT OF THE EQUAL SIGN, OR ELSE CONTAIN ZEROES IF
NO PATH HAS YET BEEN SPECIFIED TO THE RIGHT OF THE EQUAL SIGN.
^^NEWPTH(1,...) \\CONTAINS IN ITS LEFT HALF THE OCTAL PROJECT NUMBER
AND IN ITS RIGHT HALF THE OCTAL PROGRAMMER NUMBER (THE FIRST TWO
NUMBERS APPEARING WITHIN THE SQUARE BRACKETS), OR CONTAINS ZERO IF
NO PATH HAS BEEN SPECIFIED. ^^NEWPTH(2,...) \\CONTAINS THE SUB FILE
DIRECTORY (^^SFD) \\NAME (THE THIRD COMPONENT WITHIN THE SQUARE
BRACKETS) IN 6^H FORM IF ANY HAS BEEN SPECIFIED, OR CONTAINS ZERO
OTHERWISE. ^^NEWPTH(3,...) \\ALWAYS CONTAINS ZERO.
.SKIP
.INDENT -9
^^LCNRIT#=#\I\F KIND \\IS RETURNED SET TO EITHER 3 OR 4, THEN
^^LCNRIT \\IS RETURNED CONTAINING THE VALUE OF THE SUBSCRIPT OF THE
LOCATIONS IN THE ^^NEWNUL, NEWDSK, NEWNAM \\AND ^^NEWPTH \\ARRAYS
WHICH DESCRIBE THE FILE SPECIFICATION WHICH APPEARS TO THE RIGHT OF
THE EQUAL SIGN. ^IF ^^KIND \\IS RETURNED SET TO 3 AND IF ^^LCNRIT
\\IS GREATER THAN ONE, THEN THE LOWER LOCATIONS IN THESE ARRAYS
DESCRIBE THE FILE SPECIFICATIONS APPEARING TO THE LEFT OF THE EQUAL
SIGN. ^IF ^^KIND \\IS RETURNED SET TO 4, THEN THE VALUES OF THE
LOCATIONS WITHIN THESE ARRAYS HAVING SUBSCRIPTS LESS THAN THE
RETURNED VALUE OF ^^LCNRIT \\SHOULD BE IGNORED.
.SKIP
.INDENT -9
^^IBUFFR#=#\\ARRAY IN WHICH THIS ROUTINE CAN RETURN CHARACTERS TYPED
BY THE USER OR READ FROM THE COMMAND FILE. ^THESE CHARACTERS
REPRESENT ONLY THE MOST RECENT COMMAND LINE AND HAVE BEEN READ BY A
MULTIPLE OF AN ^A1 FORMAT. ^IT IS THE RESPONSIBILITY OF THE CALLING
PROGRAM TO EVALUATE THE SWITCH APPEARING WITHIN THIS ARRAY IF ^^KIND
\\IS RETURNED SET TO 5.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR RETURNING INFORMATION TO
THE CALLING PROGRAM. ^THEIR INPUT VALUES ARE IGNORED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^MAXFLG#=#\I\F KIND \\IS RETURNED SET TO 5, THEN ^^MAXFLG \I\S
\\RETURNED CONTAINING THE SUBSCRIPT OF THE LOCATIONS IN THE ^^INILTR
\\AND ^^KNTLTR \\ARRAYS WHICH DESCRIBE THE RIGHTMOST COMPONENT OF
THE SWITCH.
.SKIP
.INDENT -9
^^INILTR#=#\I\F KIND \\IS RETURNED SET TO 5, THEN THE LOCATIONS IN
THE ^^INILTR \\ARRAY HAVING THE SUBSCRIPTS 1 THROUGH THE RETURNED
VALUE OF ^^MAXFLG \\ARE RETURNED CONTAINING THE VALUES OF THE
SUBSCRIPTS OF THE LOCATIONS WITHIN THE ^^IBUFFR \\ARRAY IN WHICH ARE
TO BE FOUND THE INITIAL CHARACTERS OF EACH OF THE COMPONENTS OF THE
SWITCH.
.SKIP
.INDENT -9
^^KNTLTR#=#\I\F KIND \\IS RETURNED SET TO 5, THEN THE LOCATIONS IN
THE ^^INILTR \\ARRAY HAVING THE SUBSCRIPTS 1 THROUGH THE RETURNED
VALUE OF ^^MAXFLG \\ARE RETURNED CONTAINING THE NUMBER OF CHARACTERS
WITHIN EACH OF THE COMPONENTS OF THE SWITCH. ^A MISSING COMPONENT OF
THE SWITCH IS INDICATED BY A ZERO VALUE IN THE ^^KNTLTR \\ARRAY.
.SKIP
.INDENT -9
^^LCNOWN#=#\I\F KIND \\IS RETURNED SET TO 5, THEN ^^LCNOWN \I\S
\\RETURNED CONTAINING THE VALUE OF THE SUBSCRIPT OF THE LOCATIONS IN
THE ^^NEWNUL, NEWDSK, NEWNAM \\AND ^^NEWPTH \\ARRAYS WHICH WILL
DESCRIBE THE FILE SPECIFICATION WHEN ^^KIND \\IS NEXT RETURNED SET
TO EITHER 3 OR 4.
.LEFT MARGIN 0
.SKIP
^THE ^^GETFIL \\ROUTINE IS LISTED BELOW. ^THE FIRST HALF OF THE
ROUTINE CALLS ^^DAFLAG \\AND THEN DECIDES WHAT IS TO BE DONE WITH
THE INFORMATION RETURNED BY ^^DAFLAG. T\H\E GETFIL \\ROUTINE
MANIPULATES THE VALUE OF THE ^^DAFLAG \\ARGUMENT NAMED ^^MANY \T\O
\\SIMULATE A RIGHTMOST AMPERSAND WHEN A STATEMENT ENDS WITH A
RIGHTMOST EQUAL SIGN OR RIGHTMOST COMMA. ^THE SECOND HALF OF THE
ROUTINE USES ^^DEC\\SYSTEM-10 ^^FORTRAN ENCODE \\STATEMENTS TO PACK
THE CHARACTERS READ 1 TO A COMPUTER STORAGE LOCATION INTO A FORM
WHICH MIGHT HAVE BEEN READ WITH AN ^A5 OR DOUBLE PRECISION ^A10
FORMAT. ^THE OCTAL NUMBERS ARE EVALUATED BY MATCHING THE INDIVIDUAL
DIGITS AGAINST AN ARRAY CONTAINING 1^H0 THROUGH 1^H7 RATHER THAN BY
USE OF ^^ENCODE \\AND ^^DECODE \\STATEMENTS SINCE THESE STATEMENTS
DO NOT HAVE ANY PROVISION FOR CONTINUING AFTER A NON-NUMERIC
CHARACTER IS FOUND IN A NUMERIC FIELD.
.SKIP
.NOFILL
      ^^SUBROUTINE GETFIL(MAXFIL,  ITTY,  JTTY,KMDNUM,KMDDVC,
     1    KMDNAM,KMDEXT,MAXSTR,MAXBFR,  KIND,NEWNUL,NEWDSK,
     2    NEWNAM,NEWPTH,LCNRIT,IBUFFR,MAXFLG,INILTR,KNTLTR,
     3    LCNOWN)
C     RENBR(/EVALUATE FORM FILE,FILE=FILE,FILE)
      COMMON/FASPZ/KNTFIL,MANY,IEOF,IAFTER,LSTPTH,LSTDSK,
     1LOWBFR
      DIMENSION INILTR(MAXSTR),KNTLTR(MAXSTR),
     1IBUFFR(MAXBFR),NEWNUL(MAXFIL),NEWDSK(MAXFIL),
     2LETTER(8),KOLECT(10),NUMTWO(2)
      DOUBLE PRECISION NEWNAM(MAXFIL),NEWPTH(3,MAXFIL),
     1KOMAND,ONEPTH(3),LSTPTH(3),TWONUM,KMDNAM
      EQUIVALENCE (TWONUM,NUMTWO),(NEWPRJ,NUMTWO(1)),
     1(NEWUSR,NUMTWO(2))
      DATA LETTER/1H0,1H1,1H2,1H3,1H4,1H5,1H6,1H7/
      DATA IBLANK,JBLANK,IDOT/1H ,5H     ,1H./
C
C     DECIDE WHETHER ARE STARTING OR CONTINUING EVALUATION
      IF(KIND.EQ.5)GO TO 9
      IF(KIND.GE.3)GO TO 30
      LCNRIT=0
      KNTFIL=0
      IAFTER=0
      MANY=0
      IF(KIND.EQ.2)GO TO 9
C
C     READ CONTENTS OF NEXT LINE
      WRITE(JTTY,1)
    1 FORMAT(2H *,$)
      GO TO 4
    2 WRITE(JTTY,3)
    3 FORMAT(2H _&,$)
    4 READ(ITTY,5,END=10)IBUFFR
    5 FORMAT(132A1)
      IEOF=0
      GO TO 7
    6 READ(KMDNUM,5,END=10)IBUFFR
      IEOF=1
    7 LOWBFR=1
      GO TO 9
    8 LCNRIT=1
      KNTFIL=0
C
C     LOCATE NEXT FILE SPECIFICATION
    9 CALL DAFLAG(1,1,MAXSTR,MAXBFR,IBUFFR,
     1LOWBFR,MANY,KIND,INILTR,KNTLTR,MAXDSK,MAXNAM,
     2MAXNUM,MAXFLG,KONTNT,MINPRT,MAXPRT)
      GO TO(11,11,13,15,16,17,17,17),KIND
C
C     END OF LINE, END OF FILE OR SEMICOLON FOUND
   10 KIND=1
      IEOF=0
   11 IF(IAFTER.LT.0)GO TO 14
      IF(IAFTER.EQ.1)GO TO 14
      IF(KNTFIL.GT.0)GO TO 12
      IF(LCNRIT.EQ.0)GO TO 15
      IF(KIND.EQ.2)GO TO 37
      IF(IEOF.EQ.0)GO TO 37
      GO TO 6
   12 IF(KIND.EQ.2)LOWBFR=LOWBFR-1
      GO TO 29
C
C     EQUAL SIGN FOUND
   13 IF(IAFTER.GT.0)GO TO 27
      MANY=-1
      IAFTER=0
      LCNRIT=-1
      GO TO 9
C
C     AMPERSAND FOUND OR MORE FILES NEEDED
   14 KNTFIL=KNTFIL-1
      MANY=-1
      IAFTER=0
   15 IF(KIND.EQ.2)GO TO 9
      IF(IEOF.NE.0)GO TO 6
      GO TO 2
C
C     EXTRA COMMA FOUND
   16 IF(IAFTER.GT.0)GO TO 27
      KNTFIL=KNTFIL+1
      NEWNUL(KNTFIL)=0
      IAFTER=1
      GO TO 19
C
C     EVALUATE LOCATION AND REPACK DEVICE AND FILE NAME
   17 IF(KONTNT.EQ.0)GO TO 20
      IF(IAFTER.GT.0)GO TO 28
      NXTFIL=KNTFIL+1
      GO TO 38
   18 IF(KONTNT.GE.16)GO TO 21
      KNTFIL=NXTFIL
      IAFTER=2
   19 IF(LCNRIT.NE.0)GO TO 9
      IF(KNTFIL.LT.MAXFIL)IAFTER=IAFTER-2
      GO TO 9
C
C     ALLOW CALLING PROGRAM TO EVALUATE SWITCH
   20 LCNOWN=KNTFIL
      KIND=5
      IF(MANY.GT.0)GO TO 37
      IF(IAFTER.GT.0)GO TO 28
      MANY=-1
      LCNOWN=LCNOWN+1
      GO TO 37
C
C     OPEN COMMAND FILE SPECIFIED BY USER
   21 KOMAND=NEWNAM(NXTFIL)
      IF(NEWNUL(NXTFIL).LE.1)ENCODE(10,22,KOMAND)
     1KMDNAM,KMDEXT
      IF(NEWNUL(NXTFIL).EQ.2)ENCODE(10,22,KOMAND)
     1NEWNAM(NXTFIL),KMDEXT
   22 FORMAT(1A6,1H.,1A3)
      IF(NEWNUL(NXTFIL).EQ.4)ENCODE(10,23,KOMAND)
     1KMDNAM,(KOLECT(I),I=8,10)
   23 FORMAT(1A6,1H.,3A1)
      INDISK=NEWDSK(NXTFIL)
      IF(INDISK.EQ.JBLANK)INDISK=KMDDVC
      DO 24 I=1,3
   24 ONEPTH(I)=NEWPTH(I,NXTFIL)
      OPEN(UNIT=KMDNUM,DEVICE=INDISK,FILE=KOMAND,
     1DIRECTORY=ONEPTH,ACCESS=5HSEQIN,ERR=25)
      GO TO 6
   25 WRITE(JTTY,26)(IBUFFR(I),I=MINPRT,MAXPRT)
   26 FORMAT(26H CANNOT READ COMMAND FROM ,100A1)
      GO TO 2
C
C     PREPARE TO RETURN RESULTS TO CALLING PROGRAM
   27 MANY=-1
      GO TO 29
   28 LOWBFR=MINPRT
   29 IAFTER=0
      IF(LCNRIT.GT.0)GO TO 31
      KIND=3
      IF(LCNRIT.LT.0)GO TO 33
      LCNRIT=1
      GO TO 34
   30 LCNRIT=LCNRIT+1
   31 IF(LCNRIT.GT.KNTFIL)GO TO 8
      KIND=4
      IF(NEWNUL(LCNRIT).EQ.0)GO TO 37
      IF(NEWDSK(LCNRIT).EQ.JBLANK)NEWDSK(LCNRIT)=LSTDSK
      IF(NEWPTH(1,LCNRIT).NE.0)GO TO 34
      DO 32 I=1,3
   32 NEWPTH(I,LCNRIT)=LSTPTH(I)
      GO TO 36
   33 LCNRIT=KNTFIL
   34 DO 35 I=1,3
   35 LSTPTH(I)=NEWPTH(I,LCNRIT)
   36 LSTDSK=NEWDSK(LCNRIT)
C
C     RETURN TO CALLING PROGRAM
   37 RETURN
C
C     *****************************************************
C     *                                                   *
C     *  A10 PACK NAME, A5 PACK DEVICE, EVALUATE NUMBERS  *
C     *                                                   *
C     *****************************************************
C
C     SET SWITCHES WHICH STATE IF ANYTHING WAS FOUND
   38 NEWPRJ=0
      NEWUSR=0
      DO 39 I=1,3
   39 NEWPTH(I,NXTFIL)=TWONUM
      NEWNUL(NXTFIL)=0
      NEWDSK(NXTFIL)=JBLANK
C
C     PACK DEVICE NAME INTO A5 FORM
      IF(MAXDSK.LT.1)GO TO 42
      KOUNT=KNTLTR(1)
      IF(KOUNT.LE.0)GO TO 42
      IBGN=INILTR(1)
      DO 40 I=1,5
      KOLECT(I)=IBLANK
      IF(KOUNT.GT.0)KOLECT(I)=IBUFFR(IBGN)
      IBGN=IBGN+1
   40 KOUNT=KOUNT-1
      ENCODE(5,41,NEWDSK(NXTFIL))(KOLECT(I),I=1,5)
   41 FORMAT(5A1)
      NEWNUL(NXTFIL)=1
C
C     EVALUATE OCTAL PROJECT, PROGRAMMER NUMBERS
   42 INDEX=MAXNAM+1
      IF(INDEX.GE.MAXNUM)GO TO 48
   43 KOUNT=KNTLTR(INDEX)
      IF(KOUNT.LE.0)GO TO 48
      IBGN=INILTR(INDEX)
      IEND=IBGN+KOUNT-1
      NEWPRJ=NEWUSR
      NEWUSR=0
      DO 45 I=IBGN,IEND
      LTRNOW=IBUFFR(I)
      NEWUSR=8*NEWUSR
      DO 44 J=1,8
      IF(LETTER(J).NE.LTRNOW)GO TO 44
      NEWUSR=NEWUSR+J-1
      GO TO 45
   44 CONTINUE
   45 CONTINUE
      IF(NEWUSR.LE.0)GO TO 48
      INDEX=INDEX+1
      IF(INDEX.LE.(MAXNAM+2))GO TO 43
      NEWPTH(1,NXTFIL)=TWONUM
      NEWNUL(NXTFIL)=1
C
C     PACK SUB FILE DIRECTORY NAME
      IF(MAXNUM.LE.(MAXNAM+2))GO TO 48
      KOUNT=KNTLTR(MAXNAM+3)
      IF(KOUNT.LE.0)GO TO 48
      IBGN=INILTR(MAXNAM+3)
      DO 46 I=1,6
      KOLECT(I)=IBLANK
      IF(KOUNT.GT.0)KOLECT(I)=IBUFFR(IBGN)
      IBGN=IBGN+1
   46 KOUNT=KOUNT-1
      ENCODE(10,47,NEWPTH(2,NXTFIL))(KOLECT(I),I=1,6)
   47 FORMAT(6A1,4X)
C
C     PACK FILE NAME AND ITS EXTENSION INTO A10 FORM
   48 DO 49 I=1,10
   49 KOLECT(I)=IBLANK
      IF(MAXNAM.LE.MAXDSK)GO TO 55
      KOUNT=KNTLTR(MAXDSK+1)
      IF(KOUNT.LE.0)GO TO 51
      NEWNUL(NXTFIL)=2
      IBGN=INILTR(MAXDSK+1)
      IF(KOUNT.GT.6)KOUNT=6
      DO 50 I=1,KOUNT
      KOLECT(I)=IBUFFR(IBGN)
   50 IBGN=IBGN+1
      IF(MAXNAM.LE.(MAXDSK+1))GO TO 54
      NEWNUL(NXTFIL)=3
      KOUNT=KNTLTR(MAXDSK+2)
      GO TO 52
   51 IF(MAXNAM.LE.(MAXDSK+1))GO TO 55
      KOUNT=KNTLTR(MAXDSK+2)
      IF(KOUNT.LE.0)GO TO 55
      NEWNUL(NXTFIL)=4
   52 IBGN=INILTR(MAXDSK+2)
      IF(KOUNT.GT.3)KOUNT=3
      DO 53 I=8,10
      IF(KOUNT.GT.0)KOLECT(I)=IBUFFR(IBGN)
      IBGN=IBGN+1
   53 KOUNT=KOUNT-1
   54 KOLECT(7)=IDOT
   55 ENCODE(10,56,NEWNAM(NXTFIL))KOLECT
   56 FORMAT(10A1)
      GO TO 18
C610045095007$_&
      END
.SKIP
.FILL
T\\HE PROGRAM LISTED BELOW CALLS ^^GETFIL, \\REPORTS THE RESULTS,
THEN REPEATS THE PROCESS.
.SKIP
.NOFILL
^^C     DEMONSTRATE GETFIL WHICH IN TURN DEMONSTRATES DAFLAG
      DIMENSION IBUFFR(72),INILTR(20),KNTLTR(20),
     1NEWNUL(10),NEWDSK(10),INTPTH(4)
      DOUBLE PRECISION NEWNAM(10),NEWPTH(3,10),DBLPTH(2),
     1KMDNAM
      EQUIVALENCE(INTPTH,DBLPTH)
      DATA KMDNAM,KMDEXT,KMDDVC/6HGETFIL,3HCCL,3HDSK/
      DATA ITTY,JTTY,KMDNUM/5,5,1/
      WRITE(JTTY,1)
    1 FORMAT(8H MAXFIL ,$)
      READ(ITTY,2)MAXFIL
    2 FORMAT(I)
      IF(MAXFIL.LE.0)MAXFIL=1
      IF(MAXFIL.GT.10)MAXFIL=10
      KIND=0
C
C     GET NEXT PORTION OF FILE SPECIFICATIONS
    3 CALL GETFIL(MAXFIL,ITTY,JTTY,KMDNUM,KMDDVC,
     1KMDNAM,KMDEXT,20,72,KIND,NEWNUL,NEWDSK,
     2NEWNAM,NEWPTH,LCNRIT,IBUFFR,MAXFLG,INILTR,KNTLTR,
     3LCNOWN)
      GO TO(4,6,9,8,21),KIND
C
C     END OF FILE SPECIFICATIONS
    4 WRITE(JTTY,5)
    5 FORMAT(5H DONE)
      GO TO 3
    6 WRITE(JTTY,7)
    7 FORMAT(10H SEMICOLON)
      GO TO 3
C
C     LIST FILES
    8 INDEX=LCNRIT
      GO TO 11
    9 IF(LCNRIT.LE.0)GO TO 3
      INDEX=0
   10 INDEX=INDEX+1
   11 IF(NEWNUL(INDEX).NE.0)GO TO 13
      IF(INDEX.GE.LCNRIT)GO TO 16
      WRITE(JTTY,12)INDEX
   12 FORMAT(5H LEFT,I4,8H MISSING)
      GO TO 10
   13 IF(NEWPTH(1,INDEX).NE.0)GO TO 15
      IF(INDEX.GE.LCNRIT)GO TO 18
      WRITE(JTTY,14)INDEX,NEWNUL(INDEX),NEWDSK(INDEX),
     1NEWNAM(INDEX)
   14 FORMAT(5H LEFT,I4,I2,1X,A5,1H:,1A10,1X,O6,1X,O6,
     11X,A5,A1)
      GO TO 10
   15 DBLPTH(1)=NEWPTH(1,INDEX)
      DBLPTH(2)=NEWPTH(2,INDEX)
      IF(INDEX.GE.LCNRIT)GO TO 20
      WRITE(JTTY,14)INDEX,NEWNUL(INDEX),NEWDSK(INDEX),
     1NEWNAM(INDEX),INTPTH
      GO TO 10
   16 WRITE(JTTY,17)INDEX
   17 FORMAT(6H RIGHT,I3,8H MISSING)
      GO TO 3
   18 WRITE(JTTY,19)INDEX,NEWNUL(INDEX),NEWDSK(INDEX),
     1NEWNAM(INDEX)
   19 FORMAT(6H RIGHT,I3,I2,1X,A5,1H:,1A10,1X,O6,1X,O6,
     11X,A5,A1)
      GO TO 3
   20 WRITE(JTTY,19)INDEX,NEWNUL(INDEX),NEWDSK(INDEX),
     1NEWNAM(INDEX),INTPTH
      GO TO 3
C
C     LIST SWITCHES
   21 M=0
      DO 24 I=1,MAXFLG
      J=INILTR(I)
      K=J+KNTLTR(I)-1
      IF(K.LT.J)GO TO 24
      IF(M.EQ.0)WRITE(JTTY,22)LCNOWN,(IBUFFR(L),L=J,K)
   22 FORMAT(7H SWITCH,I2,3X,72A1)
      IF(M.NE.0)WRITE(JTTY,23)LCNOWN,(IBUFFR(L),L=J,K)
   23 FORMAT(7H  "  " ,I2,3X,72A1)
      M=1
   24 CONTINUE
      GO TO 3
      END
.SKIP
.FILL
T\\HE FOLLOWING IS A TYPICAL DIALOG BETWEEN THE USER AND THE PROGRAM
LISTED ABOVE.
.NOFILL
.SKIP
.NOFILL
.TEST PAGE 7
^^MAXFIL 3
*FIRST.1ST,SECOND.2ND=THIRD.3RD,FOURTH.4TH
LEFT   1 3      :FIRST .1ST
LEFT   2 3      :SECOND.2ND
RIGHT  3 3      :THIRD .3RD
RIGHT  1 3      :FOURTH.4TH
DONE
.TEST PAGE 6
*FIRST.1ST,SECOND.2ND,THIRD.3RD,FOURTH.4TH
RIGHT  1 3      :FIRST .1ST
RIGHT  2 3      :SECOND.2ND
RIGHT  3 3      :THIRD .3RD
RIGHT  1 3      :FOURTH.4TH
DONE
.TEST PAGE 9
*FIRST,
_&SECOND=
_&THIRD,
LEFT   1 2      :FIRST .
LEFT   2 2      :SECOND.
RIGHT  3 2      :THIRD .
_&FOURTH
RIGHT  1 2      :FOURTH.
DONE
.TEST PAGE 9
*FIRST,
_&SECOND,
_&THIRD,
RIGHT  1 2      :FIRST .
RIGHT  2 2      :SECOND.
RIGHT  3 2      :THIRD .
_&FOURTH
RIGHT  1 2      :FOURTH.
DONE
.TEST PAGE 14
*/A 1ST/B,/C 2ND/D=/E 3RD/F,/G 4TH/H
SWITCH 1   A
SWITCH 1   B
SWITCH 2   C
SWITCH 2   D
SWITCH 3   E
SWITCH 3   F
LEFT   1 2      :1ST   .
LEFT   2 2      :2ND   .
RIGHT  3 2      :3RD   .
SWITCH 1   G
SWITCH 1   H
RIGHT  1 2      :4TH   .
DONE
.TEST PAGE 14
*/A 1ST/B,/C 2ND/D,/E 3RD/F,/G 4TH/H
SWITCH 1   A
SWITCH 1   B
SWITCH 2   C
SWITCH 2   D
SWITCH 3   E
SWITCH 3   F
RIGHT  1 2      :1ST   .
RIGHT  2 2      :2ND   .
RIGHT  3 2      :3RD   .
SWITCH 1   G
SWITCH 1   H
RIGHT  1 2      :4TH   .
DONE
.TEST PAGE 9
*LPT:FIRST.[6000,56],SECOND=
_&THIRD,DSK:FOURTH,FIFTH[6002,56,RENBR],SIXTH
LEFT   1 3 LPT  :FIRST .    006000 000056
LEFT   2 2      :SECOND.
RIGHT  3 2      :THIRD .
RIGHT  1 2 DSK  :FOURTH.
RIGHT  1 2 DSK  :FIFTH .    006002 000056 RENBR
RIGHT  1 2 DSK  :SIXTH .    006002 000056 RENBR
DONE
.NOFILL
.TEST PAGE 3
*=FIRST
RIGHT  1 2      :FIRST .
DONE
.TEST PAGE 6
*/A::C=SECOND
SWITCH 1   A
 "  "  1   C
LEFT   1 MISSING
RIGHT  2 2      :SECOND.
DONE
.TEST PAGE 12
*,SECOND=,FOURTH;FIRST,=THIRD,!TERMINAL COMMA IMPLIES _&
LEFT   1 MISSING
LEFT   2 2      :SECOND.
RIGHT  3 MISSING
RIGHT  1 2      :FOURTH.
SEMICOLON
LEFT   1 2      :FIRST .
LEFT   2 MISSING
RIGHT  3 2      :THIRD .
_&FOURTH
RIGHT  1 2      :FOURTH.
DONE
.TEST PAGE 7
*,=,!THIS AND NEXT 3 LINES ARE REPEATED WITH ; BELOW
LEFT   1 MISSING
LEFT   2 MISSING
RIGHT  3 MISSING
_&FOURTH
RIGHT  1 2      :FOURTH.
DONE
.TEST PAGE 11
*/A,/B=/C,/D
SWITCH 1   A
SWITCH 2   B
SWITCH 3   C
LEFT   1 MISSING
LEFT   2 MISSING
RIGHT  3 MISSING
SWITCH 1   D
_&FOURTH
RIGHT  1 2      :FOURTH.
DONE
.TEST PAGE 15
*,=,;FOURTH;/A,/B=/C,/D;FOURTH!SAME AS ABOVE 4 LINES
LEFT   1 MISSING
LEFT   2 MISSING
RIGHT  3 MISSING
RIGHT  1 2      :FOURTH.
SEMICOLON
SWITCH 1   A
SWITCH 2   B
SWITCH 3   C
LEFT   1 MISSING
LEFT   2 MISSING
RIGHT  3 MISSING
SWITCH 1   D
RIGHT  1 2      :FOURTH.
DONE
.SKIP 2
.TEST PAGE 2
.FILL
.LEFT MARGIN 0
T\H\E GETFIL \\ROUTINE DEMONSTRATED ABOVE REPACKS EACH FILE
SPECIFICATION INTO A FORM WHICH CAN BE USED IN A ^^PDP-10 FORTRAN
OPEN \\STATEMENT, BUT DOES NOT ACTUALLY OPEN THE FILES AND DOES NOT
EVALUATE THE ASSOCIATED SWITCHES. ^THE ROUTINE NAMED ^^OPNFIL
\\WHICH IS LISTED BELOW IS A TYPICAL EXAMPLE OF THE MANNER IN WHICH
^^GETFIL \\COULD BE CALLED FOR AN APPLICATION IN WHICH THE USER IS
ALLOWED TO SPECIFY UP TO 2 OUTPUT FILES AND MANY INPUT FILES.
^^OPNFIL \\IDENTIFIES EACH OUTPUT FILE AS BEING OF EITHER OF 2
TYPES, DESIGNATED AS TYPES ONE AND TWO, DEPENDING UPON THE LETTERS
WHICH FORM THE SWITCHES WHICH APPEAR WITH THE OUTPUT FILE
SPECIFICATION. ^ALTHOUGH THE CALLING PROGRAM SPECIFIES DEFAULT
EXTENSIONS FOR THE OUTPUT FILE NAMES OF EACH TYPE, THE FIRST
COMPONENT OF THE NAME OF THE FIRST INPUT FILE IS USED AS THE FIRST
COMPONENT OF THE NAME OF THE OUTPUT FILE IF THE FIRST COMPONENT OF
THE NAME OF THE OUTPUT FILE IS NOT SPECIFIED BY THE USER. ^IF NO
MORE THAN 1 OUTPUT FILES IS SPECIFIED, AND IF A SWITCH DOES NOT
IDENTIFY THE TYPE OF THIS OUTPUT FILE, THEN THE SINGLE OUTPUT FILE
IS OF TYPE ONE.
.SKIP
^FOR EXAMPLE, IF THE DEFAULT EXTENSIONS FOR THE TYPE ONE OUTPUT
FILE, FOR THE TYPE TWO OUTPUT FILE, AND FOR THE INPUT FILES ARE
_.^^ONE, _.TWO \\AND _.^^SRC \\RESPECTIVELY, AND IF THE SWITCH /^O
IDENTIFIES A TYPE ONE OUTPUT FILE WHILE THE SWITCH /^T IDENTIFIES A
TYPE TWO OUTPUT FILE, THEN THE SHORT FORMS OF THE COMMANDS SHOWN AT
THE LEFT IN THE TABLE BELOW ARE EQUIVALENT TO THE LONGER FORMS SHOWN
AT THE RIGHT.
.SKIP
.NOFILL
^^THIRD    \O\R   =THIRD   \T\O THIRD.ONE=THIRD.SRC
THIRD/O  \O\R /O=THIRD   \T\O THIRD.ONE/O=THIRD.SRC
THIRD/T  \O\R /T=THIRD   \T\O THIRD.TWO/T=THIRD.SRC
THIRD/O/T              \T\O THIRD.ONE/O,THIRD.TWO/T=THIRD.SRC
/O=THIRD/T             \T\O     "           "           "
/T=THIRD/O             \T\O     "           "           "
/O/T=THIRD             \T\O     "           "           "
/O,SECOND=THIRD        \T\O THIRD.ONE/O,SECOND.TWO=THIRD.SRC
/T,SECOND=THIRD        \T\O THIRD.TWO/T,SECOND.ONE=THIRD.SRC
,SECOND/O=THIRD        \T\O THIRD.TWO,SECOND.ONE/O=THIRD.SRC
,SECOND/T=THIRD        \T\O THIRD.ONE,SECOND.TWO/T=THIRD.SRC
FIRST/O,SECOND=THIRD   \T\O FIRST.ONE/O,SECOND.TWO=THIRD.SRC
FIRST/T,SECOND=THIRD   \T\O FIRST.TWO/T,SECOND.ONE=THIRD.SRC
FIRST,SECOND/O=THIRD   \T\O FIRST.TWO,SECOND.ONE/O=THIRD.SRC
FIRST,SECOND/T=THIRD   \T\O FIRST.ONE,SECOND.TWO/T=THIRD.SRC
FIRST/O,SECOND/T=THIRD \T\O FIRST.ONE/O,SECOND.TWO/T=THIRD.SRC
FIRST/O,SECOND=THIRD/T \T\O     "           "           "
FIRST,SECOND/T=THIRD/O \T\O     "           "           "
FIRST/T,SECOND/O=THIRD \T\O FIRST.TWO/T,SECOND.ONE/O=THIRD.SRC
FIRST/T,SECOND=THIRD/O \T\O     "           "           "
FIRST,SECOND/O=THIRD/T \T\O     "           "           "
.FILL
.SKIP
A\\S CAN BE SEEN IN THE ABOVE EXAMPLES, SWITCHES IMPLYING BOTH TYPES
OF OUTPUT FILES CAN BE PRESENT IF NO OUTPUT FILE IS SPECIFIED SINCE
THEN THE DEFAULT CHARACTERISTICS ARE USED FOR BOTH OUTPUT FILES. ^IF
A SINGLE OUTPUT FILE IS SPECIFIED, BUT SWITCHES IMPLYING BOTH TYPES
ARE PRESENT, THEN THE ^^OPNFIL \\ROUTINE DOES NOT ATTEMPT TO
DETERMINE WHICH OUTPUT FILE HAS BEEN SPECIFIED AND WHICH HAS NOT
BEEN SPECIFIED, SO THE COMMAND IS CONSIDERED TO BE AMBIGUOUS. ^NONE
OF THE FOLLOWING COMMANDS WOULD BE ALLOWED.
.SKIP
.NOFILL
.TEST PAGE 3
^^FIRST=THIRD/O/T    FIRST/O=THIRD/T    FIRST,SECOND=THIRD/O/T
FIRST/O/T=THIRD    FIRST/T=THIRD/O    FIRST/O/T,SECOND=THIRD
                                      FIRST,SECOND/O/T=THIRD
.SKIP
.FILL
T\\HE ARGUMENT LIST OF ROUTINE ^^OPNFIL \I\S
.NOFILL
.SKIP
.TEST PAGE 4
      SUBROUTINE OPNFIL(  ITTY,  JTTY,KMDNUM,KMDDVC,KMDNAM,
     1    KMDEXT,ID1NUM,ID1DVC,ID1EXT,ID2NUM,ID2DVC,ID2EXT,
     2    ID3NUM,ID3DVC,ID3EXT,MAXTTL,MAXBFR,  KIND,KNDFLG,
     3    NUMFLG,LTRTTL,ID1OPN,ID2OPN,IBUFFR)
.SKIP
.FILL
\\WITH THE ASSOCIATED ^^DIMENSION \\AND ^^DOUBLE PRECISION
\\STATEMENTS
.SKIP
.NOFILL
.TEST PAGE 3
      ^^DIMENSION KNDFLG(27),NUMFLG(27),LTRTTL(MAXTTL),
     1IBUFFR(MAXBFR)
      DOUBLE PRECISION KMDNAM
.SKIP
.FILL
T\H\E OPNFIL \\ARGUMENTS NAMED ^^ITTY, JTTY, KMDNUM, KMDDVC, KMDNAM,
KMDEXT, MAXBFR \\AND ^^IBUFFR \\ARE IDENTICAL TO THE ^^GETFIL
\\ARGUMENTS HAVING THE SAME NAMES AND HAVE ALREADY BEEN DESCRIBED.
^THE FOLLOWING ARGUMENTS, TOGETHER WITH ^^ITTY, JTTY, KMDNUM,
KMDDVC, KMDNAM, KMDEXT \\AND ^^MAXBFR, \\ARE USED ONLY FOR INPUT AND
ARE RETURNED UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^ID1NUM#=#\\NUMBER OF THE UNIT UPON WHICH THIS ROUTINE IS TO OPEN
AN OUTPUT FILE WHICH IS TO BE OF TYPE ONE. ^AN OUTPUT FILE WILL BE
OF TYPE ONE IF ITS FILE SPECIFICATION IS ASSOCIATED WITH A SWITCH
FOR WHICH THE CORRESPONDING VALUE IN THE ^^KNDFLG \\ARRAY IS 1.
.SKIP
.INDENT -9
^^ID1DVC#=#\\NAME IN 5^H FORM OF THE DEVICE UPON WHICH THE TYPE ONE
OUTPUT FILE IS TO BE WRITTEN IF THE USER DOES NOT SUPPLY A DEVICE
NAME FOLLOWED BY A COLON AT THE START OF THE SPECIFICATION OF THE
TYPE ONE OUTPUT FILE.
.SKIP
.INDENT -9
^^ID1EXT#=#\\NAME IN 3^H FORM WHICH IS TO BE USED AS THE SECOND
COMPONENT (THE FILE NAME EXTENSION) OF THE NAME OF THE TYPE ONE
OUTPUT FILE IF NO SECOND COMPONENT OF THE NAME OF THE TYPE ONE
OUTPUT FILE IS SUPPLIED BY THE USER. ^IF THE NAME OF THE TYPE ONE
OUTPUT FILE IS NOT TO HAVE SUCH A SECOND COMPONENT, THEN THE USER
MUST TYPE A PERIOD FOLLOWING THE FIRST COMPONENT OF ITS NAME. ^IF
THE USER DOES NOT SPECIFY THE FIRST COMPONENT OF THE NAME OF THE
TYPE ONE OUTPUT FILE, THEN THE FIRST COMPONENT OF THE NAME OF THE
FIRST INPUT FILE IS USED AS THE FIRST COMPONENT OF THE NAME OF THE
TYPE ONE OUTPUT FILE.
.SKIP
.INDENT -9
^^ID2NUM#=#\\NUMBER OF THE UNIT UPON WHICH THIS ROUTINE IS TO OPEN
AN OUTPUT FILE WHICH IS TO BE OF TYPE TWO. ^AN OUTPUT FILE WILL BE
OF TYPE TWO IF ITS FILE SPECIFICATION IS ASSOCIATED WITH A SWITCH
FOR WHICH THE CORRESPONDING VALUE IN THE ^^KNDFLG \\ARRAY IS 2.
.SKIP
.INDENT -9
^^ID2DVC#=#\\NAME IN 5^H FORM OF THE DEVICE UPON WHICH THE TYPE TWO
OUTPUT FILE IS TO BE WRITTEN IF THE USER DOES NOT SUPPLY A DEVICE
NAME FOLLOWED BY A COLON AT THE START OF THE SPECIFICATION OF THE
TYPE TWO OUTPUT FILE.
.SKIP
.INDENT -9
^^ID2EXT#=#\\NAME IN 3^H FORM WHICH IS TO BE USED AS THE SECOND
COMPONENT (THE FILE NAME EXTENSION) OF THE NAME OF THE TYPE TWO
OUTPUT FILE IF NO SECOND COMPONENT OF THE NAME OF THE TYPE TWO
OUTPUT FILE IS SUPPLIED BY THE USER. ^IF THE NAME OF THE TYPE TWO
OUTPUT FILE IS NOT TO HAVE SUCH A SECOND COMPONENT, THEN THE USER
MUST TYPE A PERIOD FOLLOWING THE FIRST COMPONENT OF ITS NAME. ^IF
THE USER DOES NOT SPECIFY THE FIRST COMPONENT OF THE NAME OF THE
TYPE TWO OUTPUT FILE, THEN THE FIRST COMPONENT OF THE NAME OF THE
FIRST INPUT FILE IS USED AS THE FIRST COMPONENT OF THE NAME OF THE
TYPE TWO OUTPUT FILE.
.SKIP
.INDENT -9
^^ID3NUM#=#\\NUMBER OF THE UNIT UPON WHICH THIS ROUTINE IS TO OPEN
THE NEXT INPUT FILE SPECIFIED BY THE USER.
.SKIP
.INDENT -9
^^ID3DVC#=#\\NAME IN 5^H FORM OF THE DEVICE UPON WHICH THE NEXT
INPUT FILE IS TO BE OPENED IF NO DEVICE NAME HAS BEEN SPECIFIED BY
THE USER FOR ANY PREVIOUS INPUT FILE AND IF NO DEVICE NAME IS
SPECIFIED BY THE USER FOR THIS NEW INPUT FILE. ^ONCE THE USER HAS
SPECIFIED A DEVICE NAME FOR AN INPUT FILE, HOWEVER, THEN THE DEVICE
NAME SPECIFIED BY THE USER CONTINUES TO BE APPLIED TO ANY SUBSEQUENT
FILES FOR WHICH THE DEVICE NAME IS NOT SPECIFIED UNTIL THE
PROCESSING OF THE CURRENT COMMAND HAS BEEN COMPLETED.
.SKIP
.INDENT -9
^^ID3EXT#=#\\NAME IN 3^H FORM WHICH IS TO BE USED AS THE SECOND
COMPONENT (THE FILE NAME EXTENSION) OF THE NAME OF EACH INPUT FILE
FOR WHICH NO SECOND COMPONENT OF THE FILE NAME IS SUPPLIED BY THE
USER. ^IF THE FILE NAME IS NOT TO HAVE SUCH A SECOND COMPONENT, THEN
THE USER MUST TYPE A PERIOD FOLLOWING THE FIRST COMPONENT OF THE NAME.
.SKIP
.INDENT -9
^^MAXTTL#=#\\MAXIMUM NUMBER OF LOCATIONS IN THE ^^LTRTTL \\ARRAY
WHICH CAN BE USED TO RETURN THE TEXT WHICH WAS FOUND TO THE RIGHT OF
A LEADING APOSTROPHE. ^THE TEXT EXTENDS THROUGH THE NEXT APOSTROPHE
OR THROUGH THE RIGHTMOST PRINTING CHARACTER ON THE LINE IF THE TEXT
IS NOT TERMINATED BY A SECOND APOSTROPHE. ^THE OUTPUT FILE WITH
WHICH THE TEXT APPEARS WILL BE IDENTIFIED AS EITHER A TYPE ONE OR A
TYPE TWO OUTPUT FILE IF THE INITIAL ABSOLUTE VALUE OF ^^KNDFLG(27)
\\IS EITHER 1 OR 2 RESPECTIVELY. ^IF SUCH TEXT IS FOUND, THEN
^^KNDFLG(27) \\IS RETURNED CONTAINING THE NEGATIVE OF ITS INITIAL
ABSOLUTE VALUE AND ^^NUMFLG(27) \\IS RETURNED CONTAINING THE NUMBER
OF CHARACTERS RETURNED IN THE ^^LTRTTL \\ARRAY.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT MUST BE ZEROED BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS FIRST CALLED, BUT THEN THE VALUE RETURNED BY THIS
ROUTINE SHOULD BE SENT TO THE FOLLOWING CALL OF THIS ROUTINE
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KIND###=#\\DEFINED SIMILARLY TO THE ARGUMENT OF THE SAME NAME IN
THE ARGUMENT LIST OF THE ^^GETFIL \\ROUTINE, EXCEPT THAT THE
^^OPNFIL \\ROUTINE DOES NOT RETURN ^^KIND=5 \\SINCE THE ^^OPNFIL
\\ROUTINE ITSELF EVALUATES THE SWITCHES WHICH THE ^^GETFIL \\ROUTINE
HAS INDICATED BY SETTING ^^KIND=5. KIND \\SHOULD BE SET TO ZERO (OR
TO 1) BEFORE THIS ROUTINE IS FIRST CALLED, OR WHENEVER THE
INTERPRETATION OF THE CURRENT SET OF FILE SPECIFICATIONS IS TO BE
ABANDONED. ^^KIND \\IS RETURNED DESCRIBING THE REASON WHY CONTROL
HAS BEEN TRANSFERRED BACK TO THE CALLING PROGRAM, AND SHOULD NOT BE
CHANGED BY THE CALLING PROGRAM IF THIS ROUTINE IS TO BE CALLED AGAIN
TO CONTINUE THE INTERPRETATION OF THE SAME SEQUENCE OF FILE
SPECIFICATIONS.
.INDENT -2
=#1, RETURNED IF THE PREVIOUS CALL TO THIS ROUTINE OPENED THE FINAL
INPUT FILE SPECIFIED BY THE USER. ^THE NEXT CALL TO THIS ROUTINE
WILL ASK THE USER TO TYPE A NEW SET OF FILE SPECIFICATIONS.
.INDENT -2
=#2, RETURNED IF THE PREVIOUS CALL TO THIS ROUTINE OPENED THE FINAL
INPUT FILE SPECIFIED TO THE LEFT OF A SEMICOLON. ^IF THIS ROUTINE IS
CALLED AGAIN WITHOUT ^^KIND \\HAVING FIRST BEEN ZEROED, THEN THE
EVALUATION OF A NEW SET OF FILE SPECIFICATIONS WILL BE BEGUN IN THE
TEXT APPEARING TO THE RIGHT OF THE SEMICOLON.
.INDENT -2
=#3, THE CURRENT CALL TO THIS ROUTINE HAS OPENED THE OUTPUT FILE OR
FILES AND HAS OPENED THE FIRST INPUT FILE.
.INDENT -2
=#4, THE CURRENT CALL TO THIS ROUTINE HAS OPENED THE SECOND OR A
SUBSEQUENT INPUT FILE.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED BOTH FOR SENDING INFORMATION TO THIS
ROUTINE WHEN ^^KIND \\IS INPUT SET TO A VALUE LESS THAN 3, AND FOR
RETURNING INFORMATION TO THE CALLING PROGRAM WHEN ^^KIND \\IS
RETURNED SET TO 3. ^THE CONTENTS OF THIS ARRAY ARE RETURNED
UNCHANGED IF ^^KIND \\IS RETURNED SET TO A VALUE OTHER THAN 3. ^THE
CALLING PROGRAM MUST DEFINE THE CONTENTS OF THIS ARRAY BEFORE THIS
ROUTINE IS FIRST CALLED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KNDFLG#=#\\AN ARRAY DIMENSIONED AT 27 WHICH MUST INITIALLY
INDICATE THE OUTPUT FILE TYPES TO BE ASSOCIATED WITH EACH OF THE
SINGLE LETTER SWITCHES /^A THROUGH /^Z AND /' (OR LONE ')
RESPECTIVELY. ^IF THIS ROUTINE IS CALLED WITH ^^KIND \\SET TO 2 OR
LESS, THEN THIS ROUTINE REDEFINES THE ^^KNDFLG \\ARRAY TO CONTAIN
THE ABSOLUTE VALUES OF ITS ORIGINAL CONTENTS. ^IF THE CURRENT CALL
TO THIS ROUTINE BEGINS THE PROCESSING OF A NEW COMMAND SUCH THAT
^^KIND \\IS RETURNED CONTAINING THE VALUE 3, THEN THOSE LOCATIONS
WITHIN THE ^^KNDFLG \\ARRAY HAVING AS THEIR SUBSCRIPTS THE SERIAL
LOCATIONS WITHIN THE ALPHABET OF THE LETTERS WHICH ARE FOUND AS
SWITCHES (TAKING THE APOSTROPHE TO BE THE 27TH LETTER IN THE
ALPHABET) ARE THEN RETURNED CONTAINING THE NEGATIVES OF THEIR
ABSOLUTE VALUES. ^THE CONTENTS OF THE ^^KNDFLG \\ARRAY ARE RETURNED
UNCHANGED IF ^^KIND \\IS RETURNED SET TO 4 INDICATING THAT THE
CURRENT CALL TO THIS ROUTINE HAS CONTINUED THE PROCESSING OF A
COMMAND BEGUN BY A PREVIOUS CALL TO THIS ROUTINE.
.SKIP
^IF EITHER OF THE VALUES -1 OR 1 APPEAR IN THE ^^KNDFLG \\ARRAY
LOCATION HAVING AS ITS SUBSCRIPT THE SERIAL LOCATION WITHIN THE
ALPHABET OF THE LETTER WHICH IS USED AS A SWITCH APPEARING WITH AN
OUTPUT FILE SPECIFICATION, THEN THIS TYPE ONE OUTPUT FILE WILL BE
OPENED UPON THE UNIT NUMBER IDENTIFIED BY ^^ID1NUM, \\UPON THE
DEVICE SPECIFIED BY ^^ID1DVC \\IF NO DEVICE IS SPECIFIED BY THE
USER, AND WITH THE FILE NAME EXTENSION SPECIFIED BY ^^ID1EXT \\IF NO
EXTENSION IS SPECIFIED BY THE USER, AND ^^ID1OPN \\WILL BE RETURNED
SET TO 1. ^IF EITHER OF THE VALUES -2 OR 2 APPEAR IN THE ^^KNDFLG
\\ARRAY LOCATION HAVING AS ITS SUBSCRIPT THE SERIAL LOCATION WITHIN
THE ALPHABET OF THE LETTER WHICH IS USED AS A SWITCH APPEARING WITH
AN OUTPUT FILE SPECIFICATION, THEN THIS TYPE TWO OUTPUT FILE WILL BE
OPENED UPON THE UNIT NUMBER IDENTIFIED BY ^^ID2NUM, \\UPON THE
DEVICE SPECIFIED BY ^^ID2DVC \\IF NO DEVICE IS SPECIFIED BY THE
USER, AND WITH THE FILE NAME EXTENSION SPECIFIED BY ^^ID2EXT \\IF NO
EXTENSION IS SPECIFIED BY THE USER, AND ^^ID2OPN \\WILL BE RETURNED
SET TO 1. ^FOR EXAMPLE, IF EITHER /^C OR /C APPEAR WITH THE NAME OF
AN OUTPUT FILE AND IF ^^KNDFLG(3)=2 \\OR -2, THEN ^^KNDFLG(3) \\WILL
BE RETURNED CONTAINING -2 AND THIS OUTPUT FILE WILL BE OPENED UPON
THE UNIT IDENTIFIED BY ^^ID2NUM.
.SKIP
S\\WITCHES FOR WHICH THE CORRESPONDING LOCATIONS IN THE ^^KNDFLG
\\ARRAY CONTAIN THE VALUE ZERO CAUSE THE ROUTINE NAMED ^^HLPFIL \\TO
BE CALLED TO DISPLAY A HELP MESSAGE TO THE USER, THEN FORCE THE USER
TO SUPPLY A NEW SET OF FILE SPECIFICATIONS. ^FOR EXAMPLE,
^^KNDFLG(8) \\MIGHT CONTAIN THE VALUE ZERO SO THAT /^H WOULD
GENERATE THE HELP MESSAGE. ^^HLPFIL \\HAS AS ITS SINGLE ARGUMENT THE
TERMINAL UNIT NUMBER. ^THE ^^HLPFIL \\ROUTINE MUST BE SUPPLIED BY
THE CALLING PROGRAM.
.SKIP
^SWITCHES FOR WHICH THE CORRESPONDING LOCATIONS IN THE ^^KNDFLG
\\ARRAY DO NOT CONTAIN ONE OF THE VALUES -2 THROUGH 2 CAN APPEAR
WITH EITHER OUTPUT FILE SPECIFICATION OR WITH THE LEFTMOST INPUT
FILE SPECIFICATION BUT DO NOT IDENTIFY THE TYPE OF THE OUTPUT FILES.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR RETURNING INFORMATION TO
THE CALLING PROGRAM WHEN THE PROCESSING OF A NEW SET OF COMMANDS IS
BEING BEGUN BY THE CURRENT CALL TO THIS ROUTINE. ^THEIR INPUT VALUES
ARE RETURNED UNCHANGED IF ^^KIND \\IS RETURNED SET TO A VALUE OTHER
THAN 3.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^NUMFLG#=#\\AN ARRAY DIMENSIONED AT 27 WHICH IS USED FOR RETURNING
THE VALUES WHICH APPEARED WITH SEPARATING COLONS AFTER THE SWITCHES
IN THE FILE SPECIFICATIONS. ^THE ^^NUMFLG \\ARRAY LOCATIONS IN WHICH
THESE VALUES ARE RETURNED HAVE AS THEIR SUBSCRIPTS THE SERIAL
LOCATIONS WITHIN THE ALPHABET OF THE LETTERS WHICH ARE USED AS THE
SWITCHES. ^SUCH NUMBERS MUST BE SPECIFIED AS DECIMAL INTEGERS, BUT
CANNOT CONTAIN EXPONENTS. ^IF THE SWITCH /^C:123 APPEARS IN THE FILE
SPECIFICATION, THEN ^^KNDFLG(3) \\WILL BE RETURNED CONTAINING THE
NEGATIVE OF ITS ORIGINAL ABSOLUTE VALUE, AND ^^NUMFLG(3) \\WILL BE
RETURNED CONTAINING THE INTEGER VALUE 123. ^IF AN APOSTROPHE IS
FOUND WITH THE SET OF FILE SPECIFICATIONS, THEN ^^NUMFLG(27) \\IS
RETURNED CONTAINING THE NUMBER OF CHARACTERS WHICH APPEARED TO THE
RIGHT OF THE APOSTROPHE AND WHICH ARE RETURNED IN THE ^^LTRTTL
\\ARRAY.
.SKIP
.INDENT -9
^^LTRTTL#=#\\ARRAY IN WHICH THE CHARACTERS WHICH WERE FOUND TO THE
RIGHT OF A LEADING APOSTROPHE ARE RETURNED WITH 1 CHARACTER PER
ARRAY LOCATION AS READ BY A MULTIPLE OF AN ^A1 FORMAT. ^THE ^^LTRTTL
\\ARRAY MUST BE DIMENSIONED TO AT LEAST THE VALUE OF ^^MAXTTL. I\\F
SUCH TEXT IS FOUND TO THE RIGHT OF A LEADING APOSTROPHE, THEN
^^KNDFLG(27) \\IS RETURNED CONTAINING THE NEGATIVE OF ITS INITIAL
ABSOLUTE VALUE AND ^^NUMFLG(27) \\IS RETURNED CONTAINING THE NUMBER
OF CHARACTERS RETURNED IN THE ^^LTRTTL \\ARRAY. ^THE TERMINAL
APOSTROPHES ARE NEVER RETURNED IN THE ^^LTRTTL \\ARRAY AND ARE NOT
INCLUDED IN THE CHARACTER COUNT RETURNED IN ^^NUMFLG(27).
.SKIP
.INDENT -9
ID1OPN#=#0, \\RETURNED IF A TYPE ONE OUTPUT FILE WAS NOT OPENED.
.INDENT -2
=#1, RETURNED IF A TYPE ONE OUTPUT FILE WAS OPENED.
.SKIP
.INDENT -9
^^ID2OPN#=#0, \\RETURNED IF A TYPE TWO OUTPUT FILE WAS NOT OPENED.
.INDENT -2
=#1, RETURNED IF A TYPE TWO OUTPUT FILE WAS OPENED.
.LEFT MARGIN 0
.SKIP
^THE ^^OPNFIL \\ROUTINE IS LISTED BELOW. ^IT IS EXPECTED THAT THIS
ROUTINE WILL HAVE TO BE MODIFIED TO FIT THE PARTICULAR APPLICATION
FOR WHICH THIS ROUTINE IS USED.
.SKIP
.NOFILL
      ^^SUBROUTINE OPNFIL(  ITTY,  JTTY,KMDNUM,KMDDVC,KMDNAM,
     1    KMDEXT,ID1NUM,ID1DVC,ID1EXT,ID2NUM,ID2DVC,ID2EXT,
     2    ID3NUM,ID3DVC,ID3EXT,MAXTTL,MAXBFR,  KIND,KNDFLG,
     3    NUMFLG,LTRTTL,ID1OPN,ID2OPN,IBUFFR)
C     RENBR(/OPEN FILES FOR FILE,FILE=FILE,FILE COMMAND)
C
      COMMON/FASPY/NEWNUL(3),NEWDSK(3),NEWNAM(3),
     1NEWPTH(3,3),LCNRIT
      DIMENSION KNDFLG(27),NUMFLG(27),LTRTTL(MAXTTL),
     1IBUFFR(MAXBFR),LTRABC(27),LWRABC(27),LTRDGT(10),
     2INILTR(6),KNTLTR(6)
      DOUBLE PRECISION KMDNAM,NEWNAM,NEWPTH,PTHONE(3),
     1PTHTWO(3),PTHTHR(3),FILONE,FILTWO,FILTHR,FILNAM
      DATA LTRABC/1HA,1HB,1HC,1HD,1HE,1HF,1HG,1HH,1HI,1HJ,
     1            1HK,1HL,1HM,1HN,1HO,1HP,1HQ,1HR,1HS,1HT,
     2            1HU,1HV,1HW,1HX,1HY,1HZ,1H'/
      DATA LWRABC/1H\A,1H\B,1H\C,1H\D,1H\E,1H\F,1H\G,1H\H,1H\I,1H\J,
     1            1H\K,1H\L,1H\M,1H\N,1H\O,1H\P,1H\Q,1H\R,1H\S,1H\T,
     2            1H\U,1H\V,1H\W,1H\X,1H\Y,1H\Z,1H'/
      DATA LTRDGT/1H0,1H1,1H2,1H3,1H4,1H5,1H6,1H7,1H8,1H9/
      DATA LTRPLS,LTRMNS,IBLANK/1H+,1H-,5H     /
C
C     INITIALIZE STORAGE OF COMMAND
      INITAL=KIND-2
      IF(INITAL.GT.0)GO TO 4
      GO TO 2
    1 KIND=0
    2 ID1OPN=0
      ID2OPN=0
      DO 3 I=1,27
      IF(KNDFLG(I).LT.0)KNDFLG(I)=-KNDFLG(I)
    3 NUMFLG(I)=0
      KNDONE=0
      KNDTWO=0
      KNDTHR=0
C
C     GET NEXT COMPONENT OF COMMAND TYPED BY USER
    4 CALL GETFIL(3,ITTY,JTTY,KMDNUM,KMDDVC,
     1KMDNAM,KMDEXT,6,MAXBFR,KIND,NEWNUL,NEWDSK,
     2NEWNAM,NEWPTH,LCNRIT,IBUFFR,MAXFLG,INILTR,KNTLTR,
     3LCNOWN)
      GO TO(45,45,23,31,5),KIND
C
C     DECIDE WHICH SWITCH WAS GIVEN
    5 IF(MAXFLG.LE.0)GO TO 4
      IF(KNTLTR(1).LE.0)GO TO 4
      IF(INITAL.GT.0)GO TO 4
      LOCLTR=INILTR(1)
      LTRNOW=IBUFFR(LOCLTR)
      NEWFLG=0
    6 NEWFLG=NEWFLG+1
      IF(NEWFLG.GT.27)GO TO 4
      IF(LTRABC(NEWFLG).EQ.LTRNOW)GO TO 7
      IF(LWRABC(NEWFLG).NE.LTRNOW)GO TO 6
    7 IF(KNDFLG(NEWFLG).EQ.0)GO TO 35
      IF(KNDFLG(NEWFLG).GT.0)KNDFLG(NEWFLG)=-KNDFLG(NEWFLG)
      IF(KNDFLG(NEWFLG).EQ.-2)GO TO 11
      IF(KNDFLG(NEWFLG).NE.-1)GO TO 15
C
C     MARK THAT FILE BEARS TYPE ONE SWITCH
      ID1OPN=1
      GO TO(8,9,10),LCNOWN
    8 IF(KNDONE.EQ.1)GO TO 15
      IF(KNDONE.NE.3)KNDONE=KNDONE+1
      GO TO 15
    9 IF(KNDTWO.EQ.1)GO TO 15
      IF(KNDTWO.NE.3)KNDTWO=KNDTWO+1
      GO TO 15
   10 IF(KNDTHR.EQ.1)GO TO 15
      IF(KNDTHR.NE.3)KNDTHR=KNDTHR+1
      GO TO 15
C
C     MARK THAT FILE BEARS TYPE TWO SWITCH
   11 ID2OPN=1
      GO TO(12,13,14),LCNOWN
   12 IF(KNDONE.LE.1)KNDONE=KNDONE+2
      GO TO 15
   13 IF(KNDTWO.LE.1)KNDTWO=KNDTWO+2
      GO TO 15
   14 IF(KNDTHR.LE.1)KNDTHR=KNDTHR+2
C
C     STORE QUOTED TEXT STRING
   15 IVALUE=0
      IF(NEWFLG.LT.27)GO TO 17
      LMTLTR=LOCLTR+KNTLTR(1)
   16 IF(IVALUE.GE.MAXTTL)GO TO 22
      LOCLTR=LOCLTR+1
      IF(LOCLTR.GE.LMTLTR)GO TO 22
      IVALUE=IVALUE+1
      LTRTTL(IVALUE)=IBUFFR(LOCLTR)
      GO TO 16
C
C     EVALUATE NUMBERS IN RANGE OF SWITCH
   17 IF(MAXFLG.LE.1)GO TO 22
      IF(KNTLTR(2).LE.0)GO TO 22
      LOCLTR=INILTR(2)
      LMTLTR=LOCLTR+KNTLTR(2)
      I=0
      IF(IBUFFR(LOCLTR).EQ.LTRPLS)GO TO 18
      IF(IBUFFR(LOCLTR).NE.LTRMNS)GO TO 19
      I=1
   18 LOCLTR=LOCLTR+1
   19 IF(LOCLTR.GE.LMTLTR)GO TO 21
      LTRNOW=IBUFFR(LOCLTR)
      DO 20 L=1,10
      IF(LTRDGT(L).NE.LTRNOW)GO TO 20
      IVALUE=(10*IVALUE)+L-1
      GO TO 18
   20 CONTINUE
   21 IF(I.NE.0)IVALUE=-IVALUE
   22 NUMFLG(NEWFLG)=IVALUE
      GO TO 4
C
C     SET DEFAULT OUPUT DEVICE NAMES AND PATHS
   23 IF(NEWNUL(LCNRIT).LE.1)GO TO 38
      IF(NEWNUL(LCNRIT).EQ.4)GO TO 38
      IF(ID1OPN.EQ.ID2OPN)ID1OPN=1
      FILONE=NEWNAM(LCNRIT)
      FILTWO=FILONE
      MORONE=ID1EXT
      MORTWO=ID2EXT
      PTHONE(1)=0
      PTHTWO(1)=0
      LOCONE=ID1DVC
      LOCTWO=ID2DVC
      GO TO(31,24,25),LCNRIT
C
C     SINGLE FILE LEFT OF EQUAL SIGN
   24 IF(NEWNUL(1).EQ.0)GO TO 31
      IF(ID1OPN.EQ.ID2OPN)GO TO 36
      KNDONE=1
      KNDTWO=1
      GO TO 26
C
C     TWO FILES LEFT OF EQUAL SIGN
   25 IF(KNDONE.GE.3)GO TO 36
      IF(KNDTWO.GE.3)GO TO 36
      IF(KNDONE.EQ.KNDTWO)GO TO 36
      ID1OPN=1
      ID2OPN=1
      IF(KNDONE.EQ.0)KNDONE=3-KNDTWO
      IF(KNDTWO.EQ.0)KNDTWO=3-KNDONE
   26 IF(NEWNUL(KNDONE).EQ.0)GO TO 29
      IF(NEWDSK(KNDONE).NE.IBLANK)LOCONE=NEWDSK(KNDONE)
      DO 27 I=1,3
   27 PTHONE(I)=NEWPTH(I,KNDONE)
      IF(NEWNUL(KNDONE).LE.1)GO TO 29
      FILNAM=NEWNAM(KNDONE)
      IF(NEWNUL(KNDONE).LE.3)FILONE=FILNAM
      IF(NEWNUL(KNDONE).GE.3)DECODE(10,28,FILNAM)MORONE
   28 FORMAT(7X,1A3)
   29 IF(NEWNUL(KNDTWO).EQ.0)GO TO 31
      IF(NEWDSK(KNDTWO).NE.IBLANK)LOCTWO=NEWDSK(KNDTWO)
      DO 30 I=1,3
   30 PTHTWO(I)=NEWPTH(I,KNDTWO)
      IF(NEWNUL(KNDTWO).LE.1)GO TO 31
      FILNAM=NEWNAM(KNDTWO)
      IF(NEWNUL(KNDTWO).LE.3)FILTWO=FILNAM
      IF(NEWNUL(KNDTWO).GE.3)DECODE(10,28,FILNAM)MORTWO
C
C     OPEN INPUT FILE
   31 IF(NEWNUL(LCNRIT).EQ.0)GO TO 4
      FILTHR=NEWNAM(LCNRIT)
      MORTHR=ID3EXT
      IF(NEWNUL(LCNRIT).GE.3)DECODE(10,28,FILTHR)MORTHR
      LOCTHR=NEWDSK(LCNRIT)
      IF(LOCTHR.EQ.IBLANK)LOCTHR=ID3DVC
      DO 32 I=1,3
   32 PTHTHR(I)=NEWPTH(I,LCNRIT)
      ENCODE(10,33,FILNAM)FILTHR,MORTHR
   33 FORMAT(1A6,1H.,1A3)
      OPEN(UNIT=ID3NUM,FILE=FILNAM,DIRECTORY=PTHTHR,
     1DEVICE=LOCTHR,ACCESS='SEQIN',ERR=43)
      IF(INITAL.GT.0)GO TO 47
C
C     OPEN OUTPUT FILES
      IF(ID1OPN.EQ.0)GO TO 34
      ENCODE(10,33,FILNAM)FILONE,MORONE
      OPEN(UNIT=ID1NUM,FILE=FILNAM,DIRECTORY=PTHONE,
     1DEVICE=LOCONE,ACCESS='SEQOUT',ERR=40)
      IF(ID2OPN.EQ.0)GO TO 46
   34 ENCODE(10,33,FILNAM)FILTWO,MORTWO
      OPEN(UNIT=ID2NUM,FILE=FILNAM,DIRECTORY=PTHTWO,
     1DEVICE=LOCTWO,ACCESS='SEQOUT',ERR=42)
      GO TO 46
C
C     ISSUE HELP MESSAGE AND THEN CLEAR COMMAND IF ANY
   35 CALL HLPFIL(JTTY)
      GO TO 1
C
C     ERROR IN COMMAND TYPED BY USER
   36 WRITE(JTTY,37)
   37 FORMAT(31H AMBIGUOUS OUTPUT SPECIFICATION)
      GO TO 1
   38 WRITE(JTTY,39)
   39 FORMAT(34H 1ST SOURCE FILE MUST BE SPECIFIED)
      GO TO 1
   40 WRITE(JTTY,41)LOCONE,FILNAM
   41 FORMAT(26H CANNOT WRITE OUTPUT FILE ,1A5,1H:,1A10)
      GO TO 1
   42 WRITE(JTTY,41),LOCTWO,FILNAM
      GO TO 1
   43 WRITE(JTTY,44)LOCTHR,FILNAM
   44 FORMAT(25H CANNOT READ SOURCE FILE ,1A5,1H:,1A10)
      GO TO 4
C
C     RETURN TO CALLING PROGRAM
   45 IF(INITAL.LE.0)GO TO 2
      GO TO 47
   46 KIND=3
   47 RETURN
C024147266970'\\ABCDEFGHIJKLMNOPQRSTUVWXYZ:
      ^^END
.SKIP
.FILL
T\\HE FOLLOWING PROGRAM DEMONSTRATES THE MANNER IN WHICH THE
^^OPNFIL \\ROUTINE MIGHT BE CALLED.
.SKIP
.NOFILL
^^C     RENBR(TSTOPN/DEMONSTRATE OPNFIL ROUTINE)
      DOUBLE PRECISION KMDNAM
      DIMENSION IBUFFR(72),JBUFFR(72),KNDFLG(27),
     1NUMFLG(27),LTRTTL(30),LTRABC(26)
      DATA LTRABC/1HA,1HB,1HC,1HD,1HE,1HF,1HG,1HH,1HI,1HJ,
     1            1HK,1HL,1HM,1HN,1HO,1HP,1HQ,1HR,1HS,1HT,
     2            1HU,1HV,1HW,1HX,1HY,1HZ/
      DATA KMDDVC,KMDNAM,KMDEXT/3HDSK,6HOPNFIL,3HCCL/
      DATA ID1DVC,ID1EXT/3HDSK,3HONE/
      DATA ID2DVC,ID2EXT/3HDSK,3HTWO/
      DATA ID3DVC,ID3EXT/3HDSK,3HSRC/
      DATA MAXTTL,MAXBFR/30,72/
      DATA KMDNUM,ITTY,JTTY,ID1NUM,ID2NUM,ID3NUM/
     124,5,5,1,20,21/
C
C     DEFINE FILE TYPE ASSOCIATED WITH EACH FLAG
C     /H, /O, /T GIVE HELP, TYPE ONE, TYPE TWO RESPECTIVELY
C     NO OTHER LETTERS IMPLY ASSOCIATED FILE TYPES
      DO 1 I=1,27
    1 KNDFLG(I)=3
      KNDFLG(8)=0
      KNDFLG(15)=1
      KNDFLG(20)=2
      KIND=0
C
C     OPEN NEXT INPUT FILE
    2 CALL OPNFIL(ITTY,JTTY,KMDNUM,KMDDVC,KMDNAM,
     1KMDEXT,ID1NUM,ID1DVC,ID1EXT,ID2NUM,ID2DVC,ID2EXT,
     2ID3NUM,ID3DVC,ID3EXT,MAXTTL,MAXBFR,KIND,KNDFLG,
     3NUMFLG,LTRTTL,ID1OPN,ID2OPN,IBUFFR)
      GO TO(12,14,3,10),KIND
C
C     REPORT VALUES OF SWITCHES
    3 NEEDED=0
    4 NEEDED=NEEDED-1
      DO 6 INDEX=1,26
      IF(KNDFLG(INDEX).EQ.NEEDED)WRITE(JTTY,5)
     1LTRABC(INDEX),NUMFLG(INDEX)
    5 FORMAT(1X,1A1,I5)
    6 CONTINUE
      IF(NEEDED.GE.-2)GO TO 4
      J=NUMFLG(27)
      IF(J.GT.0)WRITE(JTTY,7)(LTRTTL(I),I=1,J)
    7 FORMAT(8H TITLE: ,30A1)
      IF(ID1OPN.NE.0)WRITE(JTTY,8)
    8 FORMAT(21H TYPE ONE OUTPUT FILE)
      IF(ID2OPN.NE.0)WRITE(JTTY,9)
    9 FORMAT(21H TYPE TWO OUTPUT FILE)
C
C     COPY INPUT FILE INTO OUTPUT FILES
   10 READ(ID3NUM,11,END=2)JBUFFR
   11 FORMAT(72A1)
      IF(ID1OPN.NE.0)WRITE(ID1NUM,11)JBUFFR
      IF(ID2OPN.NE.0)WRITE(ID2NUM,11)JBUFFR
      GO TO 10
C
C     END OF USER COMMAND FOUND
   12 WRITE(JTTY,13)
   13 FORMAT(' DONE')
      GO TO 16
   14 WRITE(JTTY,15)
   15 FORMAT(' SEMICOLON')
   16 IF(ID1OPN.NE.0)CLOSE(UNIT=ID1NUM)
      IF(ID2OPN.NE.0)CLOSE(UNIT=ID2NUM)
      GO TO 2
      END
      SUBROUTINE HLPFIL(JTTY)
      WRITE(JTTY,1)
    1 FORMAT(13H HELP MESSAGE)
      RETURN
      END
.SUBTITLE ^^DAHEFT, F\\REE ^FORMAT ^NUMERIC ^INPUT ^ROUTINE
.PAGE
.LEFT MARGIN 0
.RIGHT MARGIN 60
.SPACING 1
.NOFILL
 ^^DDDDD          AAA  HH    HH  EEEEEEEE  FFFFFFFF  TTTTTTTT
 DD   DD       AAAA  HH    HH  EE        FF           TT
 DD    DD     AA AA  HH    HH  EE        FF           TT
 DD    DD    AA  AA  HHHHHHHH  EEEEE     FFFFF        TT
 DD    DD   AAAAAAA  HH    HH  EE        FF           TT
 DD   DD   AA    AA  HH    HH  EE        FF           TT
 DDDDD    AA     AA  HH    HH  EEEEEEEE  FF           TT
.FILL
.SKIP 2
.CENTER
DAHEFT, F\\REE ^FORMAT ^NUMERIC ^INPUT ^ROUTINE
.CENTER
------##---- ------ ------- ----- -------
.SKIP
^^DAHEFT \\INTERPRETS AN ARRAY READ BY THE CALLING PROGRAM WITH A
MULTIPLE OF AN ^A1 FORMAT AND RETURNS THE VALUES CONTAINED IN THIS
ARRAY. ^NUMBERS INTERPRETED BY ^^DAHEFT \\CAN CONTAIN LEADING SIGN,
EMBEDDED DECIMAL POINT AND/OR TRAILING ^E WITH POSSIBLY SIGNED
EXPONENT. ^A PERCENT SIGN FOLLOWING THE NUMBER IMPLIES ^E-2,
TRAILING LETTER ^K IMPLIES ^E3 AND TRAILING LETTER ^M IMPLIES ^E6.
^TO BE RECOGNIZED AS PART OF A NUMBER, THE PERCENT SIGN OR LETTERS
^K OR ^M OR ^E MUST FOLLOW EITHER A SIGN OR A DIGIT OR A DECIMAL
POINT.
.SKIP
^IF A NUMBER CONTAINS NO VALUE DIGITS BUT DOES CONTAIN A SIGN OR
DECIMAL POINT, THEN THE VALUE IS TAKEN AS ZERO. ^IF THE LETTER ^E
APPEARS IN A NUMBER BUT NO DIGITS APPEAR TO THE RIGHT OF THE LETTER
^E, THEN THE VALUE OF THE EXPONENT IS TAKEN AS ZERO. ^TRAILING ^E,
^E0, ^E- AND ^E+ ARE THEREFORE EQUIVALENT TO MULTIPLICATION BY 10**0
OR 1.
.SKIP
^^DAHEFT \\CAN RETURN THE VALUE EITHER AS A REAL NUMBER OR AS AN
INTEGER. ^IF ONLY INTEGER VALUES ARE REQUIRED, THEN THE SHORTER
ROUTINE NAMED ^^DAIHFT \\CAN BE CALLED INSTEAD OF ^^DAHEFT \T\O
\\EVALUATE THE NUMBERS. ^^DAIHFT \\CAN EVALUATE INTEGER NUMBERS IN
THE FULL RANGE OF ^E, ^K AND ^M NOTATIONS, AND WILL ACCEPT PERCENT
SIGNS AND NEGATIVE EXPONENTS. ^AS AN EXAMPLE, ^^DAIHFT \\WOULD
RETURN THE INTEGER VALUE 123 AFTER EVALUATION OF ANY OF THE
FOLLOWING ALPHAMERIC REPRESENTATIONS.
.SKIP
.NOFILL
123.  12.3^^E+1  0.0123E4  0.123K  .000123M  12300%  +12300E-2
.FILL
.SKIP 2
.CENTER
T\H\E DAHEFT \\AND ^^DAIHFT A\\RGUMENT ^LISTS
.CENTER
--- ------ --- ------ -------- -----
.SKIP
^THE ARGUMENT LISTS OF ROUTINES ^^DAHEFT \\AND ^^DAIHFT \\ARE
.SKIP
.NOFILL
      ^^SUBROUTINE DAHEFT(KONTRL,ITRAIL,IEXTRA,IBUFFR,MAXBFR,
     1    LOWBFR,KIND  ,ISHIFT,JSHIFT,KSHIFT,LSHIFT,IVALUE,
     2    VALUE )
.SKIP
\\AND
.SKIP
      ^^SUBROUTINE DAIHFT(KONTRL,ITRAIL,IEXTRA,IBUFFR,MAXBFR,
     1    LOWBFR,KIND  ,ISHIFT,JSHIFT,KSHIFT,LSHIFT,IVALUE)
.SKIP
\\BOTH WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR)
.FILL
.SKIP
T\\HE ARGUMENT LISTS OF THE 2 ROUTINES ARE IDENTICAL EXCEPT THAT THE
^^DAHEFT \\ARGUMENT ^^VALUE \\DOES NOT APPEAR IN THE ^^DAIHFT
\\ARGUMENT LIST. ^SINCE ^^DAIHFT \\CANNOT EVALUATE REAL NUMBERS,
^^DAIHFT \\EVALUATES DECIMAL INTEGERS IF ^^KONTRL \\IS INPUT GREATER
THAN OR EQUAL TO ZERO.
.SKIP
^THE FOLLOWING ARGUMENTS ARE USED FOR INPUT AND ARE RETURNED
UNCHANGED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KONTRL#=#1 \\OR GREATER, THE ITEM IN THE ^^IBUFFR \\ARRAY
REPRESENTS A REAL NUMBER. ^IF POSSIBLE, THE REAL NUMBER WILL BE
ACCUMULATED AS AN INTEGER, THEN BE CONVERTED TO A REAL NUMBER AND
SHIFTED IF NECESSARY. ^^KONTRL \\IS THEN THE MAXIMUM NUMBER OF
DIGITS IN THE INTEGER. ^THE VALUE IS OUTPUT AS THE ARGUMENT ^^VALUE.
I\\F THE ITEM HAS MORE THAN ^^KONTRL \\DIGITS (NOT COUNTING LEFTMOST
ZEROES), THEN THE ENTIRE EVALUATION IS DONE AS A REAL NUMBER. ^THE
ADVANTAGE OF CALCULATING THE REAL VALUES IN INTEGER AS LONG AS THE
PRECISION OF THE COMPUTER IS NOT OVERFLOWED IS THAT THE CALCULATION
OF THE PORTION OF THE NUMBER RIGHT OF THE DECIMAL POINT IS MORE
EXACT. ^AS AN EXAMPLE, IF ^^KONTRL \\IS GREATER THAN OR EQUAL TO 4,
THEN THE NUMBER 33.33 CAN BE STORED AS THE INTEGER 3333, THEN BE
CONVERTED TO THE REAL VALUE 3333.0 AND DIVIDED BY 100.0 TO OBTAIN
THE FINAL ANSWER. ^IF IT MAKES NO DIFFERENCE WHETHER THE NUMBER
TYPED AS 33.33 HAS VALUE 33.33 OR 33.32999... THEN ^^KONTRL \\CAN BE
GIVEN THE VALUE 1.
.INDENT -2
=#0, THE ITEM IN THE ^^IBUFFR \\ARRAY IS THE REPRESENTATION OF A
DECIMAL INTEGER. ^THE NUMBER CAN BE TYPED WITH A DECIMAL POINT (FOR
EXAMPLE 1.23^K OR 1.23^E3 EQUALS 1230), BUT IS STORED AS AN INTEGER
IN ^^DAHEFT, \\AND IS OUTPUT AS ARGUMENT ^^IVALUE. A\\NY DECIMAL
INTEGER WHICH THE COMPUTER CAN REPRESENT CAN BE EVALUATED. ^THIS
INCLUDES, ON TWOS COMPLEMENT COMPUTERS, THE LARGEST NEGATIVE NUMBER
THE ABSOLUTE VALUE OF WHICH CANNOT BE STORED. ^ON THE ^^PDP-10, \A
36 \\BIT COMPUTER WITH TWOS COMPLEMENT NOTATION, THE RANGE OF
DECIMAL INTEGERS IS -34359738368 THROUGH 34359738367 (OCTAL NOTATION
OF BIT PATTERNS BEING 400000000000 THROUGH 377777777777).
.INDENT -2
=#-1, THE ITEM IN THE ^^IBUFFR \\ARRAY IS THE REPRESENTATION OF AN
OCTAL INTEGER. ^THE NUMBER CAN BE TYPED WITH A DECIMAL POINT AND/OR
WITH AN EXPONENT. ^HOWEVER, THE NUMBER FOLLOWING THE LETTER ^E OF
THE EXPONENT IS EVALUATED IN DECIMAL. ^THE VALUE OF THE OCTAL NUMBER
IS RETURNED AS THE ARGUMENT ^^IVALUE. I\\T MUST BE NOTED THAT
NUMBERS EVALUATED AS NEGATIVE OCTAL INTEGERS HAVE THE NEGATIVE OCTAL
INTEGER AS THEIR VALUE, NOT AS THEIR BIT REPRESENTATION IN COMPUTER
STORAGE. ^FOR EXAMPLE, ON A 36 BIT TWOS COMPLEMENT COMPUTER, THE
OCTAL NUMBER -400000000000 (WHICH COULD ALSO BE TYPED AS -4^E11 OR
-4^E+11 WHERE THE 11 AFTER THE ^E IS IN DECIMAL) IS REPRESENTED AS
THE BIT PATTERN HAVING THE OCTAL NOTATION 400000000000 AND THE OCTAL
NUMBER -377777777777 IS REPRESENTED BY THE BIT PATTERN 400000000001.
.INDENT -2
=#-2, DO NOT EVALUATE NUMBERS. ^^LOWBFR \\WILL BE RETURNED POINTING
TO THE LEFTMOST PRINTING CHARACTER IN THE BUFFER, OR WILL BE
RETURNED POINTING BEYOND THE RIGHT END OF THE BUFFER IF THE BUFFER
CONTAINS NO PRINTING CHARACTERS.
.SKIP
.INDENT -9
^^ITRAIL#=#\\SELECTS WHETHER EXPONENTS ARE TO BE RECOGNIZED. ^IF
NOT, THEN EACH NUMBER WILL TERMINATE PRIOR TO THE EXPONENT, AND
^^LOWBFR \\WILL BE RETURNED POINTING TO THE LETTER STARTING THE
EXPONENT. ^THE SUBSEQUENT CALL TO THIS ROUTINE WILL RETURN ^^KIND=2
\\INDICATING THAT AN ILLEGAL CHARACTER HAS BEEN FOUND IF THE CALLING
PROGRAM DOES NOT FIRST INCREMENT THE VALUE OF ^^LOWBFR.
.SKIP
.INDENT -2
=#-1, \\EXPONENTS EXPRESSED IN ^E NOTATION ARE TO BE RECOGNIZED IF
AND ONLY IF PRECEDED EITHER BY A DIGIT, A DECIMAL POINT OR BY A PLUS
OR MINUS SIGN. ^THE RETURNED VALUE WILL ALREADY HAVE BEEN MULTIPLIED
BY THE RADIX RAISED TO THE INDICATED POWER. ^THE PERCENT SIGN AND
THE LETTERS ^K AND ^M ARE TO BE TREATED THE SAME AS ANY OTHER
ALPHABETIC CHARACTER.
.INDENT -2
=#0, NO EXPONENTS ARE TO BE RECOGNIZED. ^NUMBERS WILL BE TERMINATED
PRIOR TO PERCENT SIGNS OR TO THE LETTERS ^E OR ^K OR ^M.
.INDENT -2
=#1, PERCENT SIGNS, THE LETTERS ^K AND ^M, AND EXPONENTS EXPRESSED
IN ^E NOTATION, ARE ALL TO BE RECOGNIZED IF AND ONLY IF PRECEDED
EITHER BY A DIGIT, A DECIMAL POINT OR BY A PLUS OR MINUS SIGN. ^THE
RETURNED VALUE WILL ALREADY HAVE BEEN MULTIPLIED BY THE RADIX RAISED
TO THE INDICATED POWER.
.SKIP
.INDENT -9
^^IEXTRA#=#\\AN EXTRA SHIFT, STATED AS THE POWER OF THE RADIX (THE
RADIX BEING 8 IF ^^KONTRL \\IS -1, AND 10 OTHERWISE), WHICH IS
ALWAYS TO BE APPLIED TO THE EVALUATED NUMBER (REGARDLESS OF THE
VALUE OF ^^ITRAIL) \\BEFORE THE EVALUATED NUMBER IS RETURNED TO THE
CALLING PROGRAM. ^FOR EXAMPLE, ^^IEXTRA=2 \\WOULD RETURN THE NUMBER
OF CENTS CORRESPONDING TO A DOLLAR PRICE SPECIFIED BY THE CONTENTS
OF THE INPUT TEXT BUFFER. ^THE SHIFT SPECIFIED BY ^^IEXTRA \\DOES
NOT CHANGE THE RETURNED VALUES OF ^^ISHIFT, JSHIFT, KSHIFT \O\R
LHSIFT \\WHICH REFLECT THE SHIFTS SPECIFIED BY THE CONTENTS OF THE
INPUT TEXT BUFFER.
.SKIP
.INDENT -9
^^IBUFFR#=#\\INPUT BUFFER ARRAY CONTAINING CHARACTERS TYPED BY USER,
READ BY A MULTIPLE OF AN ^A1 FORMAT, WHICH IS TO BE SEARCHED FOR
NUMBERS. ^^IBUFFR \\THEN CONTAINS 1 CHARACTER PER COMPUTER STORAGE
LOCATION.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE FINAL (RIGHTMOST) LOCATION IN THE
^^IBUFFR \\ARRAY WHICH CAN BE SEARCHED FOR A NUMBER.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT MUST BE SET BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS FIRST CALLED, AND THEN IS RETURNED BY THIS ROUTINE
DESCRIBING THE LOCATION OF THE FIRST CHARACTER IN THE INPUT BUFFER
NOT YET PROCESSED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LOWBFR#=#\\SUBSCRIPT WITHIN THE ^^IBUFFR \\ARRAY OF THE FIRST
(LEFTMOST) CHARACTER WHICH CAN BE SCANNED FOR THE REPRESENTATION OF
NUMBERS. ^IF A NUMBER IS FOUND, THEN ^^LOWBFR \\WILL BE RETURNED
POINTING TO THE FIRST CHARACTER BEYOND THE NUMBER WHICH COULD NOT BE
PART OF THE NUMBER. ^IF A NUMBER IS NOT FOUND, THEN ^^LOWBFR \\WILL
BE RETURNED POINTING TO THE FIRST PRINTING CHARACTER (WHICH WOULD
HAVE TO BE A CHARACTER OTHER THAN A PLUS SIGN OR A MINUS SIGN OR A
DECIMAL POINT OR A DIGIT THROUGH 7 IF OCTAL OR THROUGH 9 IF
DECIMAL), OR BEYOND THE END OF THE BUFFER IF THE BUFFER DOES NOT
CONTAIN ANY PRINTING CHARACTERS AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR). LOWBFR \\MUST BE SET BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS FIRST CALLED TO PROCESS THE CONTENTS OF THE BUFFER,
AND SHOULD NOT BE CHANGED BY THE CALLING PROGRAM IF THIS ROUTINE
LOCATES A NUMBER. ^IF A PRINTING CHARACTER IS FOUND WHICH CANNOT
START A NUMBER, THEN THE CONTENTS OF THE BUFFER SHOULD BE PROCESSED
BY SOME OTHER ^^FASP \\ROUTINE, OR AT LEAST THE CALLING PROGRAM
SHOULD INCREMENT THE VALUE OF ^^LOWBFR \\BY 1 BEFORE AGAIN CALLING
THIS ROUTINE.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED FOR RETURNING INFORMATION TO THE
CALLING PROGRAM. ^THEIR INPUT VALUES ARE IGNORED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KIND###=#\\RETURNED DESCRIBING THE KIND OF ITEM LOCATED IN THE
^^IBUFFR \\ARRAY.
.INDENT -2
=#1, NO PRINTING CHARACTER WAS FOUND AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR). LOWBFR \\IS RETURNED POINTING BEYOND THE END OF
THE ^^IBUFFR \\ARRAY. ^THE CALLING PROGRAM SHOULD READ A NEW LINE
INTO THE ^^IBUFFR \\ARRAY AND RESET ^^LOWBFR \\TO POINT TO THE FIRST
CHARACTER IN THIS ARRAY.
.INDENT -2
=#2, A NUMBER WAS NOT FOUND, BUT A PRINTING CHARACTER WHICH CANNOT
START A NUMBER WAS FOUND AT OR TO THE RIGHT OF ^^IBUFFR(LOWBFR).
LOWBFR \\WILL BE RETURNED POINTING TO THE PRINTING CHARACTER. ^THE
CALLING PROGRAM MUST INCREMENT THE VALUE OF ^^LOWBFR \\BEFORE AGAIN
CALLING THIS ROUTINE SINCE SUPPLYING THE SAME INITIAL CHARACTER
WOULD PRODUCE IDENTICAL RESULTS. ^^VALUE \O\R IVALUE, \\WHICHEVER IS
APPROPRIATE, IS RETURNED WITH THE VALUE ZERO (EVEN IF ^^ITRAIL \I\S
\\IN THE RANGE -13 TO -7 AS DESCRIBED LATER IN THIS DOCUMENTATION),
SO ^^KIND=2 \\CAN BE CONSIDERED EQUIVALENT TO ^^KIND=3 \\IF SUCH IS
APPROPRIATE TO THE APPLICATION FOR WHICH ^^DAHEFT \\IS BEING USED.
.INDENT -2
=#3, A NUMBER WAS FOUND. ^^LOWBFR \\IS RETURNED POINTING TO THE
CHARACTER TO THE RIGHT OF THE REPRESENTATION OF THE NUMBER. ^IF
^^ITRAIL=0 \\AND THE NUMBER IS FOLLOWED BY A PERCENT SIGN OR THE
LETTERS ^K, ^M OR ^E, OR IF ^^ITRAIL \\IS EQUAL TO -1 AND THE NUMBER
IS FOLLOWED BY A PERCENT SIGN OR THE LETTERS ^K OR ^M, THEN ^^LOWBFR
\\WILL BE RETURNED POINTING TO THIS PRINTING CHARACTER AND NO
EXPONENT WILL BE EVALUATED.
.SKIP
.INDENT -9
^^ISHIFT#=#\I\F KIND \\IS RETURNED CONTAINING 3, THEN ^^ISHIFT \I\S
\\RETURNED DESCRIBING WHICH OF THE CHARACTERS ^E, %, ^K OR ^M, IF
ANY, APPEARED IN THE NUMBER SPECIFICATION. ^IF ^^KIND \\IS RETURNED
CONTAINING A VALUE OTHER THAN 3, THEN ^^ISHIFT, JSHIFT, KSHIFT \\AND
^^LSHIFT \\ARE ALL RETURNED UNDEFINED BUT PROBABLY CHANGED.
.INDENT -2
=#-4, THE NUMBER WAS FOLLOWED BY THE LETTER ^E, BUT NEITHER SIGN NOR
DIGITS APPEARED IN THE EXPONENT. ^^JSHIFT \\IS RETURNED ZEROED. ^NO
EXPONENT OTHER THAN THAT SPECIFIED BY ^^IEXTRA \\HAS BEEN APPLIED TO
THE RETURNED VALUE (PROVIDING THAT ^^ITRAIL \\IS NOT IN THE RANGE
-13 TO -7 AS DESCRIBED LATER IN THIS DOCUMENTATION).
.INDENT -2
=#-3, THE NUMBER WAS FOLLOWED BY THE LETTER ^E AND THEN BY A MINUS
SIGN, BUT NO DIGITS APPEARED IN THE EXPONENT. ^^JSHIFT \\IS RETURNED
ZEROED. ^NO EXPONENT OTHER THAN THAT SPECIFIED BY ^^IEXTRA \\HAS
BEEN APPLIED TO THE RETURNED VALUE (PROVIDING THAT ^^ITRAIL \\IS NOT
IN THE RANGE -13 TO -7 AS DESCRIBED LATER IN THIS DOCUMENTATION).
.INDENT -2
=#-2, THE NUMBER WAS FOLLOWED BY THE LETTER ^E AND THEN BY A PLUS
SIGN, BUT NO DIGITS APPEARED IN THE EXPONENT. ^^JSHIFT \\IS RETURNED
ZEROED. ^NO EXPONENT OTHER THAN THAT SPECIFIED BY ^^IEXTRA \\HAS
BEEN APPLIED TO THE RETURNED VALUE (PROVIDING THAT ^^ITRAIL \\IS NOT
IN THE RANGE -13 TO -7 AS DESCRIBED LATER IN THIS DOCUMENTATION).
.INDENT -2
=#-1, THE NUMBER WAS FOLLOWED BY THE LETTER ^E AND THEN BY THE
NUMBER WHICH IS RETURNED AS THE VALUE OF ^^JSHIFT.
.INDENT -2
=#0, \\RETURNED IF NONE OF THE CHARACTERS ^E, %, ^K OR ^M FOLLOW THE
NUMBER. ^^JSHIFT \\IS RETURNED CONTAINING 0.
.INDENT -2
=#1, THE NUMBER WAS FOLLOWED BY A PERCENT SIGN. ^^JSHIFT \I\S
\\RETURNED CONTAINING -2.
.INDENT -2
=#2, THE NUMBER WAS FOLLOWED BY THE LETTER ^^K. JSHIFT \\IS RETURNED
CONTAINING 3.
.INDENT -2
=#3, THE NUMBER WAS FOLLOWED BY THE LETTER ^^M. JSHIFT \\IS RETURNED
CONTAINING 6.
.SKIP
.INDENT -9
^^JSHIFT#=#\I\F KIND \\IS RETURNED CONTAINING 3, THEN ^^JSHIFT \I\S
\\RETURNED CONTAINING THE VALUE OF THE EXPONENT EVALUATED AT THE
RIGHT END OF THE NUMBER REPRESENTATION. ^^JSHIFT \\IS THE SHIFT
STATED AS THE POWER OF THE RADIX. ^IF THE LETTER ^E FOLLOWS THE
NUMBER, THEN ^^JSHIFT \\IS THE NUMBER APPEARING TO THE RIGHT OF THE
LETTER ^E, OR IS RETURNED CONTAINING ZERO IF NO DIGITS WERE FOUND TO
THE RIGHT OF THE LETTER ^E. ^IF ONE OF THE CHARACTERS %, ^K OR ^M
FOLLOW THE NUMBER, THEN ^^JSHIFT \\IS RETURNED CONTAINING -2, 3 AND
6 RESPECTIVELY. ^THE RETURNED VALUE OF ^^JSHIFT \\IS INDEPENDENT OF
THE INPUT VALUE OF ^^IEXTRA. JSHIFT \\IS RETURNED UNDEFINED BUT
PROBABLY CHANGED IF ^^KIND \\IS RETURNED CONTAINING A VALUE OTHER
THAN 3.
.SKIP
.INDENT -9
^^KSHIFT#=#\I\F KIND \\IS RETURNED CONTAINING 3, THEN ^^KSHIFT \I\S
\\RETURNED DESCRIBING THE PRECISION OF THE LEAST SIGNIFICANT DIGIT
SPECIFIED BY THE CONTENTS OF THE INPUT TEXT BUFFER. ^^KSHIFT \I\S
\\THE POWER OF THE RADIX WHICH IF USED AS THE SHIFT WOULD RESULT IN
THE SAME VALUE IF THE SAME DIGITS WHERE FOUND BUT WITHOUT A DECIMAL
POINT. ^^KSHIFT \\WOULD BE RETURNED CONTAINING -2 IF THE INPUT TEXT
BUFFER CONTAINS 12.34 SINCE THIS COULD HAVE BEEN WRITTEN AS 1234^E-2
INSTEAD. ^^A KSHIFT \\VALUE OF -2 WOULD INDICATE THAT THE TENTHS AND
HUNDREDTHS DIGITS WERE SPECIFIED. ^IF THE INPUT TEXT BUFFER CONTAINS
12.34^K THEN ^^KSHIFT \\WOULD BE RETURNED CONTAINING 1 SINCE THIS
COULD BE WRITTEN AS 1234^E1 INSTEAD. ^^A KSHIFT \\VALUE OF 1 WOULD
INDICATE THAT THE ONES (UNITS) DIGIT WAS NOT SPECIFIED. ^THE
RETURNED VALUE OF ^^KSHIFT \\IS INDEPENDENT OF THE INPUT VALUE OF
^^IEXTRA. KSHIFT \\IS RETURNED UNDEFINED BUT PROBABLY CHANGED IF
^^KIND \\IS RETURNED CONTAINING A VALUE OTHER THAN 3.
.SKIP
.INDENT -9
^^LSHIFT#=#\\RETURNED SPECIFYING THE NUMBER OF DIGITS WHICH WERE
FOUND COUNTING THE LEFTMOST NON-ZERO DIGIT AND ALL DIGITS WHICH WERE
SPECIFIED TO ITS RIGHT. ^^LSHIFT \\IS RETURNED UNDEFINED BUT
PROBABLY CHANGED IF ^^KIND \\IS RETURNED CONTAINING A VALUE OTHER
THAN 3.
.INDENT -2
=#-4, THE NUMBER REPRESENTATION CONTAINED NEITHER LEADING SIGN NOR
DECIMAL POINT NOR VALUE DIGITS. ^IN ORDER FOR THIS VALUE OF ^^LSHIFT
\\TO BE RETURNED, ^^ITRAIL \\WOULD HAVE TO HAVE A VALUE OTHER THAN
-11, -10, -9, -1, 0, 1, 9, 10 OR 11 AS DESCRIBED LATER IN THIS
DOCUMENTATION, AND THE FIRST PRINTING CHARACTERS IN THE TEXT BUFFER
WOULD HAVE TO FORM THE REPRESENTATION OF AN EXPONENT. ^^VALUE \O\R
IVALUE, \\WHICHEVER IS APPROPRIATE, IS RETURNED CONTAINING ZERO
(PROVIDING THAT ^^ITRAIL \\IS NOT IN THE RANGE -13 TO -7).
.INDENT -2
=#-3, THE NUMBER REPRESENTATION BEGAN WITH A MINUS SIGN BUT
CONTAINED NO VALUE DIGITS. ^^VALUE \O\R IVALUE, \\WHICHEVER IS
APPROPRIATE, IS RETURNED CONTAINING ZERO (PROVIDING THAT ^^ITRAIL
\\IS NOT IN THE RANGE -13 TO -7).
.INDENT -2
=#-2, THE NUMBER REPRESENTATION BEGAN WITH A PLUS SIGN BUT CONTAINED
NO VALUE DIGITS. ^^VALUE \O\R IVALUE, \\WHICHEVER IS APPROPRIATE, IS
RETURNED CONTAINING ZERO (PROVIDING THAT ^^ITRAIL \\IS NOT IN THE
RANGE -13 TO -7).
.INDENT -2
=#-1, THE NUMBER REPRESENTATION BEGAN WITH A DECIMAL POINT BUT
CONTAINED NO VALUE DIGITS. ^^VALUE \O\R IVALUE, \\WHICHEVER IS
APPROPRIATE, IS RETURNED CONTAINING ZERO (PROVIDING THAT ^^ITRAIL
\\IS NOT IN THE RANGE -13 TO -7).
.INDENT -2
=#0, ONE OR MORE ZERO VALUE DIGITS WERE FOUND, BUT THE NUMBER
REPRESENTATION CONTAINED NO VALUE DIGITS OTHER THAN ZERO. ^THE
NUMBER REPRESENTATION MAY OR MAY NOT HAVE CONTAINED EITHER SIGN OR
DECIMAL POINT.
.INDENT -2
=#GREATER THAN ZERO, ^^LSHIFT \\IS THE NUMBER OF DIGITS WHICH WERE
SPECIFIED IN THE INPUT TEXT BUFFER, COUNTING THE LEFTMOST NON-ZERO
VALUE DIGIT AND ALL VALUE DIGITS WHICH WERE SPECIFIED TO ITS RIGHT.
^^LSHIFT \\IS THE NUMBER OF SIGNIFICANT DIGITS WHICH WERE EVALUATED
AND IS INDEPENDENT OF THE LOCATION OF THE DECIMAL POINT OR THE VALUE
OF THE EXPONENT OR OF ^^IEXTRA. IF KONTRL \\IS LESS THAN OR EQUAL TO
ZERO SO THAT THE VALUE IS RETURNED AS THE INTEGER ^^IVALUE, \\THEN
THOSE DIGITS WHICH ARE DISCARDED DUE TO THEIR BEING TO THE RIGHT OF
ADJUSTED DECIMAL POINT (AFTER APPLICATION OF ^^IEXTRA \\AND OF THE
EXPONENT INDICATED IN THE NUMBER REPRESENTATION) ARE STILL INCLUDED
WITHIN THE VALUE OF ^^LSHIFT.
.SKIP
.INDENT -9
IVALUE#=#\\RETURNED WITH THE VALUE OF THE EVALUATED NUMBER IF
^^KONTRL \\IS LESS THAN OR EQUAL TO ZERO. ^NOTE THAT IF ^^KONTRL
\\IS LESS THAN OR EQUAL TO ZERO, THEN THE ORIGINAL CONTENT OF
^^IVALUE \\IS ALWAYS DESTROYED. ^IN PARTICULAR, IF ^^KONTRL \I\S
\\LESS THAN OR EQUAL TO ZERO AND IF ^^KIND \\IS RETURNED NOT EQUAL
TO 3 THEN ^^IVALUE \\WILL BE ZEROED.
.SKIP
.INDENT -9
^^VALUE##=#\\RETURNED WITH THE VALUE OF THE EVALUATED NUMBER IF
^^KONTRL \\IS GREATER THAN ZERO. ^NOTE THAT IF ^^KONTRL \\IS GREATER
THAN ZERO, THEN THE ORIGINAL CONTENT OF ^^VALUE \\IS ALWAYS
DESTROYED. ^IN PARTICULAR, IF ^^KONTRL \\IS GREATER THAN ZERO AND IF
^^KIND \\IS RETURNED NOT EQUAL TO 3 THEN ^^VALUE \\WILL BE ZEROED.
.PAGE
.LEFT MARGIN 0
.RIGHT MARGIN 60
.CENTER
^AN ^EXAMPLE OF THE ^USE OF ^^DAHEFT
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE FOLLOWING SAMPLE SUBROUTINE READS A REQUESTED NUMBER OF REAL
VALUES. ^ADDITIONAL LINES ARE READ UNTIL THE REQUESTED NUMBER OF
VALUES HAS BEEN OBTAINED. ^INPUT LINES WHICH DO NOT CONTAIN NUMBERS
ARE IGNORED. ^THE ROUTINE DOES NOT RETURN TO THE CALLING PROGRAM
UNTIL THE REQUESTED NUMBER OF ITEMS HAS BEEN READ.
.SKIP
^THE ARGUMENTS OF THE SAMPLE ROUTINE ARE AS FOLLOW
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^IUNIT##=#\\THE NUMBER OF THE INPUT UNIT FROM WHICH THE VALUES ARE
TO BE READ.
.SKIP
.INDENT -9
^^IWANT##=#\\THE NUMBER OF VALUES TO BE READ.
.SKIP
.INDENT -9
^^VALUE##=#\\THE ARRAY INTO WHICH THE FLOATING POINT VALUES ARE TO
BE STORED.
.SKIP
.LEFT MARGIN 0
.NOFILL
      ^^SUBROUTINE READIN(IUNIT,IWANT,VALUE)
      DIMENSION IBUFFR(100),VALUE(IWANT)
      IF(IWANT.LE.0)GO TO 4
      IHAVE=1
    1 READ(IUNIT,2)IBUFFR
    2 FORMAT(100A1)
      LOWBFR=1
    3 CALL DAHEFT(7,1,0,IBUFFR,100,LOWBFR,KIND,ISHIFT,
     1JSHIFT,KSHIFT,LSHIFT,IVALUE,VALUE(IHAVE))
      IF(KIND.EQ.1)GO TO 1
      IF(KIND.EQ.2)LOWBFR=LOWBFR+1
      IF(KIND.EQ.3)IHAVE=IHAVE+1
      IF(IHAVE.LE.IWANT)GO TO 3
    4 RETURN
      END
.SKIP 3
.TEST PAGE 5
.LEFT MARGIN 0
.NOFILL
R\\ECOGNITION OF ^LEADING ^EXPONENTS AND ^CHANGING ^DEFAULT ^VALUES
----------- -- ------- --------- --- -------- ------- ------
.FILL
.SKIP
^IN ADDITION TO ITS FUNCTION OF SELECTING WHETHER TRAILING PERCENT
SIGNS AND THE LETTERS ^K, ^M AND ^E ARE TO BE RECOGNIZED, ^^ITRAIL
\\CAN ENABLE THE RECOGNITION OF EXPONENTS WHICH ARE NOT PRECEDED BY
VALUE SPECIFICATIONS, AND CAN CHANGE THE DEFAULT VALUE USED WHEN NO
VALUE IS SPECIFIED TO BE ONE RATHER THAN ZERO. ^^ITRAIL \\VALUES OF
-1, 0 AND 1 HAVE BEEN DESCRIBED PREVIOUSLY, AND ENABLE THE
RECOGNITION OF TRAILING ^E'S, OF NO EXPONENTS WHATEVER, AND OF
TRAILING EXPONENTS OF ALL SORTS, RESPECTIVELY. ^^ITRAIL \\VALUES OF
-3, -2, 2 AND 3 AS DESCRIBED BELOW ALLOW EXPONENTS TO BE RECOGNIZED
EVEN IF NOT PRECEDED BY A SIGN, DECIMAL POINT OR DIGIT. ^THE VALUE
ZERO IS ALWAYS RETURNED BY THIS ROUTINE IF NO VALUE DIGITS ARE
ENCOUNTERED AND ^^ITRAIL \\IS IN THE RANGE -3 THROUGH 3 (OR IN THE
RANGE 7 THROUGH 13). ^^ITRAIL \\VALUES OF -2 AND 2 WILL ALLOW THE
EVALUATION OF EITHER A NUMBER POSSIBLY CONTAINING A TRAILING
EXPONENT, OR OF AN EXPONENT APPEARING BY ITSELF WITHOUT A LEADING
VALUE REPRESENTATION. ^^ITRAIL \\VALUES -3 AND 3 ACCEPT ONLY AN
EXPONENT WITHOUT LEADING VALUE REPRESENTATION. ^IF ^^ITRAIL \\HAS
EITHER OF THE VALUES -3 OR 3 AND A LEADING SIGN OR DIGIT OR DECIMAL
POINT IS ENCOUNTERED, THEN ^^KIND \\IS RETURNED CONTAINING 2 TO
INDICATE AN UNKNOWN CHARACTER.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^ITRAIL#=#-3, \\ONLY EXPONENTS SPECIFIED AS THE LETTER ^E FOLLOWED
BY A POSSIBLY SIGNED NUMBER ARE TO BE RECOGNIZED. ^LEADING SIGN,
DIGITS OR DECIMAL POINT ARE NOT ALLOWED. ^THE VALUE ZERO IS ALWAYS
RETURNED.
.INDENT -2
=#-2, SAME AS ^^ITRAIL=-1, \\EXCEPT THAT IN ADDITION, LEADING
EXPONENTS SPECIFIED AS THE LETTER ^E FOLLOWED BY POSSIBLE SIGNED
NUMBERS ARE ALLOWED. ^THE VALUE ZERO IS RETURNED IF THE LETTER ^E IS
FOUND NOT PRECEDED BY ANY VALUE DIGITS.
.INDENT -2
=#2, SAME AS ^^ITRAIL=1, \\EXCEPT THAT IN ADDITION LEADING EXPONENTS
SPECIFIED BY PERCENT SIGNS OR THE LETTERS ^K OR ^M, AND LEADING
EXPONENTS SPECIFIED AS THE LETTER ^E FOLLOWED BY A POSSIBLY SIGNED
NUMBER ARE ALLOWED. ^THE VALUE ZERO IS RETURNED IF THE PERCENT SIGN
OR THE LETTERS ^K, ^M OR ^E ARE NOT PRECEDED BY ANY VALUE DIGITS.
.INDENT -2
=#3, ONLY EXPONENTS SPECIFIED AS THE PERCENT SIGN OR THE LETTERS ^K
OR ^M, OR SPECIFIED AS THE LETTER ^E FOLLOWED BY A POSSIBLE SIGNED
NUMBER ARE TO BE RECOGNIZED. ^LEADING SIGN, DIGITS OR DECIMAL POINT
ARE NOT ALLOWED. ^THE VALUE ZERO IS ALWAYS RETURNED.
.SKIP
.LEFT MARGIN 0
^^ITRAIL \\VALUES OF -13 THROUGH -7 EVALUATE THE SAME SEQUENCES OF
CHARACTERS AS ^^ITRAIL \\VALUES OF -3 THROUGH 3 RESPECTIVELY, EXCEPT
THAT IF NO VALUE DIGITS ARE FOUND FOR ^^ITRAIL \\VALUES OF -13
THROUGH -7, THEN THE VALUE IS ASSUMED TO BE ONE RATHER THAN ZERO
BEFORE THIS VALUE IS NEGATED AND/OR SHIFTED BY THE AMOUNT INDICATED
BY THE EXPONENT IF NECESSARY, AND EXCEPT THAT IF THE LETTER ^E IS
FOUND BUT NOT FOLLOWED BY ANY DIGITS, THEN THE SINGLE EXPONENT DIGIT
1 IS SIMILARLY ASSUMED. ^FOR ^^ITRAIL \\VALUES OF -9, -8 OR -7
(1-10, 2-10 AND 3-10 RESPECTIVELY), THE NUMBER REPRESENTATION -^K
WOULD BE EQUIVALENT TO -1^K HAVING THE VALUE -1000, AND -^E WOULD BE
THE SAME AS -1^E1 HAVING THE VALUE -10.
.SKIP
^^ITRAIL \\VALUES OF 7 THROUGH 13 EVALUATE THE SAME SEQUENCES OF
CHARACTERS AS ^^ITRAIL \\VALUES OF -3 THROUGH 3 RESPECTIVELY, EXCEPT
THAT THE ^^ITRAIL \\VALUES OF 7 THROUGH 13 RETURN THE EVALUATED
NUMBER AS THOUGH NEITHER AN EXPONENT NOR THE DECIMAL POINT HAD BEEN
INCLUDED, ALTHOUGH THE LOCATION OF THE DECIMAL POINT AND THE VALUE
OF THE EXPONENT ARE IDENTIFIED TO THE CALLING PROGRAM. ^THE RETURNED
VALUE WILL HAVE BEEN MULTIPLIED BY THE RADIX RAISED TO THE POWER
INDICATED BY ^^IEXTRA. ITRAIL \\BEING SET TO 9 (-1+10) WOULD, FOR
EXAMPLE, ALLOW AN ^E EXPONENT IN THE NUMBER, BUT WOULD RETURN THE
VALUE AS THOUGH NEITHER EXPONENT NOR DECIMAL POINT HAD BEEN FOUND.
^SINCE NEITHER ^^ITRAIL \\VALUES OF -3 NOR 3 ALLOW A LEADING NUMBER
ANYWAY, ^^ITRAIL=-3 \\IS EQUIVALENT TO ^^ITRAIL=7, \\AND ^^ITRAIL=3
\\IS EQUIVALENT TO ^^ITRAIL=13. I\\F ANY OF THE VALUES OF 7 THROUGH
13 ARE USED FOR ^^ITRAIL, \\THEN THE VALUE INDICATED BY THE FULL
COMBINATION OF VALUE DIGITS, DECIMAL POINT AND/OR EXPONENT CAN BE
OBTAINED AS EITHER ^^VALUE*\\RADIX**^^KSHIFT \O\R
IVALUE*\\RADIX**^^KSHIFT (\\WHERE THE RADIX IS 8 IF ^^KONTRL \I\S -1
\\AND 10 OTHERWISE, AND WHERE ** INDICATES EXPONENTIATION),
WHICHEVER IS APPROPRIATE. ^THE VALUE INDICATED BY THE DIGITS AND/OR
DECIMAL POINT BUT IGNORING THE EXPONENT CAN SIMILARLY BE OBTAINED AS
EITHER ^^VALUE*\\RADIX**(^^KSHIFT-JSHIFT) \O\R
IVALUE*\\RADIX**(^^KSHIFT-JSHIFT).
.SKIP
.LEFT MARGIN 0
T\\HE TABLE BELOW PRESENTS THE VALUES WHICH WOULD BE RETURNED WHEN
THE NUMBER REPRESENTATIONS SHOWN ALONG THE TOP ARE EVALUATED USING
THE ^^ITRAIL \\VALUES APPEARING ALONG THE LEFT EDGE. ^BLANK ENTRIES
IN THE TABLE INDICATE THAT SOME PORTION OF THE REPRESENTATION COULD
NOT BE EVALUATED USING THE CORRESPONDING VALUE OF ^^ITRAIL. F\O\R
\\EXAMPLE, ^^ITRAIL=0 \\DOES NOT ALLOW THE RECOGNITION OF ANY
EXPONENTS SO, ALTHOUGH THE NUMBER REPRESENTATION 1.23^K WOULD BE
EVALUATED FOR ^^ITRAIL=0 \\AS THE NUMBER 1.23 FOLLOWED BY THE
UNKNOWN CHARACTER ^K, THE ENTRY FOR THIS IS LEFT OUT OF THE TABLE.
.SKIP
.NOFILL
.LEFT MARGIN 0
.TEST PAGE 25
     1.23 12.3 1.23^^K 1.23E3 1.23E 1.23E-  E2   E  E-  -E -E-
     -------------------------------------------------------
-13                                      100  10  .1
-12  1.23 12.3         1230  12.3   .123 100  10  .1 -10 -.1
-11  1.23 12.3         1230  12.3   .123             -10 -.1
-10  1.23 12.3
 -9  1.23 12.3  1230   1230  12.3   .123             -10 -.1
 -8  1.23 12.3  1230   1230  12.3   .123 100  10  .1 -10 -.1
 -7                                      100  10  .1
     -------------------------------------------------------
 -3                                        0   0   0
 -2  1.23 12.3         1230  1.23   1.23   0   0   0   0   0
 -1  1.23 12.3         1230  1.23   1.23               0   0
  0  1.23 12.3
  1  1.23 12.3  1230   1230  1.23   1.23               0   0
  2  1.23 12.3  1230   1230  1.23   1.23   0   0   0   0   0
  3                                        0   0   0
     -------------------------------------------------------
  7                                        0   0   0
  8   123  123          123   123    123   0   0   0   0   0
  9   123  123          123   123    123               0   0
 10   123  123
 11   123  123   123    123   123    123               0   0
 12   123  123   123    123   123    123   0   0   0   0   0
 13                                        0   0   0
.FILL
.FILL
.LEFT MARGIN 0
.SKIP 3
.NOFILL
.CENTER
DAMISS, E\\XTENDS ^^DAHEFT \T\O A\\LLOW ^COMMENTS AND ^MISSING ^NUMBERS
.CENTER
------##------- ------ -- ----- -------- --- ------- -------
.FILL
.SKIP
^IF THE FIRST PRINTING CHARACTER FOUND BY ^^DAHEFT \\IN THE LINE OF
INPUT TEXT IS NOT A DIGIT, MINUS SIGN, PLUS SIGN OR PERIOD (AND
CANNOT BEGIN AN EXPONENT SPECIFICATION IF ^^ITRAIL= \\HAS A VALUE
OTHER THAN -11, -10, -9, -1, 0, 1, 9, 10 OR 11), THEN THE CHARACTER
IS CONSIDERED TO BE UNKNOWN CAUSING ^^DAHEFT \\TO RETURN CONTROL TO
THE CALLING PROGRAM. ^IN PARTICULAR, ^^DAHEFT \\DOES NOT RECOGNIZE
THE PUNCTUATION CHARACTERS ALLOWED BY MANY OF THE OTHER ROUTINES IN
THE ^^FORTRAN A\\LPHAMERIC ^SUBROUTINE ^PACKAGE. ^^DAMISS, \\A SHORT
SUBROUTINE WHICH CALLS UPON ^^DAHEFT \\FOR NUMERIC EVALUATION,
ALLOWS COMMAS BETWEEN NUMBERS, IDENTIFIES MISSING ITEMS INDICATED BY
EXTRA COMMAS, SKIPS OVER ANY TEXT WHICH IS TO THE RIGHT OF EITHER AN
EXCLAMATION POINT OR AN AMPERSAND, AND REPORTS ANY SEMICOLONS FOUND
IN THE TEXT BEING EVALUATED. ^ALTHOUGH ^^DAMISS \\CHECKS THE
CHARACTER TO THE RIGHT OF THE NUMBER TO INSURE THAT THIS CHARACTER
IS ONE OF THE ALLOWED PUNCTUATION MARKS OR ELSE IS EITHER A SPACE OR
A TAB CHARACTER, THE FINDING OF SOME OTHER CHARACTER TO THE RIGHT OF
THE NUMBER MIGHT NOT ACTUALLY BE AN ERROR SINCE THE NUMBER MIGHT BE
EVALUATED AGAIN BY A ROUTINE SUCH AS ^^DASPAN \O\R DATREK \\WHICH
ALLOW ADDITIONAL CHARACTERS TO CONTINUE THE REPRESENTATION.
.SKIP
.TEST PAGE 9
^THE ARGUMENT LIST OF ROUTINE ^^DAMISS \I\S
.SKIP
.NOFILL
      SUBROUTINE DAMISS(KONTRL,ITRAIL,IEXTRA,IBUFFR,MAXBFR,
     1    LOWBFR,KIND  ,ISHIFT,JSHIFT,KSHIFT,LSHIFT,IVALUE,
     2    VALUE ,MANY  ,LCNBFR,LCNERR)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE ARGUMENT LISTS OF ^^DAMISS \\AND ^^DAHEFT \\ARE IDENTICAL
EXCEPT FOR THE ^^DAMISS \\ARGUMENTS ^^MANY, LCNBFR \\AND ^^LCNERR
\\WHICH DO NOT APPEAR IN THE ^^DAHEFT \\ARGUMENT LIST, AND EXCEPT
THAT ^^DAMISS \\CAN RETURN THE ARGUMENT NAMED ^^KIND \\CONTAINING
THE ADDITIONAL VALUES 4, 5, 6 AND 7. ^THE ARGUMENT NAMED ^^MANY
\\MUST BE SET TO ZERO BY THE CALLING PROGRAM BEFORE CALLING EITHER
THIS ROUTINE OR ANY OF THE OTHER ROUTINES IN THE ^^FASP \\PACKAGE
(SUCH AS ^^DANEXT, DASPAN \\AND ^^DALOSS) \\WHICH DEFINE THIS
ARGUMENT IN A SIMILAR MANNER. ^THE ARGUMENTS NAMED ^^KIND, LCNBFR
\\AND ^^LCNERR \\ARE USED ONLY FOR OUTPUT TO THE CALLING PROGRAM AND
THEIR INPUT VALUES ARE IGNORED. ^THESE ARGUMENTS ARE DESCRIBED
BELOW. ^THE DOCUMENTATION OF ^^DAHEFT \\SHOULD BE CONSULTED FOR
DESCRIPTIONS OF THE REMAINING ARGUMENTS.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KIND###=#1, \\NOTHING, EXCEPT PERHAPS A COMMENT INDICATED BY A
LEADING EXCLAMATION POINT, WAS FOUND AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR). T\\HE CALLING PROGRAM SHOULD READ A NEW LINE INTO
THE ^^IBUFFR \\ARRAY BEFORE AGAIN CALLING THIS ROUTINE IF ADDITIONAL
VALUES ARE REQUIRED. ^^LOWBFR \\IS RETURNED POINTING BEYOND THE END
OF THE BUFFER. ^^MANY \\IS RETURNED SET TO ZERO. ^^IVALUE \\AND
^^VALUE \\ARE RETURNED UNDEFINED.
.INDENT -2
=#2, THE FIRST PRINTING CHARACTER (OTHER THAN A POSSIBLE COMMA IF
^^MANY \\WAS INPUT GREATER THAN ZERO) IN OR TO RIGHT OF
^^IBUFFR(LOWBFR) \\WAS NOT A CHARACTER WHICH COULD BEGIN THE
REPRESENTATION OF A NUMBER AND WAS NOT A COMMA, SEMICOLON, AMPERSAND
OR EXCLAMATION POINT. ^^LOWBFR \\IS RETURNED POINTING TO THIS
PRINTING CHARACTER. ^IT IS EXPECTED THAT THE CALLING PROGRAM WILL
OTHERWISE PROCESS THIS PRINTING CHARACTER SINCE ^^DAMISS \\WOULD
RETURN THE SAME RESULTS IF CALLED AGAIN WITH THE SAME VALUE OF
^^LOWBFR \\AND WITH THE SAME BUFFER CONTENTS. ^^MANY \\IS RETURNED
CONTAINING ONE PLUS ITS INPUT ABSOLUTE VALUE. ^^IVALUE \\AND ^^VALUE
\\ARE RETURNED UNDEFINED.
.INDENT -2
=#3, A NUMBER WAS FOUND WHICH EXTENDED THROUGH THE END OF THE BUFFER
OR WHICH WAS FOLLOWED BY A SPACE, A TAB CHARACTER, A SEMICOLON, AN
EXCLAMATION POINT OR AN AMPERSAND. ^THE VALUE OF THE NUMBER IS
RETURNED IN EITHER ^^VALUE \O\R IVALUE, \\WHICHEVER IS APPROPRIATE,
AND ^^ISHIFT, JSHIFT, KSHIFT \\AND ^^LSHIFT \\ARE RETURNED
DESCRIBING THE REPRESENTATION OF THE NUMBER. ^^MANY \\IS RETURNED
CONTAINING ONE PLUS ITS INPUT ABSOLUTE VALUE. ^^LOWBFR \\IS RETURNED
POINTING TO THE CHARACTER TO THE RIGHT OF THE NUMBER REPRESENTATION.
.INDENT -2
=#4, A NUMBER WAS FOLLOWED BY A PRINTING CHARACTER OTHER THAN A
COMMA, A SEMICOLON, AN EXCLAMATION POINT OR AN AMPERSAND. ^THE VALUE
OF THE NUMBER IS RETURNED IN EITHER ^^VALUE \O\R IVALUE, \\WHICHEVER
IS APPROPRIATE, AND ^^ISHIFT, JSHIFT, KSHIFT \\AND ^^LSHIFT \\ARE
RETURNED DESCRIBING THE REPRESENTATION OF THE NUMBER. ^^LCNBFR \I\S
\\RETURNED POINTING IN THE BUFFER TO THE FIRST CHARACTER OF THE
NUMBER. ^^LOWBFR \\IS RETURNED POINTING IN THE BUFFER TO THE
CHARACTER TO THE RIGHT OF THE NUMBER. ^^LCNERR \\IS RETURNED
POINTING IN THE BUFFER TO THE NEXT SPACE, TAB CHARACTER, COMMA,
SEMICOLON, EXCLAMATION POINT OR AMPERSAND TO THE RIGHT OF THE
NUMBER, OR IS RETURNED POINTING BEYOND THE END OF THE BUFFER IF NO
SPACE, TAB CHARACTER, COMMA, SEMICOLON, EXCLAMATION POINT OR
AMPERSAND IS FOUND TO THE RIGHT OF THE NUMBER. ^^MANY \I\S
\\RETURNED CONTAINING ONE PLUS ITS INPUT ABSOLUTE VALUE.
.SKIP
^^KIND \\WILL BE RETURNED SET TO 4 IF ONE NUMBER IMMEDIATELY FOLLOWS
ANOTHER AS IN 18-36 (18 FOLLOWED BY -36) OR IN 12.34.56 (WHICH MIGHT
BE INTERPRETED AS 12.34 FOLLOWED BY .56). ^IF IMMEDIATELY ADJACENT
NUMBERS ARE TO BE ALLOWED, THEN ^^KIND=4 \\SHOULD BE CONSIDERED TO
BE EQUIVALENT TO ^^KIND=3. I\\F THE CHARACTER IN ^^IBUFFR(LOWBFR),
\\WHERE ^^LOWBFR \\IS THE RETURNED NOT INPUT VALUE, DOES NOT ITSELF
START A NUMBER, THEN THE SUBSEQUENT CALL TO ^^DAMISS \\WILL RETURN
^^KIND=2.
.INDENT -2
=#5, \\A SEMICOLON WAS FOUND AS THE FIRST PRINTING CHARACTER AT OR
TO THE RIGHT OF ^^IBUFFR(LOWBFR). LOWBFR \\IS RETURNED POINTING TO
THE NEXT CHARACTER BEYOND THE SEMICOLON. ^IT IS ASSUMED THAT THE
CALLING PROGRAM WILL TREAT THE APPEARANCE OF THE SEMICOLON AS
MARKING THE END OF A STATEMENT. ^^MANY \\IS RETURNED SET TO ZERO.
^^IVALUE \\AND ^^VALUE \\ARE RETURNED UNDEFINED.
.INDENT -2
=#6, AN AMPERSAND WAS FOUND AS THE FIRST PRINTING CHARACTER AT OR TO
THE RIGHT OF ^^LOWBFR. T\\HE TEXT TO THE RIGHT OF THE AMPERSAND IS
TAKEN AS A COMMENT SO ^^LOWBFR \\IS RETURNED POINTING BEYOND THE
RIGHT END OF THE BUFFER. ^IT IS ASSUMED THAT THE CALLING PROGRAM
WILL READ IN THE CONTENTS OF A NEW BUFFER, THEN AGAIN REQUEST A NEW
NUMBER EVALUATION FROM THIS ROUTINE. ^THE VALUE OF ^^MANY \\MUST NOT
BE CHANGED BY THE CALLING PROGRAM PRIOR TO THIS FOLLOWING CALL. ^THE
EFFECT IS NOT QUITE THE SAME AS IF THE USER HAD TYPED ALL OF THE
TEXT ON A SINGLE LINE SINCE A SINGLE NUMBER CANNOT BE SPLIT ACROSS A
LINE BOUNDARY. ^^IVALUE \\AND ^^VALUE \\ARE RETURNED UNDEFINED.
.INDENT -2
=#7, A NUMBER WAS NOT FOUND, BUT AN EXTRA COMMA WAS FOUND INDICATING
A MISSING NUMBER. ^^MANY \\IS RETURNED CONTAINING ONE PLUS ITS INPUT
ABSOLUTE VALUE. ^^IVALUE \O\R VALUE, \\WHICHEVER IS APPROPRIATE, IS
RETURNED SET TO ZERO. ^^ISHIFT, JSHIFT, KSHIFT \\AND ^^LSHIFT \\ARE
RETURNED UNDEFINED.
.SKIP
.INDENT -9
^^MANY###=#\\SHOULD BE INPUT CONTAINING ZERO EACH TIME THIS ROUTINE
IS CALLED TO BEGIN PROCESSING OF A NEW LOGICAL SECTION OF TEXT, AS
FOR EXAMPLE WHEN BEGINNING PROCESSING OF A LINE OF TEXT NOT TIED TO
THE PREVIOUS LINE BY AN AMPERSAND AT THE END OF THE PREVIOUS LINE,
OR WHEN PROCESSING THE TEXT TO THE RIGHT OF A SEMICOLON. ^THE
INITIAL ZEROING OF THIS ARGUMENT MUST BE DONE BY THE CALLING
PROGRAM, BUT THEREAFTER THE VALUE RETURNED BY THE PREVIOUS CALL TO
THIS ROUTINE CAN USUALLY BE USED. ^^MANY \\IS RETURNED SET TO ZERO
EACH TIME A SEMICOLON (^^KIND=5) \\IS FOUND, AND EACH TIME AN END OF
LINE NOT TIED TO THE FOLLOWING LINE BY AN AMPERSAND (^^KIND=1) \I\S
\\FOUND. ^^MANY \\IS RETURNED CONTAINING ONE PLUS ITS INPUT ABSOLUTE
VALUE EACH TIME A NUMBER IS FOUND, EACH TIME AN UNKNOWN CHARACTER IS
FOUND, OR EACH TIME AN INDICATION OF A MISSING NUMBER IS FOUND.
^^KIND \\IS RETURNED CONTAINING THE VALUE 6 AND ^^MANY \\IS RETURNED
CONTAINING THE NEGATIVE OF THE NUMBER OF ITEMS FOUND IF THE NEXT
PRINTING CHARACTER FOLLOWING A COMMA IS AN AMPERSAND. ^^MANY
\\SHOULD NOT BE CHANGED BY THE CALLING PROGRAM IF AN AMPERSAND
(^^KIND \\BEING RETURNED=6) IS FOUND INDICATING THAT THE SUBSEQUENT
CALL TO THIS ROUTINE IS TO PROCESS TEXT WHICH IS TO BE TREATED AS
THOUGH IT APPEARED IN PLACE OF THE AMPERSAND AND THE CHARACTERS TO
ITS RIGHT. ^THE EFFECT IS NOT QUITE THE SAME AS IF THE USER HAD
TYPED ALL OF THE TEXT ON A SINGLE LINE SINCE A SINGLE NUMBER CANNOT
BE SPLIT ACROSS THE LINE BOUNDARY.
.SKIP
^IF ^^MANY \\IS INPUT CONTAINING ZERO, THEN AN INITIAL COMMA IN THE
INPUT TEXT BUFFER IS TAKEN TO INDICATE AN INITIAL MISSING ITEM, AND
^^MANY \\IS THEN RETURNED CONTAINING 1. ^IF ^^MANY \\IS INPUT
GREATER THAN ZERO, THEN AN INITIAL COMMA IS IGNORED IF FOLLOWED BY A
NUMBER. ^IF ^^MANY \\IS INPUT GREATER THAN ZERO, THEN AN INITIAL
COMMA FOLLOWED BY NO OTHER PRINTING CHARACTERS, BY A SEMICOLON, OR
BY AN EXCLAMATION POINT INDICATES A MISSING ITEM. ^IF ^^MANY \I\S
\\INPUT GREATER THAN ZERO, THEN AN INITIAL COMMA FOLLOWED BY AN
AMPERSAND WILL CAUSE THE REMAINING CHARACTERS IN THE BUFFER TO BE
IGNORED, AND ^^MANY \\WILL BE RETURNED CONTAINING THE NEGATIVE OF
ITS INPUT VALUE. ^IF ^^MANY \\IS INPUT NEGATIVE, THEN IT IS ASSUMED
THAT THE CONTENTS OF THE CURRENT BUFFER CONTINUE A PREVIOUS LINE
WHICH TERMINATED WITH A COMMA FOLLOWED BY AN AMPERSAND, AND ^^MANY
\\IS RETURNED GREATER THAN ZERO.
.SKIP
.INDENT -9
^^LCNBFR#=#\\IF A NUMBER REPRESENTATION IS FOUND, ^^KIND \\BEING
RETURNED CONTAINING EITHER 3 OR 4, THEN ^^LCNBFR \\IS RETURNED
CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION WHICH
CONTAINS THE FIRST (LEFTMOST) CHARACTER OF THE NUMBER REPRESENTATION.
.SKIP
^IF THE FIRST PRINTING CHARACTER AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR) \\CANNOT BEGIN A NUMBER AND IS NOT ONE OF THE
ALLOWED PUNCTUATION MARKS SO THAT ^^KIND \\IS RETURNED CONTAINING 2,
THEN ^^LCNBFR \\AND ^^LOWBFR \\ARE BOTH RETURNED POINTING TO THE
UNEXPECTED CHARACTER AND ^^LCNERR \\IS RETURNED POINTING TO THE
FOLLOWING SPACE, TAB CHARACTER, COMMA, SEMICOLON, EXCLAMATION POINT
OR AMPERSAND.
.SKIP
.INDENT -9
^^LCNERR#=#\\IF A NUMBER REPRESENTATION IS FOUND, ^^KIND \\BEING
RETURNED CONTAINING EITHER 3 OR 4, THEN ^^LCNERR \\IS RETURNED
CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION WHICH
CONTAINS THE NEXT SPACE, TAB CHARACTER, COMMA, SEMICOLON,
EXCLAMATION POINT OR AMPERSAND TO THE RIGHT OF THE NUMBER
REPRESENTATION OR ELSE ^^LCNERR \\IS RETURNED CONTAINING ^^MAXBFR+1
\\IF NONE OF THESE CHARACTERS APPEAR ANYWHERE TO THE RIGHT OF THE
NUMBER REPRESENTATION. ^IF ^^KIND \\IS RETURNED CONTAINING 3, THEN
^^LCNERR \\AND ^^LOWBFR \\ARE BOTH RETURNED POINTING TO THE
CHARACTER TO THE IMMEDIATE RIGHT OF THE NUMBER REPRESENTATION. ^IF
^^KIND \\IS RETURNED CONTAINING 4, THEN ^^LOWBFR \\IS RETURNED
POINTING TO THE UNEXPECTED PRINTING CHARACTER TO THE IMMEDIATE RIGHT
OF THE NUMBER REPRESENTATION.
.SKIP
^IF ^^KIND \\IS RETURNED CONTAINING 2, INDICATING THAT A PRINTING
CHARACTER WHICH COULD NOT BEGIN A NUMBER AND WHICH WAS NOT ONE OF
THE ALLOWED PUNCTUATION MARKS WAS FOUND, THEN ^^LCNERR \\IS RETURNED
POINTING TO THE NEXT SPACE, TAB CHARACTER, COMMA, SEMICOLON,
EXCLAMATION POINT OR AMPERSAND, OR ELSE ^^LCNERR \\IS RETURNED
CONTAINING ^^MAXBFR+1 \\IF NONE OF THESE CHARACTERS APPEAR ANYWHERE
TO THE RIGHT OF THE INITIAL UNEXPECTED CHARACTER.
.LEFT MARGIN 0
.SKIP 2
.TEST PAGE 5
.CENTER
^DEMONSTRATION ^PROGRAM TO ^INTERACTIVELY ^TEST ^^DAHEFT
.CENTER
------------- ------- -- ------------- ---- ------
.SKIP
T\\HE PROGRAM LISTED ON THE FOLLOWING PAGES ACCEPTS A LINE OF TEXT
FROM THE USER, THEN REPORTS EACH VALUE ENCOUNTERED IN THE TEXT FOR
ALL REQUESTED VALUES OF ^^ITRAIL, \\TOGETHER WITH THE PORTION OF THE
TEXT WHICH HAS JUST BEEN EVALUATED. ^THE VALUES OF ^^ITRAIL \\WHICH
GIVE IDENTICAL RESULTS ARE LISTED TOGETHER IN PARENTHESES TO THE
RIGHT OF THE RETURNED VALUE OR TO THE RIGHT OF THE ^^EMPTY (KIND=1)
\O\R UNKNOWN (KIND=2) \\CONDITION DESCRIPTIONS. ^IF A NUMBER HAS
BEEN EVALUATED (^^KIND=3), \\THEN THE VALUES OF ^^ISHIFT, JSHIFT,
KSHIFT \\AND ^^LSHIFT \\ARE ALSO REPORTED TO THE RIGHT OF THE
^^ITRAIL \\VALUES. ^THE TYPING OF A COMPLETELY EMPTY LINE ALLOWS THE
THE RESPECIFICATION OF WHETHER ^^DAHEFT \O\R DAIHFT \\IS BEING
TESTED, OF THE VALUES OF THE ARGUMENTS ^^KONTRL \\AND ^^IEXTRA,
\\AND OF ANOTHER GROUP OF VALUES OF ^^ITRAIL \\TO BE TESTED.
.SKIP
.NOFILL
^^C     PROGRAM TO DEMONSTRATE DAHEFT AND DAIHFT ROUTINES
      DIMENSION IBUFFR(58),JBUFFR(72),LOCATE(20),NEEDED(20),
     1          KNDSAV(20),ISHSAV(20),JSHSAV(20),KSHSAV(20),
     2          LSHSAV(20),VALSAV(20),IVASAV(20), IDENT(20),
     3           ITEST(20),IEMPTY( 5),IUNKNO( 8)
      DATA ILEFT,IRIGHT,ILESS,IGREAT,IYES,IBLANK/
     11H(,1H),1H<,1H>,1HY,1H /
      DATA IEMPTY/1HE,1HM,1HP,1HT,1HY/
      DATA IUNKNO/1HU,1HN,1HK,1HN,1HO,1HW,1HN,1H /
      DATA ITTY,JTTY/5,5/
C
C     MAXBFR = NUMBER OF LOCATIONS IN IBUFFR
C     MAXSHO = NUMBER OF LOCATIONS IN JBUFFR
C     LIMIT  = MAXIMUM NUMBER OF ITRAIL VALUES TO TEST
      DATA MAXBFR,MAXSHO,LIMIT/58,72,20/
C
C     GET VALUES OF KONTRL AND IEXTRA
    1 WRITE(JTTY,2)
    2 FORMAT(22H TEST DAIHFT (Y OR N) ,$)
      READ(ITTY,3)IANS
    3 FORMAT(1A1)
      WRITE(JTTY,4)
    4 FORMAT(15H KONTRL,IEXTRA ,$)
      READ(ITTY,5)KONTRL,IEXTRA
    5 FORMAT(3I)
      IWHICH=KONTRL
      IF(IANS.EQ.IYES)IWHICH=0
      WRITE(JTTY,6)
    6 FORMAT(26H TEST WHICH ITRAIL VALUES ,$)
      READ(ITTY,7)ITEST
    7 FORMAT(20I)
      MAXTRL=LIMIT
    8 IF(ITEST(MAXTRL).NE.0)GO TO 10
      MAXTRL=MAXTRL-1
      IF(MAXTRL.GT.0)GO TO 8
      GO TO 1
C
C     GET NEXT TEXT BUFFER TO BE EVALUATED
    9 IF(INITAL.EQ.1)GO TO 1
   10 WRITE(JTTY,11)
   11 FORMAT(2H *,$)
      READ(ITTY,12)IBUFFR
   12 FORMAT(72A1)
      DO 13 I=1,MAXTRL
   13 LOCATE(I)=1
      INITAL=1
      GO TO 19
C
C     GET NEXT ITEM IN TEXT BUFFER AND STORE DESCRIPTION
   14 IF(LOWBFR.GT.MAXBFR)GO TO 9
      INITAL=LOWBFR
   15 ITRAIL=ITEST(JTRAIL)
      IF(IANS.EQ.IYES)GO TO 16
      CALL DAHEFT(KONTRL,ITRAIL,IEXTRA,IBUFFR,MAXBFR,
     1LOWBFR,KIND,ISHIFT,JSHIFT,KSHIFT,LSHIFT,IVALUE,
     2VALUE)
      GO TO 17
   16 CALL DAIHFT(KONTRL,ITRAIL,IEXTRA,IBUFFR,MAXBFR,
     1LOWBFR,KIND,ISHIFT,JSHIFT,KSHIFT,LSHIFT,IVALUE)
   17 IF(KIND.EQ.2)LOWBFR=LOWBFR+1
      LOCATE(JTRAIL)=LOWBFR
      NEEDED(JTRAIL)=1
      KNDSAV(JTRAIL)=KIND
      IF(KIND.NE.3)GO TO 19
      ISHSAV(JTRAIL)=ISHIFT
      JSHSAV(JTRAIL)=JSHIFT
      KSHSAV(JTRAIL)=KSHIFT
      LSHSAV(JTRAIL)=LSHIFT
      IF(IWHICH.LE.0)GO TO 18
      VALSAV(JTRAIL)=VALUE
      GO TO 19
   18 IVASAV(JTRAIL)=IVALUE
C
C     SEARCH FOR NEXT VALUE OF ITRAIL TO BE USED
   19 LOWBFR=MAXBFR+1
      DO 20 I=1,MAXTRL
      IF(LOWBFR.LE.LOCATE(I))GO TO 20
      LOWBFR=LOCATE(I)
      JTRAIL=I
   20 CONTINUE
      IF(INITAL.EQ.LOWBFR)GO TO 15
C
C     REPORT RESULTS IF ALL VALUES OF ITRAIL DONE
      ISEEN=INITAL-1
   21 LEAST=MAXBFR+1
      DO 22 I=1,MAXTRL
      IF(NEEDED(I).EQ.0)GO TO 22
      IF(LEAST.LT.LOCATE(I))GO TO 22
      LEAST=LOCATE(I)-1
      INDEX=I
   22 CONTINUE
      IF(LEAST.GT.MAXBFR)GO TO 14
      NEEDED(INDEX)=0
      ISAME=1
      IDENT(1)=ITEST(INDEX)
      DO 25 I=INDEX,MAXTRL
      IF(NEEDED(I).EQ.0)GO TO 25
      IF(KNDSAV(INDEX).NE.KNDSAV(I))GO TO 25
      IF(KNDSAV(INDEX).NE.3)GO TO 24
      IF(ISHSAV(INDEX).NE.ISHSAV(I))GO TO 25
      IF(JSHSAV(INDEX).NE.JSHSAV(I))GO TO 25
      IF(KSHSAV(INDEX).NE.KSHSAV(I))GO TO 25
      IF(LSHSAV(INDEX).NE.LSHSAV(I))GO TO 25
      IF(IWHICH.LE.0)GO TO 23
      IF(VALSAV(INDEX).NE.VALSAV(I))GO TO 25
      GO TO 24
   23 IF(IVASAV(INDEX).NE.IVASAV(I))GO TO 25
   24 ISAME=ISAME+1
      IDENT(ISAME)=ITEST(I)
      NEEDED(I)=0
   25 CONTINUE
C
C     DISPLAY EVALUATED TEXT
      IF(ISEEN.EQ.LEAST)GO TO 30
      NOWSHO=0
   26 NOWSHO=NOWSHO+1
      IF(NOWSHO.GE.INITAL)GO TO 27
      JBUFFR(NOWSHO)=IBLANK
      GO TO 26
   27 JBUFFR(NOWSHO)=ILESS
      DO 28 I=INITAL,LEAST
      NOWSHO=NOWSHO+1
   28 JBUFFR(NOWSHO)=IBUFFR(I)
      NOWSHO=NOWSHO+1
      JBUFFR(NOWSHO)=IGREAT
      WRITE(JTTY,29)(JBUFFR(I),I=1,NOWSHO)
   29 FORMAT(1X,100A1)
      ISEEN=LEAST
C
C     REPORT ALL VALUES OF ITRAIL WHICH GIVE SAME RESULTS
   30 NOWSHO=0
      KIND=KNDSAV(INDEX)
      GO TO(31,33,35),KIND
   31 DO 32 I=1,5
      NOWSHO=NOWSHO+1
   32 JBUFFR(NOWSHO)=IEMPTY(I)
      GO TO 36
   33 DO 34 I=1,8
      NOWSHO=NOWSHO+1
   34 JBUFFR(NOWSHO)=IUNKNO(I)
      NOWSHO=NOWSHO+1
      I=LOCATE(INDEX)-1
      JBUFFR(NOWSHO)=IBUFFR(I)
      GO TO 36
   35 CALL DASHOW(IWHICH,0,6,6,6,5,
     1IVASAV(INDEX),VALSAV(INDEX),MAXSHO,NOWSHO,JBUFFR,IERR)
   36 NOWSHO=NOWSHO+1
      IF(NOWSHO.GE.12)GO TO 37
      JBUFFR(NOWSHO)=IBLANK
      GO TO 36
   37 JBUFFR(NOWSHO)=ILEFT
      J=NOWSHO
      DO 38 I=1,ISAME
      CALL DANUMB(0,IDENT(I),10,JBUFFR,NOWSHO,J,MAXSHO)
   38 CONTINUE
      NOWSHO=NOWSHO+1
      JBUFFR(NOWSHO)=IRIGHT
      IF(KIND.NE.3)GO TO 39
      CALL DANUMB(0,ISHSAV(INDEX),10,JBUFFR,NOWSHO,0,MAXSHO)
      CALL DANUMB(0,JSHSAV(INDEX),10,JBUFFR,NOWSHO,0,MAXSHO)
      CALL DANUMB(0,KSHSAV(INDEX),10,JBUFFR,NOWSHO,0,MAXSHO)
      CALL DANUMB(0,LSHSAV(INDEX),10,JBUFFR,NOWSHO,0,MAXSHO)
   39 WRITE(JTTY,40)(JBUFFR(I),I=1,NOWSHO)
   40 FORMAT(2X,72A1)
      GO TO 21
      END
.SKIP 2
T\\YPICAL ^DIALOG ^BETWEEN ^^DAHEFT D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
^^TEST DAIHFT (Y OR N) N
KONTRL,IEXTRA 1
TEST WHICH ITRAIL VALUES -11 -10 -9 -2 -1 0 1 2 9 10 11
*12.34E-4 .1234 12.34 1234 12.34E4
<12.34>
 12.34      (-10 0) 0 0 -2 4
 1234       (10) 0 0 -2 4
<12.34E-4>
 1.234E-3   (-11 -9 -2 -1 1 2) -1 -4 -6 4
 1234       (9 11) -1 -4 -6 4
     <E>
 UNKNOWN E  (-10 0 10)
      <-4>
 -4         (-10 0 10) 0 0 0 1
        < .1234>
 .1234      (-11 -10 -9 -2 -1 0 1 2) 0 0 -4 4
 1234       (9 10 11) 0 0 -4 4
              < 12.34>
 12.34      (-11 -10 -9 -2 -1 0 1 2) 0 0 -2 4
 1234       (9 10 11) 0 0 -2 4
                    < 1234>
 1234       (-11 -10 -9 -2 -1 0 1 2 9 10 11) 0 0 0 4
                         < 12.34>
 12.34      (-10 0) 0 0 -2 4
 1234       (10) 0 0 -2 4
                         < 12.34E4>
 123400     (-11 -9 -2 -1 1 2) -1 4 2 4
 1234       (9 11) -1 4 2 4
                               <E>
 UNKNOWN E  (-10 0 10)
                                <4>
 4          (-10 0 10) 0 0 0 1
                                 <                         >
 EMPTY      (-11 -10 -9 -2 -1 0 1 2 9 10 11)
*-18.3K -18.3M -18.3%
<-18.3>
 -18.3      (-11 -10 -2 -1 0) 0 0 -1 3
 -183       (9 10) 0 0 -1 3
<-18.3K>
 -18300     (-9 1 2) 2 3 2 3
 -183       (11) 2 3 2 3
     <K>
 UNKNOWN K  (-11 -10 -2 -1 0 9 10)
      < -18.3>
 -18.3      (-11 -10 -2 -1 0) 0 0 -1 3
 -183       (9 10) 0 0 -1 3
      < -18.3M>
 -1.83E7    (-9 1 2) 3 6 5 3
 -183       (11) 3 6 5 3
            <M>
 UNKNOWN M  (-11 -10 -2 -1 0 9 10)
             < -18.3>
 -18.3      (-11 -10 -2 -1 0) 0 0 -1 3
 -183       (9 10) 0 0 -1 3
             < -18.3%>
 -.183      (-9 1 2) 1 -2 -3 3
 -183       (11) 1 -2 -3 3
                   <%>
 UNKNOWN %  (-11 -10 -2 -1 0 9 10)
                    <                                      >
 EMPTY      (-11 -10 -9 -2 -1 0 1 2 9 10 11)
*
<                                                          >
 EMPTY      (-11 -10 -9 -2 -1 0 1 2 9 10 11)
TEST DAIHFT (Y OR N) N
KONTRL,IEXTRA 6
TEST WHICH ITRAIL VALUES -11 -10 -9 -2 -1 0 1 2 9 10 11
*12.34E-4 .1234 12.34 1234 12.34E4
<12.34>
 12.34      (-10 0) 0 0 -2 4
 1234       (10) 0 0 -2 4
<12.34E-4>
 1.234E-3   (-11 -9 -2 -1 1 2) -1 -4 -6 4
 1234       (9 11) -1 -4 -6 4
     <E>
 UNKNOWN E  (-10 0 10)
      <-4>
 -4         (-10 0 10) 0 0 0 1
        < .1234>
 .1234      (-11 -10 -9 -2 -1 0 1 2) 0 0 -4 4
 1234       (9 10 11) 0 0 -4 4
              < 12.34>
 12.34      (-11 -10 -9 -2 -1 0 1 2) 0 0 -2 4
 1234       (9 10 11) 0 0 -2 4
                    < 1234>
 1234       (-11 -10 -9 -2 -1 0 1 2 9 10 11) 0 0 0 4
                         < 12.34>
 12.34      (-10 0) 0 0 -2 4
 1234       (10) 0 0 -2 4
                         < 12.34E4>
 123400     (-11 -9 -2 -1 1 2) -1 4 2 4
 1234       (9 11) -1 4 2 4
                               <E>
 UNKNOWN E  (-10 0 10)
                                <4>
 4          (-10 0 10) 0 0 0 1
                                 <                         >
 EMPTY      (-11 -10 -9 -2 -1 0 1 2 9 10 11)
*-18.3K -18.3M -18.3%
<-18.3>
 -18.3      (-11 -10 -2 -1 0) 0 0 -1 3
 -183       (9 10) 0 0 -1 3
<-18.3K>
 -18300     (-9 1 2) 2 3 2 3
 -183       (11) 2 3 2 3
     <K>
 UNKNOWN K  (-11 -10 -2 -1 0 9 10)
      < -18.3>
 -18.3      (-11 -10 -2 -1 0) 0 0 -1 3
 -183       (9 10) 0 0 -1 3
      < -18.3M>
 -1.83E7    (-9 1 2) 3 6 5 3
 -183       (11) 3 6 5 3
            <M>
 UNKNOWN M  (-11 -10 -2 -1 0 9 10)
             < -18.3>
 -18.3      (-11 -10 -2 -1 0) 0 0 -1 3
 -183       (9 10) 0 0 -1 3
             < -18.3%>
 -.183      (-9 1 2) 1 -2 -3 3
 -183       (11) 1 -2 -3 3
                   <%>
 UNKNOWN %  (-11 -10 -2 -1 0 9 10)
                    <                                      >
 EMPTY      (-11 -10 -9 -2 -1 0 1 2 9 10 11)
*
<                                                          >
 EMPTY      (-11 -10 -9 -2 -1 0 1 2 9 10 11)
TEST DAIHFT (Y OR N) N
KONTRL,IEXTRA 0
TEST WHICH ITRAIL VALUES -11 -10 -9 -2 -1 0 1 2 9 10 11
*12.34E-4 .1234 12.34 1234 12.34E4
<12.34>
 12         (-10 0) 0 0 -2 4
 1234       (10) 0 0 -2 4
<12.34E-4>
 0          (-11 -9 -2 -1 1 2) -1 -4 -6 4
 1234       (9 11) -1 -4 -6 4
     <E>
 UNKNOWN E  (-10 0 10)
      <-4>
 -4         (-10 0 10) 0 0 0 1
        < .1234>
 0          (-11 -10 -9 -2 -1 0 1 2) 0 0 -4 4
 1234       (9 10 11) 0 0 -4 4
              < 12.34>
 12         (-11 -10 -9 -2 -1 0 1 2) 0 0 -2 4
 1234       (9 10 11) 0 0 -2 4
                    < 1234>
 1234       (-11 -10 -9 -2 -1 0 1 2 9 10 11) 0 0 0 4
                         < 12.34>
 12         (-10 0) 0 0 -2 4
 1234       (10) 0 0 -2 4
                         < 12.34E4>
 123400     (-11 -9 -2 -1 1 2) -1 4 2 4
 1234       (9 11) -1 4 2 4
                               <E>
 UNKNOWN E  (-10 0 10)
                                <4>
 4          (-10 0 10) 0 0 0 1
                                 <                         >
 EMPTY      (-11 -10 -9 -2 -1 0 1 2 9 10 11)
*-18.3K -18.3M -18.3%
<-18.3>
 -18        (-11 -10 -2 -1 0) 0 0 -1 3
 -183       (9 10) 0 0 -1 3
<-18.3K>
 -18300     (-9 1 2) 2 3 2 3
 -183       (11) 2 3 2 3
     <K>
 UNKNOWN K  (-11 -10 -2 -1 0 9 10)
      < -18.3>
 -18        (-11 -10 -2 -1 0) 0 0 -1 3
 -183       (9 10) 0 0 -1 3
      < -18.3M>
 -18300000  (-9 1 2) 3 6 5 3
 -183       (11) 3 6 5 3
            <M>
 UNKNOWN M  (-11 -10 -2 -1 0 9 10)
             < -18.3>
 -18        (-11 -10 -2 -1 0) 0 0 -1 3
 -183       (9 10) 0 0 -1 3
             < -18.3%>
 0          (-9 1 2) 1 -2 -3 3
 -183       (11) 1 -2 -3 3
                   <%>
 UNKNOWN %  (-11 -10 -2 -1 0 9 10)
                    <                                      >
 EMPTY      (-11 -10 -9 -2 -1 0 1 2 9 10 11)
*
<                                                          >
 EMPTY      (-11 -10 -9 -2 -1 0 1 2 9 10 11)
TEST DAIHFT (Y OR N) N
KONTRL,IEXTRA 1
TEST WHICH ITRAIL VALUES -8 2 12
*3.2 3.2E 3.2E+ 3.2E-
<3.2>
 3.2        (-8 2) 0 0 -1 2
 32         (12) 0 0 -1 2
   < 3.2E>
 32         (-8) -4 1 0 2
 3.2        (2) -4 0 -1 2
 32         (12) -4 0 -1 2
        < 3.2E+>
 32         (-8) -2 1 0 2
 3.2        (2) -2 0 -1 2
 32         (12) -2 0 -1 2
              < 3.2E->
 .32        (-8) -3 -1 -2 2
 3.2        (2) -3 0 -1 2
 32         (12) -3 0 -1 2
                    <                                      >
 EMPTY      (-8 2 12)
*E3 -E3 +E3 .E3 -.E3 +.E3 K -K +K .K -.K +.K
<E3>
 1000       (-8) -1 3 3 -4
 0          (2 12) -1 3 3 -4
  < -E3>
 -1000      (-8) -1 3 3 -3
 0          (2 12) -1 3 3 -3
      < +E3>
 1000       (-8) -1 3 3 -2
 0          (2 12) -1 3 3 -2
          < .E3>
 1000       (-8) -1 3 3 -1
 0          (2 12) -1 3 3 -1
              < -.E3>
 -1000      (-8) -1 3 3 -3
 0          (2 12) -1 3 3 -3
                   < +.E3>
 1000       (-8) -1 3 3 -2
 0          (2 12) -1 3 3 -2
                        < K>
 1000       (-8) 2 3 3 -4
 0          (2 12) 2 3 3 -4
                          < -K>
 -1000      (-8) 2 3 3 -3
 0          (2 12) 2 3 3 -3
                             < +K>
 1000       (-8) 2 3 3 -2
 0          (2 12) 2 3 3 -2
                                < .K>
 1000       (-8) 2 3 3 -1
 0          (2 12) 2 3 3 -1
                                   < -.K>
 -1000      (-8) 2 3 3 -3
 0          (2 12) 2 3 3 -3
                                       < +.K>
 1000       (-8) 2 3 3 -2
 0          (2 12) 2 3 3 -2
                                           <               >
 EMPTY      (-8 2 12)
*- + . -. +. 0 -0 +0 0. .0 0.00 0.00E-4 0.00E4
<->
 -1         (-8) 0 0 0 -3
 0          (2 12) 0 0 0 -3
 < +>
 1          (-8) 0 0 0 -2
 0          (2 12) 0 0 0 -2
   < .>
 1          (-8) 0 0 0 -1
 0          (2 12) 0 0 0 -1
     < -.>
 -1         (-8) 0 0 0 -3
 0          (2 12) 0 0 0 -3
        < +.>
 1          (-8) 0 0 0 -2
 0          (2 12) 0 0 0 -2
           < 0>
 0          (-8 2 12) 0 0 0 0
             < -0>
 0          (-8 2 12) 0 0 0 0
                < +0>
 0          (-8 2 12) 0 0 0 0
                   < 0.>
 0          (-8 2 12) 0 0 0 0
                      < .0>
 0          (-8 2 12) 0 0 -1 0
                         < 0.00>
 0          (-8 2 12) 0 0 -2 0
                              < 0.00E-4>
 0          (-8 2 12) -1 -4 -6 0
                                      < 0.00E4>
 0          (-8 2 12) -1 4 2 0
                                             <             >
 EMPTY      (-8 2 12)
* E -E +E E- E+ -E- -E+ +E- +E+
< E>
 10         (-8) -4 1 1 -4
 0          (2 12) -4 0 0 -4
  < -E>
 -10        (-8) -4 1 1 -3
 0          (2 12) -4 0 0 -3
     < +E>
 10         (-8) -4 1 1 -2
 0          (2 12) -4 0 0 -2
        < E->
 .1         (-8) -3 -1 -1 -4
 0          (2 12) -3 0 0 -4
           < E+>
 10         (-8) -2 1 1 -4
 0          (2 12) -2 0 0 -4
              < -E->
 -.1        (-8) -3 -1 -1 -3
 0          (2 12) -3 0 0 -3
                  < -E+>
 -10        (-8) -2 1 1 -3
 0          (2 12) -2 0 0 -3
                      < +E->
 .1         (-8) -3 -1 -1 -2
 0          (2 12) -3 0 0 -2
                          < +E+>
 10         (-8) -2 1 1 -2
 0          (2 12) -2 0 0 -2
                              <                            >
 EMPTY      (-8 2 12)
.SUBTITLE ^^DAHELP, D\\ETERMINES ^NUMBER OF ^LEADING ^QUESTION ^MARKS
.PAGE
.NOFILL
.LEFT MARGIN 0
 ^^DDDDD          AAA  HH    HH  EEEEEEEE  LL        PPPPPP
 DD   DD       AAAA  HH    HH  EE        LL        PP    PP
 DD    DD     AA AA  HH    HH  EE        LL        PP    PP
 DD    DD    AA  AA  HHHHHHHH  EEEEE     LL        PPPPPP
 DD    DD   AAAAAAA  HH    HH  EE        LL        PP
 DD   DD   AA    AA  HH    HH  EE        LL        PP
 DDDDD    AA     AA  HH    HH  EEEEEEEE  LLLLLLLL  PP
.SKIP 2
.CENTER
DAHELP, D\\ETERMINES ^NUMBER OF ^LEADING ^QUESTION ^MARKS
.CENTER
------##---------- ------ -- ------- -------- -----
.SKIP
.FILL
^MANY INTERACTIVE PROGRAMS INTERPRET THE APPEARANCE OF A QUESTION
MARK AT THE START OF THE TEXT TYPED BY THE USER TO BE A REQUEST BY
THE USER FOR INFORMATION. ^HOWEVER, A QUESTION MARK APPEARING WITHIN
OR TO THE RIGHT OF AN INTELLIGIBLE USER RESPONSE SHOULD PROBABLY BE
TREATED THE SAME AS ANY OTHER UNKNOWN CHARACTER. ^THE ROUTINES
WITHIN THE ^^FASP \\PACKAGE DO NOT HAVE AVAILABLE TO THEM ANY
INFORMATION REGARDING THE LOCATION OF THE TEXT CURRENTLY BEING
PROCESSED RELATIVE TO THE TOTAL TEXT WITHIN THE BUFFER. ^THESE
ROUTINES DO NOT TREAT THE QUESTION MARK DIFFERENTLY THAN ANY OTHER
UNKNOWN OR ALPHABETIC CHARACTER SINCE THE INTERPRETATION OF THE
QUESTION MARK DEPENDS UPON ITS LOCATION RELATIVE TO THE TOTAL TEXT
WITHIN THE BUFFER RATHER THAN UPON THE LOCATION OF THE QUESTION MARK
RELATIVE TO THE TEXT FORMING A PARTICULAR STATEMENT WHICH MIGHT BE
DELIMITED BY SEMICOLONS.
.SKIP
^INITIAL QUESTION MARKS CAN, HOWEVER, BE IDENTIFIED BY THE ^^DAHELP
\\ROUTINE IMMEDIATELY AFTER A NEW LINE OF TEXT HAS BEEN READ BY THE
CALLING PROGRAM. ^^DAHELP \\REPORTS HOW MANY QUESTION MARKS WERE
FOUND AT THE START OF THE BUFFER, AND SPECIFIES THE BUFFER LOCATION
WHICH CONTAINS THE FIRST PRINTING CHARACTER WHICH IS NOT ITSELF A
QUESTION MARK. ^IF A QUESTION MARK IN NOT FOUND, THEN THE LOCATION
OF THE FIRST PRINTING CHARACTER CAN BE SUPPLIED TO THE OTHER
ROUTINES IN THE ^^FASP \\PACKAGE AS THE LOCATION IN THE BUFFER AT
WHICH THESE ROUTINES ARE TO BEGIN INTERPRETATION. ^THE CALLING
PROGRAM SHOULD ISSUE THE APPROPRIATE INFORMATIVE MESSAGE IF THE
FIRST PRINTING CHARACTER IS FOUND TO BE A QUESTION MARK, AND THEN,
IGNORING THE REMAINDER OF THE CURRENT CONTENTS OF THE BUFFER, SHOULD
ASK FOR AND ACCEPT A NEW RESPONSE FROM THE USER, AGAIN ASSURING THAT
THIS NEW MESSAGE DOES NOT ITSELF BEGIN WITH A QUESTION MARK BEFORE
RESUMING NORMAL PROCESSING. ^EITHER THE NUMBER OF QUESTION MARKS
FOUND ON A SINGLE LINE, OR ELSE THE NUMBER OF CONSECUTIVE LINES
FOUND TO START WITH QUESTION MARKS MIGHT BE USED TO SELECT THE
LENGTH OF THE INFORMATIVE MESSAGE.
.PAGE
.CENTER
^THE ^^DAHELP A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DAHELP \I\S
.SKIP
.NOFILL
      SUBROUTINE DAHELP(IBUFFR,MAXBFR,LOWBFR,IQUERY)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IBUFFR#=#\\INPUT BUFFER ARRAY CONTAINING CHARACTERS TYPED BY THE
USER, READ BY A MULTIPLE OF AN ^A1 FORMAT, WHICH IS TO BE SEARCHED
FOR INITIAL QUESTION MARKS. ^^IBUFFR \\THEN CONTAINS 1 CHARACTER PER
COMPUTER STORAGE LOCATION.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE FINAL (RIGHTMOST) LOCATION IN THE
^^IBUFFR \\ARRAY WHICH CAN BE SEARCHED FOR INITIAL QUESTION MARKS.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT MUST BE SET BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS CALLED, AND THEN IS RETURNED BY THIS ROUTINE
DESCRIBING THE LOCATION OF THE FIRST PRINTING CHARACTER WHICH IS NOT
ITSELF A QUESTION MARK.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LOWBFR#=#\\INPUT CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY
LOCATION WHICH CONTAINS THE FIRST (LEFTMOST) CHARACTER WHICH MUST BE
TESTED TO DETERMINE WHETHER IT IS A QUESTION MARK.
.INDENT -2
=#RETURNED CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION
WHICH CONTAINS THE LEFTMOST PRINTING CHARACTER WHICH IS NOT ITSELF A
QUESTION MARK, OR RETURNED POINTING BEYOND THE END OF THE BUFFER
(SET TO ^^MAXBFR+1) \\IF NO PRINTING CHARACTERS OTHER THAN QUESTION
MARKS WERE FOUND IN THE BUFFER.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED FOR RETURNING THE NUMBER OF QUESTION
MARKS FOUND TO THE CALLING PROGRAM. ^ITS INPUT VALUE IS IGNORED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IQUERY#=#0, \\RETURNED IF THE INPUT BUFFER CONTAINED NO PRINTING
CHARACTERS, OR IF NO QUESTION MARKS WERE FOUND BEFORE THE FIRST
PRINTING CHARACTER WHICH IS NOT ITSELF A QUESTION MARK.
.INDENT -2
=#GREATER THAN ZERO, ^^IQUERY \\IS RETURNED CONTAINING THE NUMBER OF
QUESTION MARKS WHICH WERE FOUND BEFORE ANY OTHER PRINTING CHARACTERS
IN THE BUFFER. ^THESE QUESTION MARKS CAN BE PRECEDED BY, BE
SEPARATED BY, OR BE FOLLOWED BY SPACES AND/OR BY TAB CHARACTERS.
.SUBTITLE ^^DAHEST, P\\ARSER FOR ^SIMPLE ^COMMANDS TO ^INTERACTIVE ^PROGRAMS
.PAGE
.LEFT MARGIN 0
.RIGHT MARGIN 60
.NOFILL
 ^^DDDDD          AAA  HH    HH  EEEEEEEE    SSSSSS  TTTTTTTT
 DD   DD       AAAA  HH    HH  EE        SS           TT
 DD    DD     AA AA  HH    HH  EE        SS           TT
 DD    DD    AA  AA  HHHHHHHH  EEEEE       SSSS       TT
 DD    DD   AAAAAAA  HH    HH  EE              SS     TT
 DD   DD   AA    AA  HH    HH  EE              SS     TT
 DDDDD    AA     AA  HH    HH  EEEEEEEE  SSSSSS       TT
.FILL
.SKIP 2
.CENTER
DAHEST, P\\ARSER FOR ^SIMPLE ^COMMANDS TO ^INTERACTIVE ^PROGRAMS
.CENTER
------##------ --- ------ -------- -- ----------- --------
.SKIP
^THE MAIN ROUTINE OF AN INTERACTIVE PROGRAM OFTEN MERELY
INTERROGATES THE USER CONCERNING THE SEQUENCE IN WHICH SUBROUTINES
ARE TO BE EXECUTED. ^PROVIDING THAT ANY SUBROUTINE WILL REQUEST
RELATIVELY FEW ITEMS OF DATA FROM THE USER, AND THAT THE REQUESTS
FOR THIS DATA ARE PREDICTABLE BY THE USER, THEN THE COMMANDS TYPED
BY THE USER CAN BE STATEMENTS CONTAINING COMMAND WORDS WHICH
IDENTIFY THE SUBROUTINES AND CONTAINING NUMERIC OR TEXTUAL
ARGUMENTS. ^^DAHEST \\IS A ^^FORTRAN \\SUBROUTINE WHICH CAN BE
CALLED BY THE MAIN PROGRAM TO IDENTIFY THE COMMAND WORDS AND TO
EVALUATE THE ARGUMENTS IN SUCH STATEMENTS.
.SKIP
^THE FOLLOWING STATEMENTS ARE TYPICAL OF THOSE WHICH CAN BE
INTERPRETED BY THE ^^DAHEST \\ROUTINE. ^THE COMMENTS SHOWN TO THE
RIGHT OF THE STATEMENTS ARE OPTIONAL AND WOULD NOT NORMALLY BE USED
UNLESS ^^DAHEST \\IS PROCESSING COMMANDS WHICH HAVE BEEN READ FROM A
FILE, RATHER THAN TYPED BY THE USER.
.LEFT MARGIN 3
.SKIP
.NOFILL
^^OPAQUE '=',,'*'   !USE = FOR OUTLINE, * FOR ORIGIN
INVISIBLE ,'$'    !REST OF OBJECT WILL SHOW
WINDOW 10/30,5/25 !WINDOW COLUMN 10 TO 30, LINE 5 TO 25
EXAMINE           !LOOK AT CONTENTS OF WINDOW
GROUP 25,12       !GROUP CONTIGUOUS TO COLUMN 25, LINE 12
EXAMINE           !LOOK AT WINDOW OUTLINING GROUP
MOVE +5,-3        !MOVE GROUP +5 COLUMNS, -3 LINES
EXAMINE           !LOOK AT GROUP IN NEW LOCATION
.LEFT MARGIN 0
.RIGHT MARGIN 60
.SKIP
.FILL
I\\F THE POSSIBLE COMMAND WORDS HAVE BEEN CHOSEN TO START WITH
DIFFERENT LETTERS OF THE ALPHABET, THEN THE ABOVE EXAMPLE COULD BE
REDUCED TO THE FOLLOWING SINGLE LINE.
.SKIP
.NOFILL
.INDENT 3
^^O'=',,'*';I,'$';W 10/30,5/25;E;G 25,12;E;M+5,-3;E
.SKIP
\\OR, IF UNNECESSARY COMMAS ARE REMOVED OR REPLACED BY SPACES
.SKIP
.INDENT 3
^^O'=',,'*';I,'$';W 10/30 5/25;E;G 25 12;E;M+5-3;E
.SKIP
.FILL
O\\F COURSE, THE USER PROBABLY WOULD NOT COMBINE STATEMENTS TO THE
EXTENT SHOWN ABOVE, SINCE THE RESULTS OF ONE STATEMENT WOULD NOT BE
AVAILABLE BEFORE THE NEXT IS ISSUED, CAUSING THE INTERACTIVE NATURE
OF THE PROGRAM TO BE LOST.
.LEFT MARGIN 0
.RIGHT MARGIN 60
.SKIP
^^DAHEST \\INTERPRETS AN ARRAY READ BY THE CALLING PROGRAM WITH A
MULTIPLE OF AN ^A1 FORMAT. ^THE CALLING PROGRAM INDICATES TO
^^DAHEST \\THE POSITION IN THE BUFFER ARRAY OF THE LEFTMOST
CHARACTER WHICH HAS NOT YET BEEN EVALUATED. ^^DAHEST \\MOVES THIS
POINTER THROUGH THE BUFFER AND RETURNS IT TO THE CALLING PROGRAM
SPECIFYING THE LEFTMOST CHARACTER TO BE EVALUATED BY THE NEXT CALL
TO ^^DAHEST. A\\FTER ^^DAHEST \\HAS FINALLY INDICATED THAT NOTHING
MORE REMAINS TO BE PROCESSED IN THE LINE OF TEXT WHICH IS CONTAINED
IN THE BUFFER, THEN THE CALLING PROGRAM MUST READ ANOTHER LINE OF
TEXT, AND MUST RESET THE POINTER TO INDICATE THE START OF THE NEW
LINE OF TEXT BEFORE ^^DAHEST \\IS CALLED AGAIN.
.SKIP
^THE LINE OF TEXT WHICH IS BEING EVALUATED CAN CONTAIN SEVERAL
STATEMENTS IF THESE STATEMENTS ARE SEPARATED BY SEMICOLONS. ^EXTRA
SEMICOLONS CAN BE USED TO INDICATE EMPTY STATEMENTS. ^THE TEXT CAN
ALSO CONTAIN A COMMENT INDICATED BY AN EXCLAMATION POINT TO THE LEFT
OF THE COMMENT. ^WHEN ^^DAHEST \\ENCOUNTERS AN EXCLAMATION POINT
WHICH IS NOT WITHIN A QUOTED TEXT STRING (ONE OF THE ARGUMENT
TYPES), THEN THE CONTENTS OF THE BUFFER TO THE RIGHT OF THE
EXCLAMATION POINT ARE NOT EVALUATED AND THE POINTER IS RETURNED
INDICATING THE CHARACTER BEYOND THE RIGHT END OF THE BUFFER. ^A
STATEMENT WHICH IS PROCESSED BY ^^DAHEST \\CANNOT BE CONTINUED
ACROSS THE END OF A LINE. ^ALTHOUGH MANY OTHER ROUTINES IN ^^FASP
\\TAKE A RIGHTMOST AMPERSAND TO INDICATE THAT THE CURRENT STATEMENT
IS BEING CONTINUED ON THE FOLLOWING LINE, ^^DAHEST \\PROVIDES NOT
SPECIAL TREATMENT OF THE AMPERSAND.
.SKIP
^A STATEMENT STARTS WITH A COMMAND WORD WHICH CAN BE ABBREVIATED
PROVIDING THAT THE ABBREVIATION IS NOT AMBIGUOUS. ^IF THE COMMAND
WORD TYPED BY THE USER IS AN EXACT MATCH OF A WORD IN THE DICTIONARY
SUPPLIED BY THE CALLING PROGRAM, BUT IS ALSO AN ABBREVIATION OF A
LONGER WORD, THEN THE SHORTER WORD IS ASSUMED TO BE THE WORD WHICH
WAS DESIRED. ^FOR EXAMPLE, IF THE DICTIONARY CONTAINS BOTH OF THE
WORDS ^N^O AND ^^NONE, \\THEN THE SINGLE LETTER ^N IS AN AMBIGUOUS
ABBREVIATION, THE LETTER SEQUENCE ^N^O SELECTS THE WORD ^N^O, AND
THE LETTER SEQUENCE ^^NON \\IS AN ABBREVIATION OF THE WORD ^^NONE.
.SKIP
I\\F THE WORD IN THE DICTIONARY DOES NOT CONTAIN A SPACE, THEN A
SPACE OR TAB CHARACTER TYPED BY THE USER FOLLOWING A COMMAND WORD
WILL BE ASSUMED TO MARK THE END OF THE COMMAND WORD. ^IF THE WORD IN
THE DICTIONARY DOES CONTAIN A SPACE, THEN THE PORTIONS OF THE
COMMAND WORD TO EITHER SIDE OF THE SPACE CAN BE ABBREVIATED BY THE
USER WHETHER OR NOT THE USER HAS TYPED ONE OR MORE SPACES AND/OR TAB
CHARACTERS AT THIS LOCATION. ^FOR EXAMPLE, IF THE DICTIONARY
CONTAINS THE WORD SPECIFICATION
.SKIP
.INDENT 3
1^^HN,1HO,1H#,1HL,1HI,1HM,1HI,1HT
.SKIP
\\THEN THIS WORD COULD BE SELECTED BY ANY OF THE FOLLOWING LETTER
SEQUENCES
.BREAK
.INDENT 3
^^N, NL, N L, NLI, N LI, NO, NOL, NO L \O\R NO LI
.BREAK
\\IN THE INPUT BUFFER, PROVIDING IN EACH CASE THAT THE SEQUENCE IS
NOT AMBIGUOUS.
.SKIP
^THE ARGUMENTS WHICH APPEAR TO THE RIGHT OF THE COMMAND WORD CAN BE
POSSIBLY SIGNED NUMBERS, OR ALPHABETIC WORDS TO BE EVALUATED BY THE
CALLING PROGRAM, OR (QUOTED) TEXT STRINGS BEGUN AND TERMINATED
EITHER BY THE APOSTROPHE CHARACTER OR ELSE BY MATCHED PARENTHESES.
.SKIP
^THE SIGNED VALUE OF A NUMERIC ARGUMENT AND AN INDICATION OF ITS
SIGN, IF ANY, ARE BOTH RETURNED TO THE CALLING PROGRAM SO THAT THE
APPEARANCE OF A PLUS SIGN CAN, IF NECESSARY, BE TREATED DIFFERENTLY
THAN THE ABSENCE OF ANY SIGN. ^FOR EXAMPLE, AN UNSIGNED NUMBER MIGHT
INDICATE A LOCATION UPON A POSITIVE COORDINATE SCALE, BUT A NUMBER
PRECEDED BY A SIGN MIGHT INDICATE A RELATIVE SHIFT OR VECTOR.
^NUMBERS CAN BE SEPARATED BY SLASHES OR BY COLONS (THE 2 CHARACTERS
ARE EQUIVALENT) IF THEY ARE TO BE ASSOCIATED IN SOME MANNER. ^TWO
SUCH POSSIBLY SIGNED NUMBERS SEPARATED ONLY BY A SINGLE SLASH OR BY
A SINGLE COLON MIGHT INDICATE A RANGE. ^THREE POSSIBLY SIGNED
NUMBERS SEPARATED ONLY BY SLASHES OR BY COLONS MIGHT BE USED TO
INDICATE THE START OF A RANGE, THE INCREMENT, AND THE END OF THE
RANGE.
.SKIP
^A WORD APPEARING AS AN ARGUMENT OF A COMMAND MUST BEGIN WITH A
CHARACTER WHICH CANNOT START A NUMBER AND WHICH IS NOT ONE OF THE
DELIMITER CHARACTERS SUCH AS THE SPACE, TAB CHARACTER, SLASH, COLON,
SEMICOLON, EXCLAMATION POINT, COMMA, APOSTROPHE OR PARENTHESES.
^DIGITS CAN APPEAR ANYWHERE TO THE RIGHT OF THE LEADING CHARACTER OF
THE WORD, BUT THE OTHER PROHIBITED CHARACTERS WILL, IF ENCOUNTERED,
TERMINATE THE WORD. ^^DAHEST \\INDICATES TO THE CALLING PROGRAM THE
CHARACTER LOCATIONS AT WHICH THE WORD BEGINS AND ENDS.
.SKIP
^TEXT STRINGS DELIMITED BY THE APOSTROPHE CHARACTER CAN CONTAIN ANY
LEGAL ^^FORTRAN \\READABLE CHARACTERS. ^IF THE TEXT STRING IS TO
CONTAIN THE APOSTROPHE ITSELF, THEN THIS IS INDICATED BY 2
SUCCESSIVE APPEARANCES OF THE APOSTROPHE NEITHER OF WHICH IS TAKEN
TO BE THE STRING TERMINATOR. ^^DAHEST \\INDICATES TO THE CALLING
PROGRAM THE CHARACTER LOCATIONS AT WHICH THE TEXT INSIDE THE
DELIMITING APOSTROPHES BEGINS AND ENDS. ^IF THE TEXT STRING CONTAINS
APOSTROPHES INDICATED BY 2 APPEARANCES OF THE APOSTROPHE, THEN
^^DAHEST \\REMOVES THE EXTRA APOSTROPHE FROM THE STRING AND MOVES
THE POSITION OF THE RIGHTMOST POINTER 1 CHARACTER TO THE LEFT. ^IF
THE APOSTROPHE WHICH INDICATES THE RIGHT END OF THE STRING IS
MISSING, THEN THE TEXT STRING IS ASSUMED TO EXTEND THROUGH THE
RIGHTMOST PRINTING CHARACTER ON THE LINE.
.SKIP
^THE START OF A TEXT STRING CAN ALSO BE INDICATED BY A LEADING LEFT
OR RIGHT PARENTHESIS. ^STARTING WITH THE LEADING PARENTHESIS, A
LEVEL COUNT IS OBTAINED BY ADDING 1 FOR EACH LEFT PARENTHESIS WHICH
IS NOT PRECEDED BY AN APOSTROPHE, AND BY SUBTRACTING 1 FOR EACH
RIGHT PARENTHESIS WHICH IS NOT PRECEDED BY AN APOSTROPHE. ^THE TEXT
STRING THEN CONTINUES TO THE NEXT PARENTHESIS WHICH RETURNS THE
PARENTHETICAL LEVEL COUNT TO ZERO, OR THROUGH THE RIGHTMOST PRINTING
CHARACTER ON THE LINE IF A CLOSING PARENTHESIS IS NOT FOUND. ^THE
TEXT STRING INCLUDES EMBEDDED PARENTHESES IF THESE DO NOT RETURN THE
PARENTHETICAL LEVEL COUNT TO ZERO. ^IF AN APOSTROPHE IS ENCOUNTERED
WITHIN THE TEXT STRING, THEN THE APOSTROPHE IS RETAINED AND BOTH THE
APOSTROPHE AND THE CHARACTER TO ITS RIGHT ARE INCLUDED IN THE TEXT
STRING.
.SKIP
^ALTHOUGH ^^DAHEST \\DOES NOT REVEAL TO THE CALLING PROGRAM WHETHER
THE TEXT STRING STARTED TO THE RIGHT OF A LEADING APOSTROPHE OR OF A
LEFT OR A RIGHT PARENTHESIS, THE CALLING PROGRAM CAN EASILY
DETERMINE WHICH OF THESE THREE CHARACTERS APPEARS TO THE IMMEDIATE
LEFT OF THE CONTENTS OF THE TEXT STRING. ^IN THE APPLICATION FOR
WHICH ^^DAHEST \\WAS WRITTEN, TEXT STRINGS BEGUN BY APOSTROPHES
CONTAIN CHARACTERS TO BE HANDLED IN THE ORDER ENCOUNTERED, STRINGS
BEGUN BY LEFT PARENTHESES CONTAIN CHARACTERS TO BE INCLUDED IN A
CLASS, AND STRINGS BEGUN BY RIGHT PARENTHESES CONTAIN CHARACTERS TO
BE EXCLUDED FROM A CLASS.
.SKIP
^ONE, BUT ONLY ONE, OF THE THREE TYPES OF ARGUMENTS, WORDS OR
NUMBERS OR TEXT STRINGS, CAN BE USED MORE THAN ONCE AS AN ARGUMENT.
^IF THE TYPE OF ARGUMENT WHICH CAN BE REPEATED IS SPECIFIED BEFORE
THE FIRST ARGUMENT IS FOUND, EITHER BEING THE SAME FOR ALL COMMANDS,
OR ELSE BEING SPECIFIED SEPARATELY IN THE DICTIONARY FOR EACH
COMMAND, THEN ARGUMENTS OF THE OTHER TWO TYPES CAN APPEAR AT MOST
ONCE IN THE ARGUMENT LIST. ^IF THE REPEATABLE TYPE IS WORD OR TEXT
STRING, THEN A SET OF NUMBERS INDICATING A RANGE CAN STILL BE
SUPPLIED. ^IF THE REPEATABLE TYPE IS NUMERIC, THEN MORE THAN ONE SET
OF NUMBERS INDICATING RANGES WILL BE ACCEPTED. ^ALTERNATIVELY, THE
TYPE OF ARGUMENT WHICH CAN BE REPEATED CAN BE THE TYPE OF THE FIRST
ARGUMENT ENCOUNTERED, IN WHICH CASE ARGUMENTS OF THE OTHER TWO TYPES
ARE NOT ALLOWED IN THE ARGUMENT LIST.
.SKIP
^ANY NUMBER OF SPACES AND/OR TAB CHARACTERS CAN APPEAR BEFORE THE
COMMAND WORD AND BETWEEN THE COMMAND WORD AND ITS FIRST ARGUMENT.
^SUCCESSIVE ARGUMENTS CAN BE SEPARATED BY A SINGLE COMMA AND/OR BY
ANY NUMBER OF SPACES AND/OR TAB CHARACTERS. ^NO SEPARATING
CHARACTERS ARE NECESSARY IF THE LEADING CHARACTER OF AN ARGUMENT
INDICATES THAT IT CANNOT CONTINUE THE PRECEDING COMMAND WORD OR
PRECEDING ARGUMENT. ^A SINGLE COMMA APPEARING BETWEEN 2 ARGUMENTS OF
EITHER THE SAME OR OF DIFFERENT TYPES MERELY INDICATES THE
SEPARATION BETWEEN THE ARGUMENTS, AND IS ENTIRELY EQUIVALENT TO ONE
OR MORE SPACES AND/OR TAB CHARACTERS. ^TWO COMMAS, POSSIBLY
SEPARATED BY SPACES AND/OR BY TAB CHARACTERS, INDICATE A MISSING
ARGUMENT OF THE REPEATABLE TYPE. ^A COMMA APPEARING IMMEDIATELY
(EXCEPT FOR OPTIONAL SPACES AND/OR TABS) AFTER THE COMMAND WORD IS
TAKEN TO INDICATE THAT THE FIRST ARGUMENT OF THE REPEATABLE TYPE IS
MISSING. ^FOR EXAMPLE, IN THE STATEMENTS
.SKIP
.INDENT 3
^^OPAQUE'=',,'*';INVISIBLE,'$'
.SKIP
\\THE QUOTED TEXT CHARACTER * IS THE THIRD ARGUMENT OF THE COMMAND
WORD ^^OPAQUE, \\THE SECOND ARGUMENT BEING MISSING, AND THE QUOTED
TEXT CHARACTER $ IS THE SECOND ARGUMENT OF THE COMMAND WORD
^^INVISIBLE, \\THE FIRST ARGUMENT BEING MISSING.
.SKIP
^THE ARGUMENTS OF THE REPEATABLE TYPE ARE RETURNED TO THE CALLING
PROGRAM IN THE ORDER IN WHICH THEY APPEAR IN THE STATEMENT, AND, IN
PARTICULAR, THE CALLING PROGRAM IS ABLE TO DETERMINE WHETHER ANY ARE
MISSING. ^NO INFORMATION REGARDING ORDERING BETWEEN ARGUMENTS OF
DIFFERENT TYPES IS RETURNED TO THE CALLING PROGRAM. ^IF THE COMMAND
WORD ^^FETCH \\TAKES BOTH AN OBJECT NAME AND A PAIR OF COORDINATES
AS ARGUMENTS, THEN THE FOLLOWING STATEMENTS WOULD ALL BE EQUIVALENT.
.SKIP
.NOFILL
.LEFT MARGIN 5
.TEST PAGE 12
^^FETCH HEXAGON,20,44
FETCH HEXAGON,20 44
FETCH HEXAGON 20,44
FETCH HEXAGON 20 44
FETCH 20,HEXAGON,44
FETCH 20,HEXAGON 44
FETCH 20 HEXAGON,44
FETCH 20 HEXAGON 44
FETCH 20,44,HEXAGON
FETCH 20,44 HEXAGON
FETCH 20 44,HEXAGON
FETCH 20 44 HEXAGON
.FILL
.LEFT MARGIN 0
.SKIP
DAHEST \\CAN EVALUATE NUMERIC ARGUMENTS EITHER AS INTEGERS OR AS
REAL NUMBERS. ^THE TYPE OF NUMERIC EVALUATION WHICH IS TO BE
PERFORMED IS ASSOCIATED WITH THE COMMAND WORD AT THE START OF THE
STATEMENT, AND IS SPECIFIED BY THE DICTIONARY CONTAINING THE
DESCRIPTIONS OF THE POSSIBLE COMMAND WORDS. ^^DAHEST \\CALLS THE
ROUTINE ^^DAHEFT \\TO PERFORM THE EVALUATION, AND ALL NUMERIC
VARIATIONS WHICH ARE PERMITTED BY ^^DAHEFT \\ARE RECOGNIZED BY
^^DAHEST. A\\NY NUMBER, WHETHER BEING EVALUATED AS AN INTEGER OR AS
A REAL NUMBER, CAN BE SPECIFIED IN FLOATING POINT FORM OR IN
EXPONENT FORM. ^THE CHARACTERS %, ^K AND ^M ARE ACCEPTED IN PLACE OF
THE EXPONENTS ^E-2, ^E3 AND ^E6 RESPECTIVELY.
.SKIP
^IF THE PROGRAM WHICH CALLS ^^DAHEST \\DOES NOT REQUIRE THE
EVALUATION OF REAL NUMBERS AND DOES NOT OTHERWISE CALL ^^DAHEFT,
\\AND IF THE SPECIFICATION OF INTEGERS IN EXPONENT FORM IS NOT
NECESSARY, THEN THE ROUTINE ^^DAIHST \\SHOULD BE CALLED INSTEAD OF
^^DAHEST. T\\HE 2 ROUTINES ARE OF APPROXIMATELY THE SAME LENGTH, BUT
^^DAIHST \\DOES NOT CALL ^^DAHEFT \\FOR NUMERIC EVALUATION. ^NUMBERS
EVALUATED BY ^^DAIHST \\MUST CONSIST ONLY OF DIGITS FOLLOWING THE
OPTIONAL SIGN. ^^DAIHST \\TREATS THE CHARACTERS ., %, ^E, ^K AND ^M
THE SAME AS ANY ALPHABETIC LETTER.
.SKIP
^^DAIHST \\WAS DEVELOPED AS THE COMMAND SCANNER FOR THE ^^MIRAGE
\\PRINTABLE IMAGE SKETCHPAD PROGRAM (NOT YET COMPLETED WHEN THIS
DOCUMENTATION WAS WRITTEN). ^MOST OF THE COMMAND STATEMENTS SHOWN
ABOVE ARE WRITTEN IN THE COMMAND LANGUAGE DESIGNED FOR ^^MIRAGE.
DAHEST \\USES THE SAME LOGIC AS ^^DAIHST \\AND WAS DEVELOPED FROM
^^DAIHST \\SINCE IT WAS FELT THAT OTHER USERS WOULD REJECT THE
COMMAND SCANNER IF IT COULD NOT EVALUATE REAL NUMBERS.
.SKIP 2
.CENTER
THE ^^DAHEST \\AND ^^DAIHST A\\RGUMENT ^LISTS
.CENTER
--- ------ --- ------ -------- -----
.SKIP
^THE ARGUMENT LISTS OF ROUTINES ^^DAHEST \\AND ^^DAIHST \\ARE
.SKIP
.NOFILL
      ^^SUBROUTINE DAHEST(KMDTYP,LSTTYP,NAMLOW,NAMMAX,MRKLOW,
     1    MRKMAX,NUMLOW,NUMMAX,INTRVL,LOWWRD,MAXWRD,IWORD ,
     2    LOWKNT,MAXKNT,KNTLTR,LEGAL ,MAXBFR,IBUFFR,LOWBFR,
     3    KIND  ,KOMAND,LCNWRD,LCNKNT,INIPRT,MIDPRT,LMTPRT,
     4    NAMKNT,NAMLFT,NAMRIT,MRKKNT,MRKLFT,MRKRIT,NUMKNT,
     5    NUMSIN,NUMVAL,VALNUM,IFLOAT)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION      IWORD (MAXWRD),KNTLTR(MAXKNT),
     1LEGAL (MAXKNT),IBUFFR(MAXBFR),NAMLFT(NAMMAX),
     2NAMRIT(NAMMAX),MRKLFT(MRKMAX),MRKRIT(MRKMAX),
     3NUMSIN(NUMMAX),NUMVAL(NUMMAX),VALNUM(NUMMAX)
.SKIP
\\AND
.SKIP
      ^^SUBROUTINE DAIHST(KMDTYP,LSTTYP,NAMLOW,NAMMAX,MRKLOW,
     1    MRKMAX,NUMLOW,NUMMAX,INTRVL,LOWWRD,MAXWRD,IWORD ,
     2    LOWKNT,MAXKNT,KNTLTR,LEGAL ,MAXBFR,IBUFFR,LOWBFR,
     3    KIND  ,KOMAND,LCNWRD,LCNKNT,INIPRT,MIDPRT,LMTPRT,
     4    NAMKNT,NAMLFT,NAMRIT,MRKKNT,MRKLFT,MRKRIT,NUMKNT,
     5    NUMSIN,NUMVAL)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION      IWORD (MAXWRD),KNTLTR(MAXKNT),
     1LEGAL (MAXKNT),IBUFFR(MAXBFR),NAMLFT(NAMMAX),
     2NAMRIT(NAMMAX),MRKLFT(MRKMAX),MRKRIT(MRKMAX),
     3NUMSIN(NUMMAX),NUMVAL(NUMMAX)
.SKIP
.FILL
T\\HE ORDERING OF THE ARGUMENTS IS THE SAME FOR BOTH ROUTINES, BUT
THE LAST 2 ARGUMENTS OF ^^DAHEST \\ARE NOT INCLUDED IN THE ^^DAIHST
\\ARGUMENT LIST. ^THE ARGUMENT DEFINITIONS ARE ALSO IDENTICAL, WITH
THE EXCEPTION THAT THOSE ARGUMENT VALUES WHICH REQUEST EVALUATION OF
NUMBERS AS REAL NUMBERS FOR ^^DAHEST \\INSTEAD PRODUCE EVALUATION AS
INTEGERS FOR ^^DAIHST.
.SKIP
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT ONLY, AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.RIGHT MARGIN 60
.INDENT -9
^^KMDTYP#=#\\SPECIFIES WHETHER A COMMAND WORD IS TO BE RECOGNIZED AT
THE START OF THE STATEMENT. ^^KMDTYP \\EQUAL TO 1 OR 2 SPECIFIES
THAT A LEADING NUMBER ENCOUNTERED IN PLACE OF A COMMAND WORD IS TO
BE TREATED SPECIALLY. ^^KMDTYP \\EQUAL TO 2 INDICATES THAT SUCH A
LEADING NUMBER IS TO BE EVALUATED AS A REAL NUMBER, AND FOR ROUTINE
^^DAIHST \\THIS VALUE OF ^^KMDTYP \\IS EXACTLY EQUIVALENT TO THE
VALUE 1.
.INDENT -2
=#-1, A COMMAND WORD IS NOT TO BE RECOGNIZED AT THE START OF THE
STATEMENT. ^THE CONTENTS OF THE STATEMENT ARE TO BE EVALUATED AS AN
ARGUMENT LIST OF THE TYPE INDICATED BY THE VALUE OF ^^LSTTYP. I\F
LSTTYP \\ALSO HAS THE VALUE -1 AND IF AN ARGUMENT IS FOUND, THEN
^^KIND \\WILL BE RETURNED CONTAINING ONE OF THE VALUES 7, 8, 9 OR
10, DEPENDING UPON THE TYPE OF ARGUMENT.
.INDENT -2
=#0, THE STATEMENT MUST START WITH A KNOWN COMMAND WORD. ^IF A KNOWN
COMMAND WORD DOES BEGIN THE STATEMENT, THEN ^^KIND \\WILL BE
RETURNED WITH THE VALUE 3 IF THERE IS NO ERROR IN THE ARGUMENT LIST,
OR WITH ONE OF THE VALUES 7, 8, 9 OR 10 IF AN ERROR IS FOUND IN THE
ARGUMENT LIST.
.SKIP
^IF THE LINE OF TEXT CONTAINS NO PRINTING CHARACTERS OR CONTAINS
MERELY AN EXCLAMATION POINT FOLLOWED BY A COMMENT, OR IF THE LINE OF
TEXT CONTAINS AN EXTRA SEMICOLON, THEN ^^KIND \\WILL BE RETURNED
WITH THE VALUE 2 INDICATING AN EMPTY STATEMENT.
.SKIP
^IF THE STATEMENT STARTS WITH A NUMBER, A TEXT STRING, A COMMA, A
SLASH OR A COLON, THEN ^^KIND \\WILL BE RETURNED CONTAINING THE
VALUE 5 TO INDICATE A MISSING COMMAND WORD.
.SKIP
^IF THE STATEMENT DOES NOT START WITH A KNOWN COMMAND WORD, AND IF
THE FIRST PRINTING CHARACTER IN THE STATEMENT IS NOT ONE OF THE
CHARACTERS EXCLAMATION POINT, SEMICOLON, APOSTROPHE, COMMA, SLASH,
COLON OR EITHER PARENTHESIS, AND IF THE FIRST PRINTING CHARACTER IN
THE STATEMENT IS NOT ONE OF THE CHARACTERS WHICH CAN START A NUMBER,
THEN ^^KIND \\WILL BE RETURNED WITH THE VALUE 6 INDICATING AN
UNKNOWN COMMAND WORD, AND THE ARGUMENTS ^^INIPRT \\AND ^^MIDPRT
\\WILL BE RETURNED POINTING TO THE LEFTMOST AND RIGHTMOST CHARACTERS
IN THIS UNKNOWN COMMAND WORD.
.INDENT -2
=#1, SAME AS ^^KMDTYP=0, \\EXCEPT THAT IF AN INITIAL NUMBER IS FOUND
IN THE STATEMENT, THEN THE VALUE OF THE NUMBER IS EVALUATED AS AN
INTEGER AND IS RETURNED IN ^^NUMVAL(NUMLOW), \\AN INDICATION OF THE
SIGN IF ANY IS RETURNED IN ^^NUMSIN(NUMLOW), KIND \\IS RETURNED WITH
THE VALUE 4, AND ^^MIDPRT \\AND ^^LMTPRT \\ARE RETURNED POINTING TO
THE CHARACTER TO THE RIGHT OF THE NUMBER, AND TO THE RIGHTMOST
PRINTING CHARACTER IN THE ^^IBUFFR \\ARRAY RESPECTIVELY. ^IF THE
FIRST PRINTING CHARACTER ON THE LINE IS A SLASH OR A COLON, THEN
^^KIND \\IS RETURNED WITH THE VALUE 5 TO INDICATE A MISSING COMMAND
WORD, SINCE THE SLASH OR COLON IS NOT CONSIDERED TO BE PART OF A
NUMBER.
.INDENT -2
=#2, SAME AS ^^KMDTYP=1, \\EXCEPT THAT IF AN INITIAL NUMBER IS FOUND
IN THE STATEMENT, THEN THE VALUE OF THE NUMBER IS EVALUATED AS A
REAL NUMBER AND IS RETURNED IN ^^VALNUM(NUMLOW).
.SKIP
.INDENT -9
LSTTYP#=#\\SPECIFIES THE TYPE OF NUMERIC ARGUMENTS, REAL OR INTEGER,
WHICH CAN BE EVALUATED, AND THE TYPE OF ARGUMENT, WORD OR SET OF
NUMBERS OR TEXT STRING, WHICH CAN BE PRESENT MORE THAN ONCE IN THE
ARGUMENT LIST. ^THE VALUES 5, 6, 7 AND 8 SPECIFY THAT NUMERIC
ARGUMENTS ARE TO BE EVALUATED AS REAL NUMBERS, AND FOR THE ROUTINE
^^DAIHST \\THESE VALUES OF ^^LSTTYP \\ARE EXACTLY EQUIVALENT TO THE
VALUES 1, 2, 3 AND 4 RESPECTIVELY.
.SKIP
.INDENT -2
=#-1, THE TYPE OF ARGUMENT LIST IS SPECIFIED FOR EACH POSSIBLE
COMMAND WORD BY THE VALUE IN THE ^^LEGAL \\ARRAY PARALLEL TO THE
CHARACTER COUNT IN THE ^^KNTLTR \\ARRAY.
.INDENT -2
=#0, NO DESCRIPTIONS OF ARGUMENTS ARE TO BE RETURNED TO THE CALLING
PROGRAM. ^THE ARGUMENTS ARE, HOWEVER, INTERPRETED TO FIND THE RIGHT
END OF THE STATEMENT. ^IF AN ARGUMENT IS FOUND, THEN ^^KIND \\WILL
BE RETURNED WITH ONE OF THE VALUE 7, 8, 9 OR 10, DEPENDING UPON THE
TYPE OF THE ARGUMENT, INSTEAD OF BEING RETURNED WITH THE VALUE 3.
.INDENT -2
=#1, THE TYPE OF ARGUMENT WHICH CAN BE REPEATED IS THE TYPE OF THE
FIRST ARGUMENT ENCOUNTERED, WHETHER OR NOT THIS IS PRECEDED BY
COMMAS. ^THE COMMAS DO, HOWEVER, INDICATE MISSING ARGUMENTS OF THE
SAME TYPE AS THAT EVENTUALLY FOUND. ^ADDITIONAL ARGUMENTS OF TYPES
OTHER THAN THAT OF THE FIRST ARGUMENT ENCOUNTERED ARE NOT ALLOWED.
^IF AN ADDITIONAL ARGUMENT OF ANOTHER TYPE IS FOUND, THEN EVALUATION
OF THE ARGUMENT LIST WILL BE TERMINATED EXCEPT INSOFAR AS IS
NECESSARY TO DETECT THE END OF THE STATEMENT, AND ^^KIND \\WILL BE
RETURNED CONTAINING ONE OF THE VALUES 8, 9 OR 10 INDICATING THE TYPE
OF THE ILLEGAL ARGUMENT. ^IF A SET OF NUMBERS IS FOUND, IT IS
EVALUATED AS A SET OF INTEGERS.
.INDENT -2
=#2, ALLOW A SERIES OF WORDS. ^A SINGLE TEXT STRING AND/OR A SINGLE
SET OF NUMBERS CAN ALSO APPEAR IN THE ARGUMENT LIST. ^IF A SET OF
NUMBERS IS FOUND, IT IS EVALUATED AS A SET OF INTEGERS.
.INDENT -2
=#3, ALLOW A SERIES OF SETS OF INTEGERS. ^A SINGLE WORD AND/OR A
SINGLE TEXT STRING CAN ALSO APPEAR IN THE ARGUMENT LIST.
.INDENT -2
=#4, ALLOW A SERIES OF TEXT STRINGS. ^A SINGLE WORD AND/OR A SINGLE
SET OF NUMBERS CAN ALSO APPEAR IN THE ARGUMENT LIST. ^IF A SET OF
NUMBERS IS FOUND, IT IS EVALUATED AS A SET OF INTEGERS.
.INDENT -2
=#5, 6, 7 AND 8, SAME AS THE ^^LSTTYP \\VALUES OF 1, 2, 3 AND 4
RESPECTIVELY, EXCEPT THAT IF A NUMBER OR SET OF NUMBERS OR SERIES OF
SETS OF NUMBERS ARE ENCOUNTERED, THESE NUMBERS ARE EVALUATED AS REAL
NUMBERS AND RETURNED IN THE ^^VALNUM \\ARRAY RATHER THAN IN THE
^^NUMVAL \\ARRAY. ^FOR THE ROUTINE ^^DAIHST, \\THE ^^LSTTYP \\VALUES
OF 5, 6, 7 AND 8 ARE EXACTLY EQUIVALENT TO THE ^^LSTTYP \\VALUES OF
1, 2, 3 AND 4 RESPECTIVELY.
.LEFT MARGIN 9
.INDENT -2
=#9, ALL ARGUMENTS WILL BE TEXT STRINGS DELIMITED BY PARENTHESES,
NOT BY APOSTROPHES. ^EACH TEXT STRING BEGINS WITH THE FIRST PRINTING
CHARACTER AND EXTENDS TO THE NEXT PUNCTUATION CHARACTER OR SPACE, OR
IF A PARENTHESIS IS ENCOUNTERED WITHIN THE TEXT STRING, TO THE
PARENTHESIS WHICH RETURNS THE PARENTHETICAL LEVEL COUNT TO ZERO. ^AN
APOSTROPHE CAN BE INCLUDED ANYWHERE WITHIN THE TEXT STRING TO
INDICATE THAT THE FOLLOWING CHARACTER IS TO BE INCLUDED WITHIN THE
TEXT STRING AND IS NOT TO CHANGE THE PARENTHETICAL LEVEL COUNT.
^SINCE A LEADING PARENTHESIS IS NOT NECESSARY, IT IS INCLUDED WITHIN
THE TEXT STRING IF FOUND. ^THE CLOSING PARENTHESIS IS NEVER INCLUDED
WITHIN THE CONTENTS OF THE TEXT STRING. ^FOR EXAMPLE
.SKIP
.INDENT 5
.NOFILL
^^ABC DEF,GHI(JKL)MNO)PQR((STU))VWX(' '(')
.SKIP
.FILL
\\WOULD INCLUDE THE FOLLOWING TEXT STRINGS
.SKIP
.LEFT MARGIN 14
.NOFILL
.TEST PAGE 7
^^ABC
DEF
GHI(JKL
MNO)PQR
(STU
)VWX
' '(')
.FILL
.LEFT MARGIN 9
.SKIP
I\\T MUST BE NOTED THAT IN ORDER FOR THIS PARTICULAR TYPE OF
PARENTHETICAL EXPRESSION TO BE RECOGNIZED EITHER ^^LSTTYP=9 \O\R
\\ELSE ^^LSTTYP=-1 \\WHILE THE VALUE IN THE ^^LEGAL \\ARRAY
CORRESPONDING TO THE COMMAND IS 9. ^UNDER ALL OTHER CONDITIONS,
QUOTED TEXT STRINGS BEGIN EITHER WITH AN APOSTROPHE OR WITH A
PARENTHESIS AND THIS INITIAL DELIMITING CHARACTER IS NOT THEN
INCLUDED WITHIN THE TEXT STRING.
.SKIP
.LEFT MARGIN 9
.RIGHT MARGIN 60
.INDENT -9
^^NAMLOW#=#\\SUBSCRIPT OF THE ^^NAMLFT \\AND ^^NAMRIT \\ARRAY
LOCATIONS INTO WHICH CAN BE PLACED THE DESCRIPTION OF THE FIRST WORD
ENCOUNTERED IN THE ARGUMENT LIST. ^^NAMLOW \\WOULD NORMALLY HAVE THE
VALUE 1 TO ALLOW THE DESCRIPTION OF THE FIRST WORD ARGUMENT TO BE
PLACED INTO THE FIRST LOCATIONS IN THE ^^NAMLFT \\AND ^^NAMRIT
\\ARRAYS.
.SKIP
.INDENT -9
^^NAMMAX#=#\\HIGHEST SUBSCRIPT OF THE ^^NAMLFT \\AND ^^NAMRIT
\\ARRAY LOCATIONS INTO WHICH CAN BE PLACED THE DESCRIPTION OF A WORD
IN THE ARGUMENT LIST. ^^NAMMAX \\WOULD NORMALLY BE THE DIMENSION OF
THE ^^NAMLFT \\AND ^^NAMRIT \\ARRAYS. ^IF ^^NAMMAX \\EQUALS
^^NAMLOW, \\THEN AT MOST A SINGLE WORD CAN BE EVALUATED IN THE
ARGUMENT LIST EVEN IF A SERIES OF WORDS IS ENABLED BY EITHER OF THE
ARGUMENTS ^^LSTTYP \O\R LEGAL. I\F NAMMAX \\IS LESS THAN ^^NAMLOW,
\\THEN NO WORDS CAN BE EVALUATED IN THE ARGUMENT LIST.
.SKIP
.LEFT MARGIN 9
.RIGHT MARGIN 60
.INDENT -9
^^MRKLOW#=#\\SUBSCRIPT OF THE ^^MRKLFT \\AND ^^MRKRIT \\ARRAY
LOCATIONS INTO WHICH CAN BE PLACED THE DESCRIPTION OF THE FIRST TEXT
STRING ENCOUNTERED IN THE ARGUMENT LIST. ^^MRKLOW \\WOULD NORMALLY
HAVE THE VALUE 1 TO ALLOW THE DESCRIPTION OF THE FIRST TEXT STRING
ARGUMENT TO BE PLACED INTO THE FIRST LOCATIONS IN THE ^^MRKLFT \\AND
^^MRKRIT \\ARRAYS.
.SKIP
.INDENT -9
^^MRKMAX#=#\\HIGHEST SUBSCRIPT OF THE ^^MRKLFT \\AND ^^MRKRIT
\\ARRAY LOCATIONS INTO WHICH CAN BE PLACED THE DESCRIPTION OF A TEXT
STRING IN THE ARGUMENT LIST. ^^MRKMAX \\WOULD NORMALLY BE THE
DIMENSION OF THE ^^MRKLFT \\AND ^^MRKRIT \\ARRAYS. ^IF ^^MRKMAX
\\EQUALS ^^MRKLOW, \\THEN AT MOST A SINGLE TEXT STRING CAN BE
EVALUATED IN THE ARGUMENT LIST EVEN IF A SERIES OF TEXT STRINGS IS
ENABLED BY EITHER OF THE ARGUMENTS ^^LSTTYP \O\R LEGAL. I\F MRKMAX
\\IS LESS THAN ^^MRKLOW, \\THEN NO TEXT STRINGS CAN BE EVALUATED IN
THE ARGUMENT LIST.
.SKIP
.LEFT MARGIN 9
.RIGHT MARGIN 60
.INDENT -9
^^NUMLOW#=#\\SUBSCRIPT OF THE ^^NUMSIN, NUMVAL \\AND ^^VALNUM
\\ARRAY LOCATIONS INTO WHICH CAN BE PLACED THE DESCRIPTION OF THE
FIRST NUMBER ENCOUNTERED IN THE ARGUMENT LIST. ^^NUMLOW \\WOULD
NORMALLY HAVE THE VALUE 1 TO ALLOW THE DESCRIPTION OF THE SIGN OF
THE FIRST NUMERIC ARGUMENT TO BE PLACED INTO THE FIRST LOCATION IN
THE ^^NUMSIN \\ARRAY AND THE VALUE OF THE ARGUMENT TO BE PLACED,
DEPENDING UPON WHETHER THE NUMBER IS EVALUATED AS INTEGER OR REAL,
INTO THE FIRST LOCATION IN EITHER THE ^^NUMVAL \O\R VALNUM \\ARRAYS.
.SKIP
.INDENT -9
^^NUMMAX#=#\\HIGHEST SUBSCRIPT OF THE ^^NUMSIN, NUMVAL \\AND
^^VALNUM \\ARRAY LOCATIONS INTO WHICH CAN BE PLACED THE DESCRIPTION
OF A NUMBER IN THE ARGUMENT LIST. ^^NUMMAX \\WOULD NORMALLY BE THE
DIMENSION OF THE ^^NUMSIN, NUMVAL \\AND ^^VALNUM \\ARRAYS. ^IF
^^NUMMAX \\EQUALS ^^NUMLOW, \\THEN AT MOST A SINGLE NUMBER CAN BE
EVALUATED IN THE ARGUMENT LIST EVEN IF A SERIES OF SETS OF NUMBERS
IS ENABLED BY EITHER OF THE ARGUMENTS ^^LSTTYP \O\R LEGAL. I\F
NUMMAX \\IS LESS THAN ^^NUMLOW, \\THEN NO NUMBERS CAN BE EVALUATED
IN THE ARGUMENT LIST.
.SKIP
.INDENT -9
^^INTRVL#=#\\THE MAXIMUM NUMBER OF NUMERIC ARGUMENTS WHICH CAN BE
SEPARATED BY SLASHES AND/OR BY COLONS TO FORM A SET OF NUMERIC
ARGUMENTS. ^EACH SLASH OR COLON CAUSES THE DESCRIPTION OF THE
IMMEDIATELY FOLLOWING NUMERIC ARGUMENT TO BE PLACED INTO THE NEXT
HIGHER LOCATION IN THE ^^NUMSIN, NUMVAL \\AND ^^VALNUM \\ARRAYS. ^IF
2 NUMERIC ARGUMENTS ARE SEPARATED BY SOMETHING OTHER THAN A SLASH OR
COLON, THEN THESE ARGUMENTS ARE TAKEN TO BE PART OF A SERIES OF SETS
OF NUMBERS, AND THE DESCRIPTION OF THE SECOND NUMBER IS PLACED INTO
THE LOCATIONS IN THE ^^NUMSIN, NUMVAL \\AND ^^VALNUM \\ARRAYS HAVING
SUBSCRIPTS GREATER BY THE VALUE OF ^^INTRVL \\THAN THE SUBSCRIPTS OF
THE LOCATIONS INTO WHICH WAS PLACED THE DESCRIPTION OF THE FIRST
NUMBER OF THE PREVIOUS SET. ^FOR EXAMPLE, IF
.SKIP
.INDENT 5
^^NUMLOW=1,#NUMMAX=36#(\\OR GREATER)#AND#^^INTRVL=5,
.SKIP
\\THEN THE ARGUMENT LIST
.SKIP
.INDENT 5
1/2//4#//+8/,11+16^^WORD+21'TEXT STRING'26,31#36
.SKIP
\\WOULD CONSIST OF THE WORD ^^WORD, \\THE TEXT STRING ^^TEXT STRING,
\\AND THE NUMBERS 1, 2, 4, 8, 11, 16, 21, 26, 31 AND 36 WHICH WERE
CHOSEN FOR THE EXAMPLE SO AS TO BE STORED AT SUBSCRIPTS EQUAL TO
THEIR VALUES. ^THE ^^NUMSIN \\ARRAY LOCATIONS HAVING SUBSCRIPTS 3,
6, 7 AND 9 WOULD BE RETURNED SET TO -1 TO SHOW THAT THE
CORRESPONDING NUMBERS WERE INDICATED BY SLASHES OR COLONS TO BE
MISSING.
.SKIP
.INDENT -9
^^LOWWRD#=#\\SUBSCRIPT OF THE LOCATION IN THE ^^IWORD \\ARRAY WHICH
CONTAINS THE FIRST CHARACTER OF THE FIRST WORD IN THE DICTIONARY.
^NOTE THAT IF ^^KNTLTR(LOWKNT) \\IS LESS THAN OR EQUAL TO ZERO, THEN
THE FIRST CHARACTER OF THE FIRST WORD IS INSTEAD CONTAINED IN
^^IWORD(LOWWRD-KNTLTR(LOWKNT)).
.SKIP
.LEFT MARGIN 9
.RIGHT MARGIN 60
.INDENT -9
MAXWRD#=#\\MAXIMUM DIMENSION OF THE ^^IWORD \\ARRAY.
.SKIP
.INDENT -9
^^IWORD##=#\\DICTIONARY ARRAY CONTAINING THE CHARACTERS OF THE
COMMAND WORDS WHICH ARE TO BE RECOGNIZED, 1 CHARACTER PER ARRAY
LOCATION AS READ BY AN ^A1 FORMAT OR ELSE DEFINED BY 1^H FIELD. ^ALL
ALPHABETIC LETTERS WITHIN THE ^^IWORD \\ARRAY MUST BE SUPPLIED IN
UPPER CASE. ^THE COMMAND WORD TYPED BY THE USER AND READ INTO THE
INPUT BUFFER ARRAY ^^IBUFFR \\CAN BE SPLIT INTO 2 OR MORE PORTIONS
ANY OF WHICH CAN BE ABBREVIATED AND/OR SEPARATED BY SPACES OR TABS
IF THE WORD IN THE ^^IWORD \\ARRAY CONTAINS A SINGLE SPACE AT THE
LOCATION AT WHICH THE SPLIT IS ALLOWED, AND IF THE LENGTH STORED IN
THE ^^KNTLTR \\ARRAY IS 100 MORE THAN THE NUMBER OF CHARACTERS
INCLUDING THE SPACE OR SPACES WHICH FORM THE WORD IN THE ^^IWORD
\\ARRAY. ^FOR EXAMPLE, IF THE ^^IWORD \\ARRAY CONTAINS
.SKIP
.INDENT 5
1^^HN,1HO,1H ,1HL,1HI,1HM,1HI,1HT
.SKIP
\\AND IF THE ^^KNTLTR \\ARRAY CONTAINS THE CORRESPONDING LENGTH OF
108, THEN THIS WORD COULD BE SELECTED BY ANY OF THE LETTER SEQUENCES
.SKIP
.NOFILL
.INDENT 5
^^N, NO, N L, NL, NO L, NOL, N LI \O\R NLI
.SKIP
.FILL
\\PROVIDING IN EACH CASE THAT THE SEQUENCE IS NOT AMBIGUOUS.
.SKIP
.INDENT -9
^^LOWKNT#=#\\SUBSCRIPT OF THE ^^KNTLTR \\ARRAY LOCATION CONTAINING
THE LENGTH OF THE FIRST WORD WHICH CAN BE MATCHED IN THE ^^IWORD
\\ARRAY. ^THIS FIRST WORD WILL START AT ^^IWORD(LOWWRD). I\F LSTTYP
\\IS LESS THAN ZERO INDICATING THAT THE ARGUMENT LIST TYPE IS
SPECIFIED IN THE ^^LEGAL \\ARRAY FOR EACH POSSIBLE COMMAND WORD,
THEN ^^LOWKNT \\IS ALSO THE SUBSCRIPT OF THE ^^LEGAL \\ARRAY
LOCATION CONTAINING THE ARGUMENT LIST TYPE ASSOCIATED WITH THE
COMMAND WORD HAVING ITS CHARACTER COUNT IN ^^KNTLTR(LOWKNT).
.SKIP
.INDENT -9
MAXKNT#=#\\SUBSCRIPT OF THE ^^KNTLTR \\ARRAY LOCATION CONTAINING THE
LENGTH OF THE FINAL WORD WHICH CAN BE MATCHED IN THE ^^IWORD
\\ARRAY. ^IF ^^LSTTYP \\IS LESS THAN ZERO INDICATING THAT THE
ARGUMENT LIST TYPE IS SPECIFIED IN THE ^^LEGAL \\ARRAY FOR EACH
POSSIBLE COMMAND WORD, THEN ^^MAXKNT \\IS ALSO THE SUBSCRIPT OF THE
^^LEGAL \\ARRAY LOCATION CONTAINING THE ARGUMENT LIST TYPE
ASSOCIATED WITH THE COMMAND WORD HAVING ITS CHARACTER COUNT IN
^^KNTLTR(MAXKNT).
.SKIP
.INDENT -9
KNTLTR#=#\\ARRAY CONTAINING THE NUMBERS OF CHARACTERS IN THE WORDS
IN THE ^^IWORD \\ARRAY. ^A ZERO OR NEGATIVE VALUE IN THE ^^KNTLTR
\\ARRAY OFFSETS THE NEXT POSSIBLE WORD WHICH CAN BE MATCHED IN THE
^^IWORD \\ARRAY BY THE NUMBER OF LETTERS GIVEN BY THE ABSOLUTE VALUE
OF THE NEGATIVE NUMBER IN THE ^^KNTLTR \\ARRAY. ^THE DIMENSION OF
^^KNTLTR \\MUST BE AT LEAST ^^MAXKNT. F\\OR EXAMPLE TO RECOGNIZE THE
WORDS
.SKIP
.INDENT 5
^^YES, NO, MAYBE
.SKIP
\\THE CONTENTS OF THE ^^IWORD \\ARRAY WOULD BE
.SKIP
.INDENT 5
1^^HY,1HE,1HS,1HN,1HO,1HM,1HA,1HY,1HB,1HE
.SKIP
\\AND THE CONTENTS OF THE ^^KNTLTR \\ARRAY WOULD BE
.SKIP
.INDENT 5
3,2,5
.SKIP
.LEFT MARGIN 9
.RIGHT MARGIN 60
.INDENT -9
^^LEGAL##=#\I\F LSTTYP \\HAS THE VALUE -1, THEN ^^LEGAL \\IS AN
ARRAY WHICH SPECIFIES FOR EACH POSSIBLE COMMAND WORD THE TYPE OF
NUMERIC ARGUMENTS, REAL OR INTEGER, WHICH CAN BE EVALUATED, AND THE
TYPE OF ARGUMENT, WORD OR SET OF NUMBERS OR TEXT STRING, WHICH CAN
BE PRESENT MORE THAN ONCE IN THE ARGUMENT LIST. ^THE SPECIFICATION
OF THE ALLOWABLE ARGUMENT LIST CONSTRUCTION FOR A PARTICULAR COMMAND
WORD IS FOUND AT THE SAME SUBSCRIPT IN THE ^^LEGAL \\ARRAY AS THE
CHARACTER COUNT IN THE ^^KNTLTR \\ARRAY. ^IF ^^LSTTYP \\IS GREATER
THAN OR EQUAL TO ZERO, THEN THE CONTENTS OF THE ^^LEGAL \\ARRAY ARE
IGNORED.
.SKIP
^THE VALUES 0 THROUGH 8 IN THE ^^LEGAL \\ARRAY SPECIFY THE FOLLOWING
ALLOWABLE ARGUMENT LIST CONSTRUCTIONS. ^THE VALUES 5, 6, 7 AND 8
SPECIFY THAT NUMERIC ARGUMENTS ARE TO BE EVALUATED AS REAL NUMBERS,
AND FOR THE ROUTINE ^^DAIHST \\THESE VALUES IN THE ^^LEGAL \\ARRAY
ARE EXACTLY EQUIVALENT TO THE VALUES 1, 2, 3 AND 4 RESPECTIVELY.
.INDENT -2
=#0 (OR -1), NO DESCRIPTIONS OF ARGUMENTS ARE TO BE RETURNED TO THE
CALLING PROGRAM. ^THE ARGUMENTS ARE, HOWEVER, INTERPRETED TO FIND
THE RIGHT END OF THE STATEMENT. ^IF AN ARGUMENT IS FOUND, THEN
^^KIND \\WILL BE RETURNED WITH ONE OF THE VALUE 7, 8, 9 OR 10,
DEPENDING UPON THE TYPE OF THE ARGUMENT, INSTEAD OF BEING RETURNED
WITH THE VALUE 3.
.INDENT -2
=#1, THE TYPE OF ARGUMENT WHICH CAN BE REPEATED IS THE TYPE OF THE
FIRST ARGUMENT ENCOUNTERED, WHETHER OR NOT THIS IS PRECEDED BY
COMMAS. ^THE COMMAS DO, HOWEVER, INDICATE MISSING ARGUMENTS OF THE
SAME TYPE AS THAT EVENTUALLY FOUND. ^ADDITIONAL ARGUMENTS OF TYPES
OTHER THAN THAT OF THE FIRST ARGUMENT ENCOUNTERED ARE NOT ALLOWED.
^IF AN ADDITIONAL ARGUMENT OF ANOTHER TYPE IS FOUND, THEN EVALUATION
OF THE ARGUMENT LIST WILL BE TERMINATED EXCEPT INSOFAR AS IS
NECESSARY TO DETECT THE END OF THE STATEMENT, AND ^^KIND \\WILL BE
RETURNED CONTAINING ONE OF THE VALUES 8, 9 OR 10 INDICATING THE TYPE
OF THE ILLEGAL ARGUMENT. ^IF A SET OF NUMBERS IS FOUND, IT IS
EVALUATED AS A SET OF INTEGERS.
.INDENT -2
=#2, ALLOW A SERIES OF WORDS. ^A SINGLE TEXT STRING AND/OR A SINGLE
SET OF NUMBERS CAN ALSO APPEAR IN THE ARGUMENT LIST. ^IF A SET OF
NUMBERS IS FOUND, IT IS EVALUATED AS A SET OF INTEGERS.
.INDENT -2
=#3, ALLOW A SERIES OF SETS OF INTEGERS. ^A SINGLE WORD AND/OR A
SINGLE TEXT STRING CAN ALSO APPEAR IN THE ARGUMENT LIST.
.INDENT -2
=#4, ALLOW A SERIES OF TEXT STRINGS. ^A SINGLE WORD AND/OR A SINGLE
SET OF NUMBERS CAN ALSO APPEAR IN THE ARGUMENT LIST. ^IF A SET OF
NUMBERS IS FOUND, IT IS EVALUATED AS A SET OF INTEGERS.
.INDENT -2
=#5, 6, 7 AND 8, SAME AS THE ^^LEGAL \\ARRAY VALUES OF 1, 2, 3 AND 4
RESPECTIVELY, EXCEPT THAT IF A NUMBER OR SET OF NUMBERS OR SERIES OF
SETS OF NUMBERS ARE ENCOUNTERED, THESE NUMBERS ARE EVALUATED AS REAL
NUMBERS AND RETURNED IN THE ^^VALNUM \\ARRAY RATHER THAN IN THE
^^NUMVAL \\ARRAY. ^FOR THE ROUTINE ^^DAIHST, \\THE ^^LEGAL \\ARRAY
VALUES OF 5, 6, 7 AND 8 ARE EXACTLY EQUIVALENT TO THE ^^LEGAL
\\ARRAY VALUES OF 1, 2, 3 AND 4 RESPECTIVELY.
.LEFT MARGIN 9
.INDENT -2
=#9, ALL ARGUMENTS WILL BE TEXT STRINGS DELIMITED BY PARENTHESES,
NOT BY APOSTROPHES. ^EACH TEXT STRING BEGINS WITH THE FIRST PRINTING
CHARACTER AND EXTENDS TO THE NEXT PUNCTUATION CHARACTER OR SPACE, OR
IF A PARENTHESIS IS ENCOUNTERED WITHIN THE TEXT STRING, TO THE
PARENTHESIS WHICH RETURNS THE PARENTHETICAL LEVEL COUNT TO ZERO. ^AN
APOSTROPHE CAN BE INCLUDED ANYWHERE WITHIN THE TEXT STRING TO
INDICATE THAT THE FOLLOWING CHARACTER IS TO BE INCLUDED WITHIN THE
TEXT STRING AND IS NOT TO CHANGE THE PARENTHETICAL LEVEL COUNT.
^SINCE A LEADING PARENTHESIS IS NOT NECESSARY, IT IS INCLUDED WITHIN
THE TEXT STRING IF FOUND. ^THE CLOSING PARENTHESIS IS NEVER INCLUDED
WITHIN THE CONTENTS OF THE TEXT STRING.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION CONTAINING
THE RIGHTMOST (HIGHEST SUBSCRIPT) CHARACTER IN THE LINE BEING
INTERPRETED. ^^MAXBFR \\WOULD NORMALLY BE THE DIMENSION OF THE
^^IBUFFR \\ARRAY.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED FOR BOTH INPUT AND OUTPUT.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IBUFFR#=#\\THE INPUT BUFFER ARRAY CONTAINING THE CHARACTERS OF THE
LINE BEING INTERPRETED, ONE CHARACTER PER ARRAY LOCATION, AS READ BY
A MULTIPLE OF AN ^A1 FORMAT. ^SUCH A LINE CAN CONTAIN ONE OR MORE
STATEMENTS. ^THE ALPHABETIC LETTERS FORMING THE COMMAND WORDS AND
THE NUMERIC EXPONENTS WHICH APPEAR IN THE ^^IBUFFR \\ARRAY CAN BE
EITHER UPPER OR LOWER CASE.
.SKIP
^IF A QUOTED TEXT STRING ITSELF CONTAINING APOSTROPHES IS FOUND IN
THE CONTENTS OF THE ^^IBUFFR \\ARRAY, THEN THE EXTRA APOSTROPHES
NEEDED TO MARK THE APOSTROPHES WHICH ARE TO REMAIN IN THE TEXT
STRING ARE REMOVED FROM THE TEXT STRING.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LOWBFR#=#\\SUBSCRIPT WITHIN THE ^^IBUFFR \\ARRAY OF THE LOCATION
WHICH CONTAINS THE FIRST (LEFTMOST) CHARACTER OF THE LINE OF TEXT TO
BE INTERPRETED. ^^LOWBFR \\WILL BE RETURNED POINTING TO THE FIRST
CHARACTER BEYOND (TO THE RIGHT OF) THE INTERPRETED STATEMENT. ^IF A
SEMICOLON APPEARS AT THE END OF THE STATEMENT, THEN ^^LOWBFR \I\S
\\RETURNED POINTING TO THE SEMICOLON AND WILL BE ADVANCED BEYOND THE
SEMICOLON BY THE SUBSEQUENT CALL TO THIS ROUTINE. ^IF AN EXCLAMATION
POINT APPEARS AT THE END OF THE STATEMENT, OR IF THERE ARE NO MORE
PRINTING CHARACTERS TO THE RIGHT OF THE STATEMENT, THEN ^^LOWBFR
\\WILL BE RETURNED CONTAINING ^^MAXBFR+1, \\BUT THE CALLING PROGRAM
SHOULD NOT READ IN A NEW LINE OF TEXT AND SHOULD NOT RESET ^^LOWBFR
\\TO THE START OF THE NEW CONTENTS OF THE BUFFER UNTIL AFTER
^^DAHEST \\HAS RETURNED ^^KIND=1 \\INDICATING THAT THE EVALUATION OF
THE LINE OF TEXT HAS BEEN COMPLETED.
.SKIP
.INDENT -9
^^KIND###=#\\MUST BE SET TO ZERO BY THE CALLING PROGRAM BEFORE THIS
ROUTINE IS FIRST CALLED TO EVALUATE A LINE OF TEXT. ^^KIND \\IS THEN
RETURNED DESCRIBING THE TYPE OF STATEMENT WHICH WAS EVALUATED. ^THE
CALLING PROGRAM SHOULD RESET ^^KIND \\TO HAVE THE VALUE ZERO IF THE
EVALUATION OF THE CONTENTS OF THE LINE OF TEXT IS BEING ABANDONED BY
THE CALLING PROGRAM BEFORE THIS ROUTINE HAS INDICATED BY RETURNING
^^KIND=1 \\THAT IT HAS COMPLETED THE EVALUATION OF THE LINE OF TEXT.
^EXCEPT FOR THIS INSTANCE IN WHICH THE INTERPRETATION IS BEING
ABANDONED BY THE CALLING PROGRAM, THE VALUE OF ^^KIND \\IS OTHERWISE
PASSED UNCHANGED TO THE SUBSEQUENT CALL TO THIS ROUTINE.
.INDENT -2
=#1, (PROCESSING COMPLETED) RETURNED IF THE PREVIOUS CALLS TO THIS
ROUTINE HAVE COMPLETED THE EVALUATION OF THE CONTENTS OF THE LINE OF
TEXT. ^IF THE ORIGINAL LINE OF TEXT CONTAINED NO PRINTING CHARACTERS
OR CONTAINED A LEADING EXCLAMATION POINT INDICATING THAT THE
CHARACTERS TO ITS RIGHT FORMED A COMMENT, THEN THE PREVIOUS CALL TO
THIS ROUTINE RETURNED ^^KIND=2 \\TO INDICATE AN EMPTY STATEMENT.
^THE CALLING PROGRAM SHOULD READ A NEW LINE OF TEXT AND RESET
^^LOWBFR \\TO POINT TO THE FIRST CHARACTER IN THE NEW TEXT.
.INDENT -2
=#2, (EMPTY STATEMENT) RETURNED IF THE ORIGINAL LINE OF TEXT
CONTAINED NO PRINTING CHARACTERS OR CONTAINED A LEADING EXCLAMATION
POINT INDICATING THAT THE CHARACTERS TO ITS RIGHT FORMED A COMMENT.
^^KIND \\IS ALSO RETURNED SET TO 2 IF AN EXTRA SEMICOLON INDICATES A
MISSING STATEMENT. ^A LEADING SEMICOLON WOULD INDICATE AN INITIAL
MISSING STATEMENT. ^A FINAL SEMICOLON, POSSIBLY FOLLOWED BY AN
EXCLAMATION POINT AND COMMENT, WOULD INDICATE A FINAL MISSING
STATEMENT. ^TWO ADJACENT SEMICOLONS WOULD INDICATE A MISSING
STATEMENT BETWEEN THEM. ^A LINE OF TEXT IN WHICH THE ONLY PRINTING
CHARACTERS ARE 2 SEMICOLONS, AND POSSIBLY A FOLLOWING EXCLAMATION
POINT AND COMMENT, WOULD SPECIFY 3 MISSING STATEMENTS.
.INDENT -2
=#3, (CORRECT STATEMENT) RETURNED IF THE STATEMENT WAS NOT EMPTY AND
WAS EVALUATED WITHOUT ERRORS. ^IF ^^KMDTYP \\IS GREATER THAN OR
EQUAL TO ZERO, THEN A KNOWN COMMAND WORD, OR ELSE A NONAMBIGUOUS
ABBREVIATION THEREOF, WAS FOUND AND THE SEQUENCE NUMBER OF THIS
COMMAND WORD WITHIN THE DICTIONARY IS RETURNED AS THE VALUE OF
^^KOMAND. I\F KMDTYP \\IS LESS THAN ZERO, THEN ^^KOMAND \I\S
\\RETURNED WITH THE VALUE ZERO, AND THE STATEMENT CONTAINED AT LEAST
A COMMA, A SLASH, A COLON OR AN ARGUMENT.
.INDENT -2
=#4, (INITIAL NUMBER) RETURNED IF ^^KMDTYP \\IS GREATER THAN ZERO,
AND IF A NUMBER WAS FOUND AT THE START OF THE STATEMENT. ^^MIDPRT
\\IS RETURNED CONTAINING THE SUBSCRIPT WITHIN THE ^^IBUFFR \\ARRAY
OF THE CHARACTER TO THE IMMEDIATE RIGHT OF THE NUMBER. ^^LMTPRT \I\S
\\RETURNED CONTAINING THE SUBSCRIPT WITHIN THE ^^IBUFFR \\ARRAY OF
THE RIGHTMOST PRINTING CHARACTER WITHIN THE ^^IBUFFR \\ARRAY. ^IF NO
PRINTING CHARACTERS APPEAR TO THE RIGHT OF THE NUMBER, THEN ^^LMTPRT
\\WILL BE RETURNED POINTING TO THE RIGHTMOST CHARACTER OF THE
NUMBER, AND WILL BE LESS THAN ^^MIDPRT. O\\THER THAN TO DETERMINE
THE RIGHTMOST PRINTING CHARACTER, THE CHARACTERS TO THE RIGHT OF THE
NUMBER ARE NOT INTERPRETED, AND IN PARTICULAR ARE NOT TESTED TO FIND
APOSTROPHES, SEMICOLONS AND EXCLAMATION POINTS.
.INDENT -2
=#5, (MISSING COMMAND) RETURNED IF A COMMAND WORD OR ELSE A LEADING
NUMBER WAS REQUIRED BUT NOT FOUND, BUT THE STATEMENT IS NOT EMPTY.
^NO ARGUMENT DESCRIPTIONS ARE RETURNED TO THE CALLING PROGRAM. ^THIS
VALUE OF ^^KIND \\IS NEVER RETURNED IF ^^KMDTYP \\IS LESS THAN ZERO.
^IF ^^KMDTYP \\IS ZERO, THEN THE STATEMENT STARTS WITH A NUMBER, A
TEXT STRING, A COMMA, A SLASH OR A COLON SINCE ANY OTHER INITIAL
PRINTING CHARACTERS WHICH DO NOT MATCH A WORD IN THE DICTIONARY
WOULD BE ASSUMED TO FORM AN UNKNOWN OR MISSPELLED COMMAND WORD. ^IF
^^KMDTYP \\IS GREATER THAN ZERO, THEN THE STATEMENT STARTS WITH A
TEXT STRING, A COMMA, A SLASH OR A COLON.
.INDENT -2
=#6, (UNKNOWN COMMAND) RETURNED IF AN INITIAL COMMAND WORD WAS
REQUIRED, BUT THE STATEMENT STARTS WITH A SEQUENCE OF PRINTING
CHARACTERS WHICH COULD FORM A COMMAND WORD, BUT WHICH DO NOT MATCH A
WORD IN THE DICTIONARY, OR WHICH FORM AN AMBIGUOUS ABBREVIATION OF 2
OR MORE WORDS IN THE DICTIONARY, OR WHICH DO MATCH A SINGLE WORD IN
THE DICTIONARY BUT ARE FOLLOWED IMMEDIATELY BY ADDITIONAL ALPHABETIC
CHARACTERS OR DIGITS. ^^INIPRT \\AND ^^MIDPRT \\ARE RETURNED
POINTING TO THE LEFTMOST AND RIGHTMOST CHARACTERS IN THIS UNKNOWN
COMMAND WORD. ^NO ARGUMENT DESCRIPTIONS ARE RETURNED TO THE CALLING
PROGRAM. ^THIS VALUE OF ^^KIND \\IS NEVER RETURNED IF ^^KMDTYP \I\S
\\LESS THAN ZERO. ^IF ^^KMDTYP \\IS GREATER THAN OR EQUAL TO ZERO,
THEN THE FIRST PRINTING CHARACTER IN THE STATEMENT IS NOT ONE OF THE
CHARACTERS EXCLAMATION POINT, SEMICOLON, APOSTROPHE, COMMA, SLASH OR
COLON, AND IS NOT ONE OF THE CHARACTERS WHICH CAN START A NUMBER.
.INDENT -2
=#7, 8, 9 OR 10, (TOO MANY ARGUMENTS) SAME AS WHEN ^^KIND \I\S
\\RETURNED CONTAINING 3, EXCEPT THAT THE MAXIMUM NUMBER OF ARGUMENTS
OF A SINGLE TYPE WAS EXCEEDED DURING THE EVALUATION OF THE ARGUMENT
LIST. ^THE DESCRIPTION OF THE ARGUMENT WHICH EXCEEDED THE LIMIT, AS
WELL AS THE DESCRIPTIONS OF ANY ARGUMENTS TO ITS RIGHT, ARE NOT
RETURNED TO THE CALLING PROGRAM, ALTHOUGH THE SCANNING OF THE
STATEMENT CONTINUES TO DETERMINE THE RIGHT END OF THE STATEMENT.
.INDENT -2
=#7, RETURNED IF TOO MANY SLASHES AND/OR TOO MANY COLONS WERE
ENCOUNTERED IN A SET OF NUMBERS.
.INDENT -2
=#8, RETURNED IF TOO MANY WORDS WERE FOUND.
.INDENT -2
=#9, RETURNED IF TOO MANY SETS OF NUMBERS WERE FOUND.
.INDENT -2
=#10, RETURNED IF TOO MANY TEXT STRINGS WERE FOUND.
.LEFT MARGIN 9
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR OUTPUT. ^THEIR INPUT
VALUES ARE IGNORED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KOMAND#=#\\IF A COMMAND WORD IS RECOGNIZED, THEN ^^KOMAND \I\S
\\RETURNED CONTAINING THE SEQUENCE NUMBER OF A COMMAND WORD MATCHED
IN THE ^^IWORD \\ARRAY. ^FOR EXAMPLE, IF THE SECOND COMMAND WORD IS
MATCHED, THEN ^^KOMAND \\WOULD BE RETURNED CONTAINING 2. ^THE
SEQUENCE NUMBER OF THE COMMAND WORD IN THE ^^IWORD \\ARRAY DOES NOT
INCLUDE THE LETTERS SKIPPED OVER BY THE VALUE OF ^^LOWWRD \\BEING
GREATER THAN 1, AND DOES NOT INCLUDE THE LETTERS SKIPPED OVER BY
NEGATIVE VALUES ENCOUNTERED IN THE ^^KNTLTR \\ARRAY. ^IF A COMMAND
WORD IN THE ^^IWORD \\ARRAY IS MATCHED, ^^KMDTYP \\BEING GREATER
THAN OR EQUAL TO ZERO AND ^^KIND \\BEING RETURNED CONTAINING 3 OR
CONTAINING 7 OR GREATER, THEN ^^KOMAND \\IS THE NUMBER OF VALUES IN
THE ^^KNTLTR \\ARRAY WHICH ARE GREATER THAN ZERO STARTING AT
^^KNTLTR(LOWKNT) \\UP TO AND INCLUDING THE ^^KNTLTR \\LOCATION WHICH
CONTAINS THE NUMBER OF LETTERS IN THE COMMAND WORD WHICH IS
SUCCESSFULLY MATCHED.
.SKIP
^^KOMAND \\IS RETURNED CONTAINING ZERO IF A COMMAND WORD COULD NOT
BE MATCHED, REGARDLESS OF WHETHER THIS WAS DUE TO ^^KMDTYP \\BEING
LESS THAN ZERO, OR TO A COMMAND WORD BEING MISSING OR MISSPELLED, OR
TO THE STATEMENT STARTING WITH A NUMBER.
.SKIP
.INDENT -9
^^LCNWRD#=#\\IF A COMMAND WORD WAS RECOGNIZED, ^^KIND \\BEING
RETURNED CONTAINING 3 OR CONTAINING 7 OR GREATER, AND ^^KOMAND
\\BEING RETURNED GREATER THAN ZERO, THEN ^^LCNWRD \\IS RETURNED
CONTAINING THE SUBSCRIPT OF THE ^^IWORD \\ARRAY LOCATION WHICH
CONTAINS THE FIRST CHARACTER OF THE COMMAND WORD MATCHED IN THE
DICTIONARY.
.SKIP
^^LCNWRD \\IS RETURNED UNDEFINED IF ^^KOMAND \\IS RETURNED SET TO
ZERO INDICATING THAT NO COMMAND WORD WAS RECOGNIZED.
.SKIP
.INDENT -9
^^LCNKNT#=#\\IF A COMMAND WORD WAS RECOGNIZED, ^^KIND \\BEING
RETURNED CONTAINING 3 OR CONTAINING 7 OR GREATER, AND ^^KOMAND
\\BEING RETURNED GREATER THAN ZERO, THEN ^^LCNKNT \\IS RETURNED
CONTAINING THE SUBSCRIPT OF THE ^^KNTLTR \\ARRAY LOCATION WHICH
CONTAINS THE NUMBER OF CHARACTERS IN THE COMMAND WORD MATCHED IN THE
DICTIONARY. ^IF THERE ARE NO ZERO OR NEGATIVE ENTRIES IN THE
^^KNTLTR \\ARRAY, THEN ^^LCNKNT \\IS RETURNED EQUAL TO
^^LOWKNT+KOMAND-1.
.SKIP
LCNKNT \\IS RETURNED UNDEFINED IF ^^KOMAND \\IS RETURNED SET TO ZERO
INDICATING THAT NO COMMAND WORD WAS RECOGNIZED.
.SKIP
.INDENT -9
^^INIPRT#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR
\\ARRAY LOCATION CONTAINING THE LEFTMOST PRINTING CHARACTER IN THE
STATEMENT IF ^^KIND \\IS RETURNED CONTAINING 3 OR GREATER. ^IF AN
ERROR IS FOUND IN THE TEXT BEING INTERPRETED, THEN ^^IBUFFR(INIPRT)
\\THROUGH AND INCLUDING ^^IBUFFR(LMTPRT) \\CAN BE DISPLAYED BY THE
CALLING PROGRAM AS THE STATEMENT CONTAINING THE ERROR, ALTHOUGH THIS
TEXT MAY NOT BE EXACTLY WHAT WAS INPUT BY THE USER SINCE WHEN 2
ADJACENT APOSTROPHES APPEAR WITHIN TEXT STRINGS WHICH ARE DELIMITED
BY APOSTROPHES, ONE OF THE 2 ADJACENT APOSTROPHES WILL ALREADY HAVE
BEEN REMOVED. ^^INIPRT \\IS RETURNED UNDEFINED IF ^^KIND \I\S
\\RETURNED SET TO EITHER 1 OR 2.
.INDENT -2
=#IF ^^KIND \\IS RETURNED CONTAINING 6 INDICATING THAT AN UNKNOWN
COMMAND WORD WAS FOUND AT THE START OF THE STATEMENT, THEN ^^INIPRT
\\IS RETURNED POINTING TO THE LEFT CHARACTER OF THE UNKNOWN COMMAND
WORD. ^^MIDPRT \\WILL THEN BE RETURNED POINTING TO THE RIGHT
CHARACTER OF THE UNKNOWN COMMAND WORD.
.SKIP
.INDENT -9
^^MIDPRT#=#\\RETURNED UNDEFINED IF ^^KIND \\IS RETURNED CONTAINING
ANY VALUE OTHER THAN 4 OR 6.
.INDENT -2
=#IF ^^KMDTYP \\WAS INPUT GREATER THAN ZERO ALLOWING AN INITIAL
NUMBER IN PLACE OF AN INITIAL COMMAND WORD, AND IF SUCH AN INITIAL
NUMBER WAS FOUND SO THAT ^^KIND \\IS RETURNED CONTAINING 4, THEN
^^MIDPRT \\IS RETURNED POINTING TO THE CHARACTER TO THE IMMEDIATE
RIGHT OF THE NUMBER. ^^LMTPRT \\WILL THEN BE RETURNED POINTING TO
THE RIGHTMOST PRINTING CHARACTER ON THE LINE. ^IF NO PRINTING
CHARACTERS APPEAR TO THE RIGHT OF THE NUMBER, THEN ^^LMTPRT \\WILL
BE RETURNED POINTING TO THE RIGHTMOST CHARACTER OF THE NUMBER AND
WILL BE LESS THAN THE RETURNED VALUE OF ^^MIDPRT.
.INDENT -2
=#\I\F KIND \\IS RETURNED CONTAINING 6 INDICATING THAT AN UNKNOWN
COMMAND WORD WAS FOUND AT THE START OF THE STATEMENT, THEN ^^MIDPRT
\\IS RETURNED POINTING TO THE RIGHT CHARACTER OF THE UNKNOWN COMMAND
WORD.
.SKIP
.INDENT -9
^^LMTPRT#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR
\\ARRAY LOCATION CONTAINING THE RIGHTMOST PRINTING CHARACTER IN THE
STATEMENT IF ^^KIND \\IS RETURNED CONTAINING 3 OR GREATER. ^IF THE
STATEMENT IS FOLLOWED BY EITHER A SEMICOLON OR AN EXCLAMATION POINT,
THEN ^^LMTPRT \\IS RETURNED POINTING TO THE RIGHTMOST PRINTING
CHARACTER TO THE LEFT OF THE SEMICOLON OR EXCLAMATION POINT.
^^LMTPRT \\IS RETURNED UNDEFINED IF ^^KIND \\IS RETURNED SET TO
EITHER 1 OR 2.
.INDENT -2
=#IF ^^KMDTYP \\WAS INPUT GREATER THAN ZERO ALLOWING AN INITIAL
NUMBER IN PLACE OF AN INITIAL COMMAND WORD, AND IF SUCH AN INITIAL
NUMBER WAS FOUND SO THAT ^^KIND \\IS RETURNED CONTAINING 4, THEN
^^LMTPRT \\IS RETURNED POINTING TO THE RIGHTMOST PRINTING CHARACTER
IN THE BUFFER. ^IF NO PRINTING CHARACTERS APPEAR TO THE RIGHT OF THE
NUMBER, THEN ^^LMTPRT \\WILL BE RETURNED POINTING TO THE RIGHTMOST
CHARACTER OF THE NUMBER AND WILL BE LESS THAN THE RETURNED VALUE OF
^^MIDPRT.
.SKIP
.INDENT -9
NAMKNT#=#\\RETURNED CONTAINING THE HIGHEST SUBSCRIPT USED IN THE
^^NAMLFT \\AND ^^NAMRIT \\ARRAYS TO STORE THE LOCATIONS WITHIN THE
BUFFER OF THE ENDS OF WORDS FOUND IN THE ARGUMENT LIST. ^IF NO WORDS
WERE FOUND IN THE ARGUMENT LIST, THEN ^^NAMKNT \\WILL BE RETURNED
CONTAINING ^^NAMLOW-1. NAMKNT \\CANNOT BE RETURNED GREATER THAN
^^NAMLOW \\UNLESS THE EVALUATION OF A SERIES OF WORDS IS ENABLED.
.SKIP
.INDENT -9
^^NAMLFT#=#\\ARRAY RETURNED CONTAINING THE SUBSCRIPTS WITHIN THE
^^IBUFFR \\ARRAY OF THE LOCATIONS WHICH CONTAIN THE LEFT CHARACTERS
OF THE WORDS IN THE ARGUMENT LIST. ^IF THE EVALUATION OF A SERIES OF
WORDS IS ENABLED, BUT SOME INTERMEDIATE WORDS ARE INDICATED AS
MISSING BY THE APPEARANCE OF EXTRA COMMAS IN THE ARGUMENT LIST, THEN
FOR THESE MISSING WORDS THE ^^NAMRIT \\ARRAY WILL CONTAIN VALUES
WHICH ARE LESS THAN THOSE IN THE ^^NAMLFT \\ARRAY. ^MISSING WORDS AT
THE RIGHT END OF THE STATEMENT INDICATED BY EXTRA COMMAS AT THE
RIGHT END OF THE STATEMENT ARE NOT INCLUDED IN THE VALUE OF ^^NAMKNT
\\AND ARE NOT INDICATED AS BEING MISSING BY THE VALUES IN THE
^^NAMLFT \\AND ^^NAMRIT \\ARRAYS.
.SKIP
.INDENT -9
^^NAMRIT#=#\\ARRAY RETURNED CONTAINING THE SUBSCRIPTS WITHIN THE
^^IBUFFR \\ARRAY OF THE LOCATIONS WHICH CONTAIN THE RIGHT CHARACTERS
OF THE WORDS IN THE ARGUMENT LIST. ^IF THE EVALUATION OF A SERIES OF
WORDS IS ENABLED, BUT SOME INTERMEDIATE WORDS ARE INDICATED AS
MISSING BY THE APPEARANCE OF EXTRA COMMAS IN THE ARGUMENT LIST, THEN
FOR THESE MISSING WORDS THE ^^NAMRIT \\ARRAY WILL CONTAIN VALUES
WHICH ARE LESS THAN THOSE IN THE ^^NAMLFT \\ARRAY. ^MISSING WORDS AT
THE RIGHT END OF THE STATEMENT INDICATED BY EXTRA COMMAS AT THE
RIGHT END OF THE STATEMENT ARE NOT INCLUDED IN THE VALUE OF ^^NAMKNT
\\AND ARE NOT INDICATED AS BEING MISSING BY THE VALUES IN THE
^^NAMLFT \\AND ^^NAMRIT \\ARRAYS.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^MRKKNT#=#\\RETURNED CONTAINING THE HIGHEST SUBSCRIPT USED IN THE
^^MRKLFT \\AND ^^MRKRIT \\ARRAYS TO STORE THE LOCATIONS WITHIN THE
^^IBUFFR \\ARRAY OF THE ENDS OF QUOTED TEXT STRINGS FOUND IN THE
ARGUMENT LIST. ^IF NO QUOTED TEXT STRINGS WERE FOUND IN THE ARGUMENT
LIST, THEN ^^MRKKNT \\WILL BE RETURNED CONTAINING ^^MRKLOW-1. MRKKNT
\\CANNOT BE RETURNED GREATER THAN ^^MRKLOW \\UNLESS THE EVALUATION
OF A SERIES OF QUOTED TEXT STRINGS IS ENABLED.
.SKIP
.INDENT -9
^^MRKLFT#=#\\ARRAY RETURNED CONTAINING THE SUBSCRIPTS WITHIN THE
^^IBUFFR \\ARRAY OF THE LOCATIONS WHICH CONTAIN THE LEFT CHARACTERS
OF THE QUOTED TEXT STRINGS IN THE ARGUMENT LIST. ^THE CHARACTER
POINTED TO BY A VALUE IN THE ^^MRKLFT \\ARRAY IS THE CHARACTER TO
THE IMMEDIATE RIGHT OF THE INITIAL APOSTROPHE OR OF THE INITIAL
PARENTHESIS AT THE LEFT END OF THE QUOTED TEXT STRING. ^IF
^^LSTTYP=9, \\OR IF ^^LSTTYP=-1 \\AND THE VALUE IN THE ^^LEGAL
\\ARRAY CORRESPONDING TO THE COMMAND IS 9, THEN THE CHARACTER
POINTED TO BY A VALUE IN THE ^^MRKLFT \\ARRAY IS EITHER A LEADING
PARENTHESIS, OR IS THE LEFTMOST PRINTING CHARACTER WHICH IS NEITHER
A PUNCTUATION CHARACTER NOR A PARENTHESIS.
.SKIP
^THE CHARACTER TO THE LEFT OF THE DELIMITING CHARACTER AT THE RIGHT
END OF THE QUOTED TEXT STRING IS POINTED TO BY THE LOCATION IN THE
^^MRKRIT \\ARRAY HAVING THE SAME SUBSCRIPT AS THE ^^MRKLFT \\ARRAY
LOCATION POINTING TO THE CHARACTER AT THE LEFT END OF THE QUOTED
TEXT STRING. ^IF A LEADING APOSTROPHE IS FOLLOWED IMMEDIATELY BY
ANOTHER APOSTROPHE WHICH IS NOT ITSELF FOLLOWED BY AN APOSTROPHE, OR
IF A LEADING LEFT PARENTHESIS IS FOLLOWED IMMEDIATELY BY A CLOSING
RIGHT PARENTHESIS, OR IF A LEADING RIGHT PARENTHESIS IS FOLLOWED
IMMEDIATELY BY A CLOSING LEFT PARENTHESIS, THEN THE QUOTED TEXT
STRING IS CONSIDERED TO BE EMPTY AND THE LOCATION IN THE ^^MRKLFT
\\ARRAY WILL POINT TO THE CLOSING DELIMITING CHARACTER WHILE THE
LOCATION IN THE ^^MRKRIT \\ARRAY POINTS TO THE LEADING DELIMITING
CHARACTER SO THAT THE VALUE IN THE ^^MRKRIT \\ARRAY IS 1 LESS THAN
THAT OF THE CORRESPONDING LOCATION IN THE ^^MRKLFT \\ARRAY. ^IF THE
CLOSING DELIMITING CHARACTER IS NOT FOUND, THEN THE LOCATION IN THE
^^MRKRIT \\ARRAY WILL BE RETURNED POINTING TO THE RIGHTMOST PRINTING
CHARACTER IN THE ^^IBUFFR \\ARRAY, OR TO THE LEADING DELIMITING
CHARACTER IF NO PRINTING CHARACTERS APPEAR TO THE RIGHT OF THE
LEADING DELIMITING CHARACTER.
.SKIP
^IF THE EVALUATION OF A SERIES OF QUOTED TEXT STRINGS IS ENABLED,
BUT SOME INTERMEDIATE QUOTED TEXT STRINGS ARE INDICATED AS MISSING
BY THE APPEARANCE OF EXTRA COMMAS IN THE ARGUMENT LIST, THEN FOR
THESE MISSING QUOTED TEXT STRINGS THE ^^MRKRIT \\ARRAY WILL CONTAIN
VALUES WHICH ARE 2 LESS THAN THOSE IN THE ^^MRKLFT \\ARRAY. ^MISSING
QUOTED TEXT STRINGS AT THE RIGHT END OF THE STATEMENT INDICATED BY
EXTRA COMMAS AT THE RIGHT END OF THE STATEMENT ARE NOT INCLUDED IN
THE VALUE OF ^^MRKKNT \\AND ARE NOT INDICATED AS BEING MISSING BY
THE VALUES IN THE ^^MRKLFT \\AND ^^MRKRIT \\ARRAYS.
.SKIP
.INDENT -9
^^MRKRIT#=#\\ARRAY RETURNED CONTAINING THE SUBSCRIPTS WITHIN THE
^^IBUFFR \\ARRAY OF THE LOCATIONS WHICH CONTAIN THE RIGHT CHARACTERS
OF THE QUOTED TEXT STRINGS IN THE ARGUMENT LIST. ^THE CHARACTER
POINTED TO BY THE VALUE IN THE ^^MRKRIT \\ARRAY IS THE CHARACTER TO
THE IMMEDIATE LEFT OF THE FINAL APOSTROPHE AT THE RIGHT END OF A
QUOTED TEXT STRING WHICH IS BEGUN BY AN APOSTROPHE, OR IS THE
CHARACTER TO THE IMMEDIATE LEFT OF THE FINAL PARENTHESIS AT THE
RIGHT END OF A QUOTED TEXT STRING WHICH IS BEGUN BY A PARENTHESIS,
OR IS THE RIGHTMOST PRINTING CHARACTER ON THE LINE IF NO FINAL
DELIMITING CHARACTER IS FOUND. ^IF A QUOTED TEXT STRING IS BEGUN BY
AN APOSTROPHE AND CONTAINS 2 ADJACENT APOSTROPHES MARKING THE SINGLE
APPEARANCE OF AN APOSTROPHE AS PART OF THE QUOTED TEXT STRING, THEN
THE EXTRA APOSTROPHE IS REMOVED FROM THE QUOTED TEXT STRING AND THE
PORTION OF THE QUOTED TEXT STRING TO ITS RIGHT IS MOVED LEFT AN
EXTRA CHARACTER POSITION, AND THE POINTER IN THE ^^MRKRIT \\ARRAY
THEN MARKS THE RIGHT END OF THE QUOTED TEXT STRING AFTER THE SHIFT
IS COMPLETED.
.SKIP
^IF THE EVALUATION OF A SERIES OF QUOTED TEXT STRINGS IS ENABLED,
BUT SOME INTERMEDIATE QUOTED TEXT STRINGS ARE INDICATED AS MISSING
BY THE APPEARANCE OF EXTRA COMMAS IN THE ARGUMENT LIST, THEN FOR
THESE MISSING QUOTED TEXT STRINGS THE ^^MRKRIT \\ARRAY WILL CONTAIN
VALUES WHICH ARE 2 LESS THAN THOSE IN THE ^^MRKLFT \\ARRAY. ^MISSING
QUOTED TEXT STRINGS AT THE RIGHT END OF THE STATEMENT INDICATED BY
EXTRA COMMAS AT THE RIGHT END OF THE STATEMENT ARE NOT INCLUDED IN
THE VALUE OF ^^MRKKNT \\AND ARE NOT INDICATED AS BEING MISSING BY
THE VALUES IN THE ^^MRKLFT \\AND ^^MRKRIT \\ARRAYS.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^NUMKNT#=#\\RETURNED CONTAINING THE HIGHEST SUBSCRIPT USED IN THE
^^NUMSIN, NUMVAL \\AND ^^VALNUM \\ARRAYS TO STORE THE SIGN AND VALUE
OF NUMERIC ARGUMENTS FOUND IN THE ARGUMENT LIST. ^IF NO NUMERIC
ARGUMENTS WERE FOUND IN THE ARGUMENT LIST, THEN ^^NUMKNT \\WILL BE
RETURNED CONTAINING ^^NUMLOW-1. NUMKNT \\CANNOT BE RETURNED GREATER
THAN ^^NUMLOW+INTRVL-1 \\UNLESS THE EVALUATION OF A SERIES OF SETS
OF NUMBERS IS ENABLED. ^IF ^^KMDTYP \\IS INPUT GREATER THAN ZERO AND
IF AN INITIAL NUMBER IS FOUND IN THE STATEMENT, THEN ^^NUMKNT \\WILL
BE RETURNED EQUAL TO ^^NUMLOW \\AND THE DESCRIPTION OF THE INITIAL
NUMBER WILL BE RETURNED IN ^^NUMSIN(NUMLOW) \\AND IN EITHER
^^NUMVAL(NUMLOW) \O\R VALNUM(NUMLOW).
.SKIP
.INDENT -9
NUMSIN#=#\\ARRAY RETURNED INDICATING THE SIGN, IF ANY, WHICH
PRECEDED EACH NUMERIC ARGUMENT. ^THE VALUE OF THE ARGUMENT IS
RETURNED IN THE ^^NUMVAL \O\R VALNUM \\ARRAY LOCATION HAVING THE
SAME SUBSCRIPT AS THE ^^NUMSIN \\ARRAY LOCATION DESCRIBING THE SIGN.
^EACH LOCATION FROM ^^NUMSIN(NUMLOW) \\THROUGH ^^NUMSIN(NUMKNT) \I\S
\\RETURNED CONTAINING ONE OF THE FOLLOWING VALUES.
.INDENT -2
=#-1, RETURNED IF THE CORRESPONDING NUMERIC ARGUMENT WAS INDICATED
AS MISSING EITHER BY THE ABSENCE OF A NUMBER BEFORE A SLASH OR A
COLON, BY THE ABSENCE OF A NUMBER AFTER A SLASH OR A COLON, OR BY
THE ABSENCE OF A NUMBER BETWEEN TWO ADJACENT SLASHES OR COLONS. ^THE
CORRESPONDING LOCATION IN EITHER THE ^^NUMVAL \O\R VALNUM \\ARRAYS,
WHICHEVER IS APPROPRIATE, IS ALSO SET TO ZERO.
.INDENT -2
=#0, RETURNED IF SUBSEQUENT NUMERIC ARGUMENTS (WHICH ARE RETURNED IN
^^NUMSIN, NUMVAL \O\R VALNUM \\ARRAY LOCATIONS HAVING HIGHER
SUBSCRIPTS) APPEAR IN THE ARGUMENT LIST, BUT THE CURRENT NUMERIC
ARGUMENT WAS INDICATED AS MISSING BY LESS THAN ^^INTRVL \\NUMBERS
BEING INCLUDED IN A SET OF NUMBERS OR, BY 2 ADJACENT COMMAS IN THE
ARGUMENT LIST. ^THE CORRESPONDING LOCATION IN EITHER THE ^^NUMVAL
\O\R VALNUM \\ARRAYS, WHICHEVER IS APPROPRIATE, IS ALSO SET TO ZERO.
^MISSING NUMERIC ARGUMENTS INDICATED BY EXTRA COMMAS AT THE RIGHT
END OF THE STATEMENT ARE NOT INCLUDED IN THE VALUE OF ^^NUMKNT \\AND
ARE NOT REPRESENTED IN THE ^^NUMSIN, NUMVAL \\AND ^^VALNUM \\ARRAYS.
.INDENT -2
=#1, RETURNED IF A NUMERIC ARGUMENT WAS EVALUATED, BUT NO SIGN
APPEARED TO ITS LEFT.
.INDENT -2
=#2, RETURNED IF A MINUS SIGN APPEARED TO THE LEFT OF THE NUMERIC
ARGUMENT.
.INDENT -2
=#3, RETURNED IF A PLUS SIGN APPEARED TO THE LEFT OF THE NUMERIC
ARGUMENT.
.SKIP
.INDENT -9
^^NUMVAL#=#\\ARRAY RETURNED CONTAINING THE VALUES OF NUMERIC
ARGUMENTS EVALUATED AS INTEGERS. ^IF THE NUMERIC ARGUMENT WAS
PRECEDED BY A MINUS SIGN, THEN THE VALUE WILL BE RETURNED NEGATIVE
AND THE CORRESPONDING LOCATION IN THE ^^NUMSIN \\ARRAY WILL CONTAIN 2.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR OUTPUT, AND APPEAR ONLY
IN THE ARGUMENT LIST OF ROUTINE ^^DAHEST.
.SKIP
.LEFT MARGIN 9
.INDENT -9
VALNUM#=#\\ARRAY RETURNED CONTAINING THE VALUES OF NUMERIC ARGUMENTS
EVALUATED AS REAL NUMBERS. ^IF THE NUMERIC ARGUMENT WAS PRECEDED BY
A MINUS SIGN, THEN THE VALUE WILL BE RETURNED NEGATIVE AND THE
CORRESPONDING LOCATION IN THE ^^NUMSIN \\ARRAY WILL CONTAIN 2.
.SKIP
.INDENT -9
^^IFLOAT#=#\\RETURNED DESCRIBING WHETHER NUMERIC ARGUMENTS WERE
EVALUATED AS INTEGERS OR AS REAL NUMBERS.
.INDENT -2
=#0, RETURNED IF NUMERIC ARGUMENTS WERE EVALUATED AS INTEGERS. ^THE
VALUES OF THESE NUMERIC ARGUMENTS ARE THEN RETURNED IN THE ^^NUMVAL
\\ARRAY.
.INDENT -2
=#1, RETURNED IF NUMERIC ARGUMENTS WERE EVALUATED AS REAL NUMBERS.
^THE VALUES OF THESE NUMERIC ARGUMENTS ARE THEN RETURNED IN THE
^^VALNUM \\ARRAY.
.LEFT MARGIN 0
.FILL
.SKIP 2
.TEST PAGE 11
.CENTER
AN ^EXAMPLE OF THE ^USE OF ^^DAHEST
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE FOLLOWING SAMPLE PROGRAM DEMONSTRATES HOW MOST OF THE ^^DAHEST
\\ARGUMENTS ARE USED. ^THE PROGRAM ACCEPTS A LINE OF TEXT FROM THE
USER, EVALUATES THE CONTENTS OF THE LINE AND REPORTS THE RESULTS.
^THIS READING, EVALUATION AND REPORTING SEQUENCE IS REPEATED UNTIL
THE USER TERMINATES EXECUTION OF THE PROGRAM. ^TYPICAL OUTPUT IS
SHOWN AFTER THE PROGRAM LISTING. ^ARGUMENT TYPES ASSOCIATED WITH THE
11 COMMAND WORDS ARE DESCRIBED IN COMMENTS AT THE START OF THE
PROGRAM.
.SKIP
.NOFILL
^^C     RENBR(TSTHST/TEST DAHEST ROUTINE FROM FASP PACKAGE)
      DIMENSION IBUFFR(72),IWORD(148),KNTLTR(21),ISIGN(3),
     1NAMLFT(100),NAMRIT(100),MRKLFT(100),MRKRIT(100),
     2NUMSIN(100),NUMVAL(100),VALNUM(100),LEGAL(21)
C     FOLLOWING WORDS ARE IN DICTIONARY
C     REAL NUMBERS               TAKES SERIES OF REAL SETS
C     INTEGER NUMBERS         TAKES SERIES OF INTEGER SETS
C     NUMBERS                 TAKES SERIES OF INTEGER SETS
C     STRINGS         TAKES INTEGERS AND SERIES OF STRINGS
C     WORDS             TAKES INTEGERS AND SERIES OF WORDS
C     TEXT STRINGS    TAKES INTEGERS AND SERIES OF STRINGS
C     NO ARGUMENTS                    NO ARGUMENTS ALLOWED
C     NUMERIC SERIES          TAKES SERIES OF INTEGER SETS
C     NUMERAL SETS               TAKES SERIES OF REAL SETS
C     GENERAL REAL          SERIES OF 1ST FOUND TYPE, REAL
C     GENERAL INTEGER    SERIES OF 1ST FOUND TYPE, INTEGER
C     PARENTHESES       LEADING CHARACTERS AND PARENTHESES
      DATA IWORD/ 1HI,1HG,1HN,1HO,1HR,1HE,1H*,1HR,1HE,1HA,
     11HL,1H ,1HN,1HU,1HM,1HB,1HE,1HR,1HS,1HI,1HN,1HT,1HE,
     21HG,1HE,1HR,1H ,1HN,1HU,1HM,1HB,1HE,1HR,1HS,1H*,1H*,
     31H*,1H*,1HN,1HU,1HM,1HB,1HE,1HR,1HS,1HS,1HT,1HR,1HI,
     41HN,1HG,1HS,1H*,1HW,1HO,1HR,1HD,1HS,1H*,1HT,1HE,1HX,
     51HT,1H ,1HS,1HT,1HR,1HI,1HN,1HG,1HS,1H*,1HN,1HO,1H ,
     61HA,1HR,1HG,1HU,1HM,1HE,1HN,1HT,1HS,1HN,1HU,1HM,1HE,
     71HR,1HI,1HC,1H ,1HS,1HE,1HR,1HI,1HE,1HS,1HN,1HU,1HM,
     81HE,1HR,1HA,1HL,1H ,1HS,1HE,1HT,1HS,1HG,1HE,1HN,1HE,
     91HR,1HA,1HL,1H ,1HR,1HE,1HA,1HL,1HG,1HE,1HN,1HE,1HR,
     11HA,1HL,1H ,1HI,1HN,1HT,1HE,1HG,1HE,1HR,1HP,1HA,1HR,
     21HE,1HN,1HT,1HH,1HE,1HS,1HE,1HS/
      DATA KNTLTR/ 99, 99, 99, -1,112,115, -4,  7,  7, -1,
     1              5, -1,112, -1,112,114,  0,112,112,115,
     2             11/
      DATA LEGAL / 0, 0, 0, 9, 7, 3, 9, 3, 4, 9,
     1             2, 9, 4, 9, 0, 3, 9, 7, 5, 1,
     2             9/
      DATA KMDTYP,LSTTYP,NAMLOW,NAMMAX,MRKLOW,MRKMAX,
     1NUMLOW,NUMMAX,INTRVL,LOWWRD,MAXWRD,LOWKNT,MAXKNT,
     2MAXBFR/1,-1,21,25,76,80,15,39,5,7,148,4,21,72/
      DATA ISIGN/1H ,1H-,1H+/
      DATA IGREAT,IYES/1H>,1HY/
      DATA ITTY,JTTY/5,5/
      WRITE(JTTY,1)
    1 FORMAT(13H TEST DAIHST ,$)
      READ(ITTY,7)IANS
      KIND=0
    2 WRITE(JTTY,3)KMDTYP,LSTTYP
    3 FORMAT(8H KMDTYP(,I2,10H), LSTTYP(,I2,2H) ,$)
      READ(ITTY,4)KMDTYP,LSTTYP
    4 FORMAT(2I)
    5 WRITE(JTTY,6)
    6 FORMAT(1X,1H*,$)
      READ(ITTY,7)IBUFFR
    7 FORMAT(100A1)
      LOWBFR=1
C
C     FIND NEXT STATEMENT IN BUFFER
      IFANY=0
    8 IF(IANS.EQ.IYES)GO TO 9
      CALL DAHEST(KMDTYP,LSTTYP,NAMLOW,NAMMAX,MRKLOW,
     1MRKMAX,NUMLOW,NUMMAX,INTRVL,LOWWRD,MAXWRD,IWORD,
     2LOWKNT,MAXKNT,KNTLTR,LEGAL,MAXBFR,IBUFFR,LOWBFR,
     3KIND,KOMAND,LCNWRD,LCNKNT,INIPRT,MIDPRT,LMTPRT,
     4NAMKNT,NAMLFT,NAMRIT,MRKKNT,MRKLFT,MRKRIT,NUMKNT,
     5NUMSIN,NUMVAL,VALNUM,IFLOAT)
      GO TO 10
    9 CALL DAIHST(KMDTYP,LSTTYP,NAMLOW,NAMMAX,MRKLOW,
     1MRKMAX,NUMLOW,NUMMAX,INTRVL,LOWWRD,MAXWRD,IWORD,
     2LOWKNT,MAXKNT,KNTLTR,LEGAL,MAXBFR,IBUFFR,LOWBFR,
     3KIND,KOMAND,LCNWRD,LCNKNT,INIPRT,MIDPRT,LMTPRT,
     4NAMKNT,NAMLFT,NAMRIT,MRKKNT,MRKLFT,MRKRIT,NUMKNT,
     5NUMSIN,NUMVAL)
      IFLOAT=0
   10 IF(KIND.LE.2)GO TO 12
      IFANY=1
      WRITE(JTTY,11)(IBUFFR(I),I=INIPRT,LMTPRT),IGREAT
   11 FORMAT(10X,1H<,100A1)
   12 IF(KOMAND.LE.0)GO TO 14
      IEND=KNTLTR(LCNKNT)
      IF(IEND.GE.100)IEND=IEND-100
      IEND=LCNWRD+IEND-1
      WRITE(JTTY,13)(IWORD(I),I=LCNWRD,IEND),IGREAT
   13 FORMAT(11H COMMAND =<,100A1)
   14 GO TO(15,16,25,18,21,23,25,25,25,25),KIND
C
C     CONDITIONS FOR WHICH NO ARGUMENTS ARE REPORTED
   15 IF(IFANY.LE.0)GO TO 2
      GO TO 5
   16 WRITE(JTTY,17)
   17 FORMAT(16H EMPTY STATEMENT)
      GO TO 8
   18 J=NUMSIN(NUMLOW)
      WRITE(JTTY,19)NUMVAL(NUMLOW),ISIGN(J)
   19 FORMAT(10H NUMBER  =,1I12,1A1)
      IF(MIDPRT.LE.LMTPRT)WRITE(JTTY,20)
     1(IBUFFR(I),I=MIDPRT,LMTPRT),IGREAT
   20 FORMAT(11H TEXT    =<,100A1)
      GO TO 8
   21 WRITE(JTTY,22)
   22 FORMAT(16H MISSING COMMAND)
      GO TO 8
   23 WRITE(JTTY,24)(IBUFFR(I),I=INIPRT,MIDPRT),IGREAT
   24 FORMAT(11H UNKNOWN =<,100A1)
      GO TO 8
C
C     REPORT WORD ARGUMENTS
   25 I=NAMLOW-1
      N=0
   26 IF(I.GE.NAMKNT)GO TO 28
      I=I+1
      N=N+1
      J=NAMLFT(I)
      K=NAMRIT(I)
      IF(K.GE.J)WRITE(JTTY,27)N,(IBUFFR(L),L=J,K),IGREAT
   27 FORMAT(6H WORD(,I2,3H)=<,100A1)
      GO TO 26
   28 IF(KIND.EQ.8)WRITE(JTTY,29)
   29 FORMAT(15H TOO MANY WORDS)
C
C     REPORT QUOTED TEXT STRING ARGUMENTS
      I=MRKLOW-1
      N=0
   30 IF(I.GE.MRKKNT)GO TO 32
      I=I+1
      N=N+1
      J=MRKLFT(I)
      K=MRKRIT(I)
      IF(K.EQ.(J-1))WRITE(JTTY,31)N,IGREAT
      IF(K.GE.J)WRITE(JTTY,31)N,(IBUFFR(L),L=J,K),IGREAT
   31 FORMAT(6H TEXT(,I2,3H)=<,100A1)
      GO TO 30
   32 IF(KIND.EQ.10)WRITE(JTTY,33)
   33 FORMAT(22H TOO MANY TEXT STRINGS)
C
C     REPORT NUMERIC ARGUMENTS
      I=NUMLOW-1
      N=0
   34 IF(I.GE.NUMKNT)GO TO 39
      I=I+1
      N=N+1
      J=NUMSIN(I)
      IF(J.EQ.0)GO TO 34
      IF(J.LT.0)GO TO 37
      IF(IFLOAT.EQ.0)WRITE(JTTY,35)N,NUMVAL(I),ISIGN(J)
   35 FORMAT(6H NMBR(,I2,2H)=,1I12,1A1)
      IF(IFLOAT.NE.0)WRITE(JTTY,36)N,VALNUM(I),ISIGN(J)
   36 FORMAT(6H NMBR(,I2,2H)=,1E12.4,1A1)
      GO TO 34
   37 WRITE(JTTY,38)N
   38 FORMAT(6H NMBR(,I2,9H) MISSING)
      GO TO 34
   39 IF(KIND.EQ.7)WRITE(JTTY,40)
   40 FORMAT(27H TOO MANY SLASHES OR COLONS)
      IF(KIND.EQ.9)WRITE(JTTY,41)
   41 FORMAT(17H TOO MANY NUMBERS)
      GO TO 8
      END
.SKIP 2
.TEST PAGE 5
.LEFT MARGIN 0
.FILL
.CENTER
S\\AMPLE ^DIALOG ^BETWEEN A ^USER AND THE ^DEMONSTRATION ^PROGRAM
.CENTER
------ ------ ------- - ---- --- --- ------------- -------
.SKIP
^IN THE FOLLOWING DIALOG BETWEEN A USER AND THE DEMONSTRATION
PROGRAM LISTED ON THE PREVIOUS PAGES, THE LINES OF TEXT TYPED BY THE
USER APPEAR RIGHT OF ASTERISKS IN THE LEFT COLUMN. ^THE PROGRAM
TYPES THE CHARACTERS FOUND IN THE EACH STATEMENT AND A SUMMARY OF
THE CONTENTS OF THE STATEMENT. ^THE DEMONSTRATION PROGRAM DEFINES
THE MAXIMUM NUMBER OF NUMBERS WHICH CAN APPEAR IN EACH NUMERIC SET
TO BE 5 SO THAT THE FIRST NUMBER OF EACH NUMERIC SET IS AT A
SUBSCRIPT 5 GREATER THAN THE FIRST NUMBER OF THE PREVIOUS SET IF A
SERIES OF NUMERIC SETS IS BOTH ENABLED AND FOUND.
.NOFILL
.SKIP
.TEST PAGE 21
^^TEST DAIHST N
KMDTYP( 1), LSTTYP(-1) 1 -1
.SKIP
*R ONE;R N TWO;R NUM THREE;REA FOUR;REALN FIVE;REA NUM
         <R ONE>
COMMAND =<REAL NUMBERS>
WORD( 1)=<ONE>
         <R N TWO>
COMMAND =<REAL NUMBERS>
WORD( 1)=<TWO>
         <R NUM THREE>
COMMAND =<REAL NUMBERS>
WORD( 1)=<THREE>
         <REA FOUR>
COMMAND =<REAL NUMBERS>
WORD( 1)=<FOUR>
         <REALN FIVE>
COMMAND =<REAL NUMBERS>
WORD( 1)=<FIVE>
         <REA NUM>
COMMAND =<REAL NUMBERS>
.SKIP
.TEST PAGE 9
*S'A STRING';STRINGSGARBAGE'A STRING';STRINGS'A STRING'
         <S'A STRING'>
COMMAND =<STRINGS>
TEXT( 1)=<A STRING>
         <STRINGSGARBAGE'A STRING'>
UNKNOWN =<STRINGSGARBAGE>
         <STRINGS'A STRING'>
COMMAND =<STRINGS>
TEXT( 1)=<A STRING>
.SKIP
.TEST PAGE 9
*WORD ONE,,'FIRST',1/2/,,FOUR;WORD,,THREE/2/3'FIRST'FOUR
         <WORD ONE,,'FIRST',1/2/,,FOUR>
COMMAND =<WORDS>
WORD( 1)=<ONE>
WORD( 4)=<FOUR>
TEXT( 1)=<FIRST>
NMBR( 1)=           1
NMBR( 2)=           2
NMBR( 3) MISSING
.SKIP
.TEST PAGE 8
         <WORD,,THREE/2/3'FIRST'FOUR>
COMMAND =<WORDS>
WORD( 3)=<THREE>
WORD( 4)=<FOUR>
TEXT( 1)=<FIRST>
NMBR( 1) MISSING
NMBR( 2)=           2
NMBR( 3)=           3
.SKIP
.TEST PAGE 10
*TEXT,1//3'TWO' 'THREE'FIRST'FOUR';TEXT/2,,'TWO'FIRST,,'FOUR
         <TEXT,1//3'TWO' 'THREE'FIRST'FOUR'>
COMMAND =<TEXT STRINGS>
WORD( 1)=<FIRST>
TEXT( 2)=<TWO>
TEXT( 3)=<THREE>
TEXT( 4)=<FOUR>
NMBR( 1)=           1
NMBR( 2) MISSING
NMBR( 3)=           3
.TEST PAGE 7
         <TEXT/2,,'TWO'FIRST,,'FOUR>
COMMAND =<TEXT STRINGS>
WORD( 1)=<FIRST>
TEXT( 2)=<TWO>
TEXT( 4)=<FOUR>
NMBR( 1) MISSING
NMBR( 2)=           2
.SKIP
.TEST PAGE 13
*I 1//3 6FIRST//13'ONE',,21;I+1//+3+6,FIRST,//+13,'ONE',,+21
         <I 1//3 6FIRST//13'ONE',,21>
COMMAND =<INTEGER NUMBERS>
WORD( 1)=<FIRST>
TEXT( 1)=<ONE>
NMBR( 1)=           1
NMBR( 2) MISSING
NMBR( 3)=           3
NMBR( 6)=           6
NMBR(11) MISSING
NMBR(12) MISSING
NMBR(13)=          13
NMBR(21)=          21
.TEST PAGE 12
         <I+1//+3+6,FIRST,//+13,'ONE',,+21>
COMMAND =<INTEGER NUMBERS>
WORD( 1)=<FIRST>
TEXT( 1)=<ONE>
NMBR( 1)=           1+
NMBR( 2) MISSING
NMBR( 3)=           3+
NMBR( 6)=           6+
NMBR(11) MISSING
NMBR(12) MISSING
NMBR(13)=          13+
NMBR(21)=          21+
.SKIP
.TEST PAGE 5
*TEXT'APOSTROPHES''IN''TEXT'(APOSTROPHES''IN''TEXT'
         <TEXT'APOSTROPHES'IN'TEXT'(APOSTROPHES''IN''TEXT' >
COMMAND =<TEXT STRINGS>
TEXT( 1)=<APOSTROPHES'IN'TEXT>
TEXT( 2)=<APOSTROPHES''IN''TEXT' >
.SKIP
.TEST PAGE 8
*TEXT '' 'TWO' '''' 'FOUR' '''''';TEXT'ONE',,'
         <TEXT '' 'TWO' ''' 'FOUR' ''''>
COMMAND =<TEXT STRINGS>
TEXT( 1)=<>
TEXT( 2)=<TWO>
TEXT( 3)=<'>
TEXT( 4)=<FOUR>
TEXT( 5)=<''>
.TEST PAGE 4
         <TEXT'ONE',,'>
COMMAND =<TEXT STRINGS>
TEXT( 1)=<ONE>
TEXT( 3)=<>
.SKIP
.TEST PAGE 16
*N A;NOA;NO A;N A-12;N A'STRING';N A WORD!ALLOWS NO ARGUMENT
         <N A>
COMMAND =<NO ARGUMENTS>
         <NOA>
COMMAND =<NO ARGUMENTS>
         <NO A>
COMMAND =<NO ARGUMENTS>
         <N A-12>
COMMAND =<NO ARGUMENTS>
TOO MANY NUMBERS
         <N A'STRING'>
COMMAND =<NO ARGUMENTS>
TOO MANY TEXT STRINGS
         <N A WORD>
COMMAND =<NO ARGUMENTS>
TOO MANY WORDS
.SKIP
.TEST PAGE 12
*'MISSING COMMANDS'; ; /55 ;; ,SAME;  -123LEADING NUMBER
         <'MISSING COMMANDS'>
MISSING COMMAND
EMPTY STATEMENT
         </55>
MISSING COMMAND
EMPTY STATEMENT
         <,SAME>
MISSING COMMAND
         <-123LEADING NUMBER>
NUMBER  =        -123-
TEXT    =<LEADING NUMBER>
.SKIP
.TEST PAGE 8
*PARENTH ONE TWO(')TWO),THREE)THREE''((FOUR))FIVE(
         <PARENTH ONE TWO(')TWO),THREE)THREE''((FOUR))FIVE(>
COMMAND =<PARENTHESES>
TEXT( 1)=<ONE>
TEXT( 2)=<TWO(')TWO>
TEXT( 3)=<THREE)THREE''>
TEXT( 4)=<(FOUR>
TEXT( 5)=<)FIVE>
.SKIP
.TEST PAGE 19
*;N;NUM;NUMER;NUMERA;NUMERI;N SE;N SET;N SER;
EMPTY STATEMENT
         <N>
UNKNOWN =<N>
         <NUM>
UNKNOWN =<NUM>
         <NUMER>
UNKNOWN =<NUMER>
         <NUMERA>
COMMAND =<NUMERAL SETS>
         <NUMERI>
COMMAND =<NUMERIC SERIES>
         <N SE>
UNKNOWN =<N SE>
         <N SET>
COMMAND =<NUMERAL SETS>
         <N SER>
COMMAND =<NUMERIC SERIES>
EMPTY STATEMENT
.SKIP
.TEST PAGE 12
*INT-12//6.3K/+1.33E+2-123.45E-1/88E2WORD/36
         <INT-12//6.3K/+1.33E+2-123.45E-1/88E2WORD/36>
COMMAND =<INTEGER NUMBERS>
WORD( 1)=<WORD>
NMBR( 1)=         -12-
NMBR( 2) MISSING
NMBR( 3)=        6300
NMBR( 4)=         133+
NMBR( 6)=         -12-
NMBR( 7)=        8800
NMBR(11) MISSING
NMBR(12)=          36
.SKIP
.TEST PAGE 13
*REAL 12.34E+6 -945.12;REAL +44E2,16K;REAL,-22M,,0.002
         <REAL 12.34E+6 -945.12>
COMMAND =<REAL NUMBERS>
NMBR( 1)=  0.1234E+08
NMBR( 6)= -0.9451E+03-
         <REAL +44E2,16K>
COMMAND =<REAL NUMBERS>
NMBR( 1)=  0.4400E+04+
NMBR( 6)=  0.1600E+05
         <REAL,-22M,,0.002>
COMMAND =<REAL NUMBERS>
NMBR( 6)= -0.2200E+08-
NMBR(16)=  0.2000E-02
.FILL
.LEFT MARGIN 0
.PAGE
.CENTER
A P\\ROGRAM TO ^MAINTAIN THE ^^DAHEST \O\R DAVERB D\\ICTIONARIES
.CENTER
- ------- -- -------- --- ------ -- ------ ------------
.SKIP
^^DAMENU \\IS A PROGRAM WHICH CONSTRUCTS THE ^^DATA \\STATEMENTS
DEFINING THE DICTIONARY REQUIRED BY ^^FASP \\ROUTINES SUCH AS
^^DAVERB \\AND ^^DAHEST \\FOR WORD IDENTIFICATION. ^THE FIRST 80
CHARACTERS ARE READ FROM EACH LINE OF THE INPUT FILE. ^THE FIRST
LINE READ FROM THE INPUT FILE IS COPIED INTO THE OUTPUT FILE AS A
^^FORTRAN \\COMMENT LINE BEGINNING WITH THE LETTER ^C IN COLUMN 1,
BUT IS OTHERWISE IGNORED. ^THE SECOND LINE OF THE INPUT FILE MUST
CONTAIN SEPARATED BY SPACES (OR COMMAS) THE NAMES BY WHICH THE
FOLLOWING 6 ITEMS ARE TO BE REPRESENTED IN THE ^^DATA \\STATEMENTS
GENERATED BY THIS PROGRAM
.SKIP
.LEFT MARGIN 5
.INDENT -3
1##THE VARIABLE WHICH CONTAINS THE TOTAL NUMBER OF CHARACTERS IN ALL
WORDS IN THE DICTIONARY. ^THIS WOULD CORRESPOND TO THE VARIABLE
NAMED ^^MAXWRD \\IN THE ^^DAHEST \\ARGUMENT LIST.
.SKIP
.INDENT -3
2##THE VARIABLE WHICH CONTAINS THE TOTAL NUMBER OF WORDS IN THE
DICTIONARY. ^THIS WOULD CORRESPOND TO THE VARIABLE NAMED ^^MAXKNT
\\IN THE ^^DAHEST \\ARGUMENT LIST.
.SKIP
.INDENT -3
3##THE ARRAY WHICH CONTAINS IDENTICAL VALUES FOR WORDS WHICH ARE
SYNONYMS. ^THIS ARRAY DOES NOT APPEAR IN THE ^^DAHEST \\ARGUMENT
LIST. ^ONCE ALL 6 NAMES HAVE BEEN SPECIFIED, THEN A NUMBER AT THE
LEFT END OF EACH OF THE SUBSEQUENT LINES SPECIFIES THE VALUE TO BE
PLACED INTO THIS ARRAY FOR EACH OF THE WORDS APPEARING TO ITS RIGHT.
^^DATA \\STATEMENTS DEFINING THIS ARRAY ARE GENERATED ONLY IF AT
LEAST ONE VALUE WITHIN THIS ARRAY IS SPECIFIED, BUT THE NAME OF THE
ARRAY MUST STILL BE SUPPLIED.
.SKIP
.INDENT -3
4##THE ARRAY WHICH CONTAINS THE CHARACTERS FORMING THE WORDS IN THE
DICTIONARY. ^THIS WOULD CORRESPOND TO THE ARRAY NAMED ^^IWORD \I\N
\\THE ^^DAHEST \\ARGUMENT LIST.
.SKIP
.INDENT -3
5##THE ARRAY WHICH CONTAINS THE LENGTH OF EACH WORD IN THE
DICTIONARY. ^THIS WOULD CORRESPOND TO THE ARRAY NAMED ^^KNTLTR \I\N
\\THE ^^DAHEST \\ARGUMENT LIST.
.SKIP
.INDENT -3
6##THE ARRAY WHICH CONTAINS THE ARGUMENT TYPE ASSOCIATED WITH EACH
WORD IN THE DICTIONARY. ^THIS WOULD CORRESPOND TO THE ARRAY NAMED
^^LEGAL \\IN THE ^^DAHEST \\ARGUMENT LIST. ^ONCE ALL 6 NAMES HAVE
BEEN SPECIFIED, THEN A SINGLE DIGIT AT THE RIGHT END OF EACH OF THE
SUBSEQUENT LINES SPECIFIES THE VALUE TO BE PLACED INTO THIS ARRAY
FOR EACH OF THE WORDS APPEARING TO ITS LEFT. ^^DATA \\STATEMENTS
DEFINING THIS ARRAY ARE GENERATED ONLY IF AT LEAST ONE VALUE WITHIN
THIS ARRAY IS SPECIFIED, BUT THE NAME OF THE ARRAY MUST STILL BE
SUPPLIED.
.SKIP
.LEFT MARGIN 0
.BREAK
^IF THE SECOND LINE DOES NOT CONTAIN AT LEAST 6 GROUPS OF
CHARACTERS, THEN ADDITIONAL NAMES WILL BE READ FROM SUBSEQUENT LINES
UNTIL 6 HAVE BEEN SPECIFIED.
.SKIP
^ONCE ALL 6 NAMES HAVE BEEN ESTABLISHED, THEN EACH SUBSEQUENT LINE
CONTAINS A WORD IDENTIFICATION NUMBER (WHICH CAN BE EXPRESSED IN ^E,
^K OR ^M NOTATION), FOLLOWED BY ONE OR MORE SPACES AND THEN BY THE
SPELLING OF THE WORD. ^THE ^^FASP \\ROUTINES RETURN TO THE CALLING
PROGRAM THE SEQUENCE NUMBER OF THE WORD WITHIN THE DICTIONARY
COUNTING AS SEPARATE WORDS ALL CHARACTER SEQUENCES EVEN THOUGH SOME
OF THESE MIGHT LOGICALLY BE SYNONYMS OR ALLOWED AMBIGUOUS
ABBREVIATIONS. ^THE WORD IDENTIFICATION NUMBERS ARE NOT NEEDED BY
THE ^^FASP \\ROUTINES, BUT ARE INSTEAD MEANT TO BE USED BY THE
CALLING PROGRAM TO IDENTIFY THE OPERATION TO BE PERFORMED WHEN THE
WORD OR ANY OF ITS SYNONYMS IS ENCOUNTERED. ^THE WORD IDENTIFICATION
NUMBER IS ASSUMED TO BE ZERO IF NO NUMBER IS FOUND AT THE START OF
THE LINE. ^THE LINE CAN BEGIN WITH A COMMA IF A WORD IDENTIFICATION
NUMBER IS NOT REQUIRED, BUT THE LEFTMOST WORD ON THE LINE ITSELF
BEGINS WITH A DIGIT OR A SIGN OR A DECIMAL POINT. ^THE ^^DATA
\\STATEMENTS REPRESENTING THE WORD IDENTIFICATION NUMBERS ARE
GENERATED ONLY IF AT LEAST ONE WORD IDENTIFICATION NUMBER IS FOUND.
.SKIP
^IF ABBREVIATIONS OF A WORD ARE TO BE RECOGNIZED EVEN THOUGH THEY
ARE NOT UNIQUE ACROSS THE ENTIRE DICTIONARY, THEN THESE
ABBREVIATIONS SHOULD FOLLOW THE COMPLETE SPELLING SEPARATED FROM IT
AND EACH OTHER BY COMMAS, WITH THE LONGEST ABBREVIATIONS COMING
FIRST. ^SPACES ARE IGNORED AT THE START OR AT THE END OF THE
SPELLING OF A WORD. ^IF TWO OR MORE WORDS APPEAR ON A SINGLE LINE
BUT ARE NOT SEPARATED BY COMMAS, THEN THE RESULTING DICTIONARY WILL
INCLUDE THESE WORDS AS A SINGLE ENTRY IN WHICH THESE WORDS ARE
SEPARATED BY SINGLE SPACES. ^FOR EXAMPLE, IF THE FIRST 3 LETTERS OF
THE WORD DUPLICATE THOSE OF SOME OTHER WORD, BUT THE WORD BEING
DESCRIBED ON THE CURRENT LINE IS TO BE SELECTED BY ITS 1, 2 OR 3
LETTER ABBREVIATIONS, THEN THE FULL SPELLING WOULD BE FOLLOWED BY A
COMMA AND THE 3 LETTER ABBREVIATION, THEN BY A COMMA AND THE 2
LETTER ABBREVIATION AND FINALLY BY A COMMA AND THE SINGLE LETTER
ABBREVIATION. ^ALTERNATIVELY, THE ABBREVIATIONS CAN BE ENTERED IN
SUBSEQUENT LINES, BUT AGAIN THE FULL SPELLING SHOULD APPEAR FIRST
AND BE FOLLOWED BY ITS LONGEST ABBREVIATION.
.SKIP
^A SINGLE DIGIT CAN APPEAR AT THE RIGHT END OF EACH LINE TO INDICATE
THE TYPE OF ARGUMENT LIST WHICH THE WORDS IN THE LINE ARE TO ACCEPT
IF RECOGNIZED BY ^^DAHEST. T\\HE ARGUMENT DESCRIPTION DIGIT IS
ASSUMED TO BE ZERO IF NO DIGIT IS FOUND AT THE RIGHT END OF THE
LINE. ^THE LINE CAN END WITH A COMMA IF THE ARGUMENT DESCRIPTION
DIGIT IS NOT REQUIRED, BUT THE RIGHTMOST CHARACTER OF THE RIGHTMOST
WORD ON THE LINE IS A DIGIT. ^THE ^^DATA \\STATEMENTS DESCRIBING THE
ARGUMENT TYPES ARE GENERATED ONLY IF AT LEAST ONE ARGUMENT
DESCRIPTION DIGIT IS FOUND. ^THE VALUES 0 THROUGH 9 SPECIFIED BY THE
DIGITS 0 THROUGH 9 APPEARING AT THE RIGHT END OF A LINE IN THE INPUT
FILE, IF USED IN THE ^^LEGAL \\ARRAY FOR EITHER ^^DAHEST \O\R
DAIHST, \\WOULD SELECT THE FOLLOWING VARIATIONS IN THE ARGUMENT
LISTS ACCEPTED BY THE CORRESPONDING WORDS
.LEFT MARGIN 5
.SKIP
.INDENT -3
0##(OR ABSENT NUMBER) WILL NOT ALLOW THE WORD TO ACCEPT ANY ARGUMENTS.
.SKIP
.INDENT -3
1##ALLOWS THE WORD TO ACCEPT MULTIPLE ARGUMENTS OF THE SAME TYPE AS
ITS FIRST ARGUMENT.
.SKIP
.INDENT -3
2##ALLOWS THE WORD TO ACCEPT MULTIPLE WORD ARGUMENTS.
.SKIP
.INDENT -3
3##ALLOWS THE WORD TO ACCEPT MULTIPLE NUMERIC ARGUMENTS.
.SKIP
.INDENT -3
4##ALLOWS THE WORD TO ACCEPT MULTIPLE TEXT STRING ARGUMENTS.
.SKIP
.INDENT -3
5,#6,#7#OR#8, SAME AS 1,#2,#3#OR#4 RESPECTIVELY, EXCEPT THAT NUMBERS
IF FOUND ARE RETURNED AS REALS.
.SKIP
.INDENT -3
9##ALLOWS THE WORD TO ACCEPT MULTIPLE TEXT STRINGS WHICH BEGIN WITH
ANY CHARACTERS WHICH CANNOT SERVE AS PUNCTUATION, BUT NOT TO ACCEPT
ANY OTHER TYPES OF ARGUMENTS.
.LEFT MARGIN 0
.SKIP
^THE INPUT FILE IS TERMINATED BY A LINE WHICH EITHER IS EMPTY OR
CONTAINS ONLY A LEADING NUMBER.
.BREAK
.SKIP
.BREAK
^FOR EXAMPLE, IF THE DICTIONARY IS TO CONTAIN THE WORD ^^EXAMINE
\\WHICH IS TO
.SKIP
.LEFT MARGIN 5
.BREAK
BE IDENTIFIED BY THE NUMBER 135
.BREAK
BE ABBREVIATED AS EITHER ^E^X OR ^E
.BREAK
TAKE MULTIPLE ARGUMENTS OF THE SAME TYPE AS ITS FIRST ARGUMENT
.SKIP
.LEFT MARGIN 0
AND THE WORD ^^EXCHANGE \\WHICH IS TO
.SKIP
.LEFT MARGIN 5
BE IDENTIFIED BY THE NUMBER -8
.BREAK
.BREAK
.BREAK
NOT BE ABBREVIATED AS EITHER ^E^X OR ^E
.BREAK
TAKE MULTIPLE NUMERIC ARGUMENTS
.SKIP
.BREAK
.LEFT MARGIN 0
AND IF THE NAMES OF THE VARIABLES AND ARRAYS IN THE GENERATED ^^DATA
\\STATEMENTS ARE TO BE ^^MAXWRD, MAXKNT, IDNTFY, IWORD, KNTLTR \\AND
^^LEGAL
.SKIP
\\THEN THE INPUT FILE WOULD CONTAIN
.NOFILL
.SKIP
^^THIS IS A COMMENT LINE
MAXWRD MAXKNT,IDNTFY IWORD KNTLTR LEGAL
135 EXAMINE,EX,E 1
-8,EXCHANGE,3
0
.SKIP
\O\R
.SKIP
THIS IS A COMMENT LINE
MAXWRD MAXKNT IDNTFY IWORD KNTLTR LEGAL
135 EXAMINE 1
135 EX 1
135 E 1
-8 EXCHANGE 3
0
.FILL
.SKIP
T\\HE FOLLOWING ^^FORTRAN \\COMMENTS AND STATEMENTS WOULD BE
GENERATED WHEN EITHER OF THE ABOVE FORMS OF THE INPUT FILE ARE READ.
^THE INITIAL COMMENT LINES STATING THE ARGUMENT TYPES ARE GENERATED
ONLY IF AT LEAST ONE LINE CONTAINS A RIGHTMOST NON-ZERO DIGIT.
^ALTHOUGH NOT NECESSARY IN THE EXAMPLE, THE EXTRA ARRAYS AND THE
^^EQUIVALENCE \\STATEMENTS ARE GENERATED TO ALLOW LARGE ARRAYS TO BE
REPRESENTED BY SEVERAL ^^DATA \\STATEMENTS EACH OF WHICH DEFINES A
PORTION OF THE LARGE ARRAY.
.SKIP
.NOFILL
^^CTHIS IS A COMMENT LINE
C
C     MULTIPLE  NUMERIC  LENGTH
C
C    135 DYNAMIC INTEGER  7 EXAMINE
C                         2 EX(AMINE)
C                         1 E(XAMINE)
C     -8 NUMBER  INTEGER  8 EXCHANGE
C
      DIMENSION IDNTFY(4),IDNTF1(4)
      DIMENSION IWORD (18),IWORD1(18)
      DIMENSION KNTLTR(4),KNTLT1(4)
      DIMENSION LEGAL (4),LEGAL1(4)
C
      EQUIVALENCE (IDNTF1(1),IDNTFY(1))
      EQUIVALENCE (IWORD1(1),IWORD(1))
      EQUIVALENCE (KNTLT1(1),KNTLTR(1))
      EQUIVALENCE (LEGAL1(1),LEGAL(1))
C
C     NUMBER OF CHARACTERS AND WORDS
      DATA MAXWRD,MAXKNT/  18,   4/
C
C     NUMBER IDENTIFYING EACH COMMAND
      DATA IDNTF1/135,135,135, -8/
C
C     LETTERS FORMING EACH COMMAND
      DATA IWORD1/1HE,1HX,1HA,1HM,1HI,1HN,1HE,1HE,1HX,1HE,
     1            1HE,1HX,1HC,1HH,1HA,1HN,1HG,1HE/
C
C     LENGTH OF EACH COMMAND
      DATA KNTLT1/  7,  2,  1,  8/
C
C     TYPE OF ARGUMENT LIST
      DATA LEGAL1/  1,  1,  1,  3/
.SUBTITLE ^^DAJOIN, F\\REE ^FORMAT ^FRACTION ^EVALUATION ^ROUTINE
.PAGE
.LEFT MARGIN 0
.NOFILL
  ^^DDDDD          AAA        JJ    OOOOO   IIIIII  NN    NN
  DD   DD       AAAA        JJ   OO   OO    II    NNN   NN
  DD    DD     AA AA        JJ  OO     OO   II    NNNN  NN
  DD    DD    AA  AA        JJ  OO     OO   II    NN NN NN
  DD    DD   AAAAAAA  JJ    JJ  OO     OO   II    NN  NNNN
  DD   DD   AA    AA   JJ  JJ    OO   OO    II    NN   NNN
  DDDDD    AA     AA    JJJJ      OOOOO   IIIIII  NN    NN
.SKIP
.FILL
.CENTER
DAJOIN, F\\REE ^FORMAT ^FRACTION ^EVALUATION ^ROUTINE
.CENTER
------##---- ------ -------- ---------- -------
.SKIP
^^DAJOIN \\INTERPRETS AN ARRAY READ BY THE CALLING PROGRAM WITH A
MULTIPLE OF AN ^A1 FORMAT AND RETURNS THE VALUES OF THE POSSIBLY
SIGNED WHOLE NUMBERS, OF THE POSSIBLY SIGNED FRACTIONS AND OF THE
MIXED NUMBERS REPRESENTED BY THE CHARACTERS IN THE ARRAY. ^A MIXED
NUMBER CONSISTS OF A POSSIBLY SIGNED WHOLE NUMBER FOLLOWED BY ONE OR
MORE SPACES AND/OR TAB CHARACTERS AND THEN BY AN UNSIGNED FRACTION.
^THE NUMBERS FORMING THE NUMERATORS AND DENOMINATORS OF FRACTIONS
CAN CONTAIN DECIMAL POINTS. ^THE VALUE 12.475 COULD BE REPRESENTED
AS 12.1 1.5/4 SINCE ^^DAJOIN \\SUMS THE VALUES OF THE LEADING NUMBER
AND THE FOLLOWING UNSIGNED FRACTION. ^HOWEVER, THE REPRESENTATION
12.1+1.5/4 WOULD BE INTERPRETED AS THE VALUE 12.1 FOLLOWED BY THE
VALUE 0.375 WHICH WOULD BE RETURNED BY THE NEXT CALL TO THIS ROUTINE.
.SKIP
^A NUMBER CAN BE FOLLOWED IMMEDIATELY WITH NO INTERVENING SPACES OR
TABS BY THE LETTER ^E AND A POSSIBLY SIGNED EXPONENT. ^A PERCENT
SIGN FOLLOWING THE NUMBER IMPLIES ^E-2, TRAILING LETTER ^K IMPLIES
^E3 AND TRAILING LETTER ^M IMPLIES ^E6. ^IF AN EXPONENT IS USED WITH
EITHER A FRACTION OR A MIXED NUMBER, THEN THE EXPONENT MUST APPEAR
TO THE IMMEDIATE RIGHT OF THE DENOMINATOR OF THE FRACTION WITHOUT
ANY INTERVENING SPACES OR TAB CHARACTERS. ^THE VALUE -1500 COULD BE
REPRESENTED IN ANY OF THE FOLLOWING FORMS
.SKIP
.NOFILL
-1500   -1.5^^K   -1 1/2K   -3/2K   -1.5E3   -1 1/2E3   -3/2E3
.FILL
.SKIP
E\\VALUATION OF A NUMBER IS TERMINATED WHENEVER AN EXPONENT IS
FOUND. ^THE BUFFER CONTENTS -1^K 1/2 WOULD BE INTERPRETED AS THE
NUMBER -1000 FOLLOWED BY THE FRACTION +1/2 WHICH WOULD BE RETURNED
BY THE NEXT CALL TO THIS ROUTINE. ^THE BUFFER CONTENTS -1 1^K/2
WOULD BE TREATED AS CONTAINING THE NUMBER -1 FOLLOWED BY THE NUMBERS
+1000 AND 0 (EVALUATED AS +0/2) WHICH WOULD BE RETURNED BY THE NEXT
2 CALLS TO THIS ROUTINE.
.SKIP
^FRACTIONS CAN HAVE MORE THAN A SINGLE DENOMINATOR. ^IF AN EXPONENT
IS INCLUDED WITH A FRACTION CONTAINING MORE THAN A SINGLE SLASH,
THEN THE EXPONENT MUST APPEAR TO THE IMMEDIATE RIGHT OF THE
RIGHTMOST DENOMINATOR. ^FOR EXAMPLE, 1/2/3^K WOULD HAVE THE VALUE
166.666.... ^A DENOMINATOR HAVING A ZERO VALUE IS ASSUMED INSTEAD TO
HAVE THE VALUE 1 TO PREVENT DIVISION BY ZERO. ^THEREFORE, 2///3, 2/
AND -3/ WOULD BE EVALUATED AS 0.66666...., 2 AND -3 RESPECTIVELY.
.SKIP 2
.CENTER
^THE ^^DAJOIN A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DAJOIN \I\S
.SKIP
.NOFILL
      SUBROUTINE DAJOIN(ITRAIL,IBUFFR,MAXBFR,LOWBFR,KIND  ,
     1    VALUE ,DIVISR,ISHIFT,JSHIFT)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^ITRAIL#=#\\SELECTS WHETHER EXPONENTS ARE TO BE RECOGNIZED. ^IF
NOT, THEN EACH NUMBER WILL TERMINATE PRIOR TO THE EXPONENT, AND
^^LOWBFR \\WILL BE RETURNED POINTING TO THE LETTER STARTING THE
EXPONENT. ^THE SUBSEQUENT CALL TO THIS ROUTINE WILL RETURN ^^KIND=2
\\INDICATING THAT AN ILLEGAL CHARACTER HAS BEEN FOUND IF THE CALLING
PROGRAM DOES NOT FIRST INCREMENT THE VALUE OF ^^LOWBFR.
.SKIP
.INDENT -2
=#-1, \\ONLY EXPONENTS EXPRESSED IN ^E NOTATION ARE TO BE
RECOGNIZED. ^THE RETURNED VALUE WILL ALREADY HAVE BEEN MULTIPLIED BY
10.0 RAISED TO THE INDICATED POWER. ^THE PERCENT SIGN AND THE
LETTERS ^K AND ^M ARE TO BE TREATED THE SAME AS ANY OTHER ALPHABETIC
CHARACTER.
.INDENT -2
=#0, NO EXPONENTS ARE TO BE RECOGNIZED. ^NUMBERS WILL BE TERMINATED
PRIOR TO PERCENT SIGNS OR TO THE LETTERS ^E OR ^K OR ^M.
.INDENT -2
=#1, PERCENT SIGNS, THE LETTERS ^K AND ^M, AND EXPONENTS EXPRESSED
IN ^E NOTATION, ARE ALL TO BE RECOGNIZED. ^THE RETURNED VALUE WILL
ALREADY HAVE BEEN MULTIPLIED BY 10.0 RAISED TO THE INDICATED POWER.
.SKIP
.INDENT -9
^^IBUFFR#=#\\INPUT BUFFER ARRAY CONTAINING CHARACTERS TYPED BY USER,
READ BY A MULTIPLE OF AN ^A1 FORMAT, WHICH IS TO BE SEARCHED FOR
NUMBERS. ^^IBUFFR \\THEN CONTAINS 1 CHARACTER PER COMPUTER STORAGE
LOCATION.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE FINAL (RIGHTMOST) LOCATION IN THE
^^IBUFFR \\ARRAY WHICH CAN BE SEARCHED FOR A NUMBER.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT MUST BE SET BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS FIRST CALLED, AND THEN IS RETURNED BY THIS ROUTINE
DESCRIBING THE LOCATION OF THE FIRST CHARACTER IN THE INPUT BUFFER
NOT YET PROCESSED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LOWBFR#=#\\SUBSCRIPT WITHIN THE ^^IBUFFR \\ARRAY OF THE FIRST
(LEFTMOST) CHARACTER WHICH CAN BE SCANNED FOR THE REPRESENTATION OF
NUMBERS. ^IF A NUMBER IS FOUND, THEN ^^LOWBFR \\WILL BE RETURNED
POINTING TO THE FIRST CHARACTER BEYOND THE NUMBER WHICH COULD NOT BE
PART OF THE NUMBER. ^IF A NUMBER IS NOT FOUND, THEN ^^LOWBFR \\WILL
BE RETURNED POINTING TO THE FIRST PRINTING CHARACTER (WHICH WOULD
HAVE TO BE A CHARACTER OTHER THAN A PLUS SIGN OR A MINUS SIGN OR A
DECIMAL POINT OR A SLASH OR A DIGIT), OR BEYOND THE END OF THE
BUFFER IF THE BUFFER DOES NOT CONTAIN ANY PRINTING CHARACTERS AT OR
TO THE RIGHT OF ^^IBUFFR(LOWBFR). LOWBFR \\MUST BE SET BY THE
CALLING PROGRAM BEFORE THIS ROUTINE IS FIRST CALLED TO PROCESS THE
CONTENTS OF THE BUFFER, AND SHOULD NOT BE CHANGED BY THE CALLING
PROGRAM IF THIS ROUTINE LOCATES A NUMBER. ^IF A PRINTING CHARACTER
IS FOUND WHICH CANNOT START A NUMBER, THEN THE CONTENTS OF THE
BUFFER SHOULD BE PROCESSED BY SOME OTHER ^^FASP \\ROUTINE, OR AT
LEAST THE CALLING PROGRAM SHOULD INCREMENT THE VALUE OF ^^LOWBFR
\\BY 1 BEFORE AGAIN CALLING THIS ROUTINE.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED FOR RETURNING INFORMATION TO THE
CALLING PROGRAM. ^THEIR INPUT VALUES ARE IGNORED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KIND###=#\\RETURNED DESCRIBING THE KIND OF ITEM LOCATED IN THE
^^IBUFFR \\ARRAY.
.INDENT -2
=#1, NO PRINTING CHARACTER WAS FOUND AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR). LOWBFR \\IS RETURNED POINTING BEYOND THE END OF
THE ^^IBUFFR \\ARRAY. ^THE CALLING PROGRAM SHOULD READ A NEW LINE
INTO THE ^^IBUFFR \\ARRAY AND RESET ^^LOWBFR \\TO POINT TO THE FIRST
CHARACTER IN THIS ARRAY BEFORE AGAIN CALLING THIS ROUTINE.
.INDENT -2
=#2, A NUMBER WAS NOT FOUND, BUT A PRINTING CHARACTER WHICH CANNOT
START A NUMBER WAS FOUND AT OR TO THE RIGHT OF ^^IBUFFR(LOWBFR).
LOWBFR \\WILL BE RETURNED POINTING TO THE PRINTING CHARACTER. ^THE
CALLING PROGRAM MUST INCREMENT THE VALUE OF ^^LOWBFR \\BEFORE AGAIN
CALLING THIS ROUTINE SINCE SUPPLYING THE SAME INITIAL CHARACTER
WOULD PRODUCE IDENTICAL RESULTS. ^^DIVISR \\IS RETURNED CONTAINING 1
AND ^^VALUE, ISHIFT \\AND ^^JSHIFT \\ARE SET TO ZERO IF A NUMBER IS
NOT FOUND SO THAT ^^KIND \\EQUAL 1 OR 2 CAN BE CONSIDERED EQUIVALENT
TO ^^KIND=3 \\IF SUCH IS APPROPRIATE TO THE APPLICATION FOR WHICH
^^DAJOIN \\IS BEING USED. ^IT SHOULD BE NOTED THAT AN EXPONENT MUST
BE PRECEDED BY EITHER A DIGIT OR A SIGN OR A DECIMAL POINT IF IT IS
TO BE RECOGNIZED. ^^KIND \\WILL BE RETURNED CONTAINING 2 IF THE
FIRST PRINTING CHARACTER AT OR TO THE RIGHT OF ^^IBUFFR(LOWBFR) \I\S
\\A PERCENT SIGN OR ONE OF THE LETTERS ^E, ^K OR ^M.
.INDENT -2
=#3 OR 4 OR 5, A NUMBER WAS FOUND. ^IF THIS NUMBER INCLUDED A
FRACTION, THEN THE RIGHTMOST DENOMINATOR WAS PRESENT. ^^LOWBFR \I\S
\\RETURNED POINTING TO THE CHARACTER TO THE RIGHT OF THE
REPRESENTATION OF THE NUMBER. ^IF ^^ITRAIL=0 \\AND THE NUMBER IS
FOLLOWED BY A PERCENT SIGN OR THE LETTERS ^K, ^M OR ^E, OR IF
^^ITRAIL \\IS EQUAL TO -1 AND THE NUMBER IS FOLLOWED BY A PERCENT
SIGN OR THE LETTERS ^K OR ^M, THEN ^^LOWBFR \\WILL BE RETURNED
POINTING TO THIS PRINTING CHARACTER AND NO EXPONENT WILL BE EVALUATED.
.INDENT -2
=#3, A POSSIBLY SIGNED WHOLE NUMBER WAS FOUND WHICH WAS NOT FOLLOWED
BY A FRACTION. ^^DIVISR \\IS RETURNED CONTAINING ONE. ^^LOWBFR \I\S
\\RETURNED POINTING TO THE CHARACTER TO THE IMMEDIATE RIGHT OF THE
NUMBER.
.INDENT -2
=#4, A MIXED NUMBER CONSISTING OF A POSSIBLY SIGNED WHOLE NUMBER
FOLLOWED BY AN UNSIGNED FRACTION WAS FOUND. ^^LOWBFR \\IS RETURNED
POINTING TO THE CHARACTER TO THE IMMEDIATE RIGHT OF THE FRACTION.
.INDENT -2
=#5, A POSSIBLY SIGNED FRACTION WAS FOUND WHICH WAS NOT PRECEDED BY
A WHOLE NUMBER. ^^LOWBFR \\IS RETURNED POINTING TO THE CHARACTER TO
THE IMMEDIATE RIGHT OF THE FRACTION.
.INDENT -2
=#6, A MIXED NUMBER OR FRACTION WAS FOUND IN WHICH THE RIGHTMOST
DENOMINATOR WAS MISSING. ^^LOWBFR \\IS RETURNED POINTING TO THE
CHARACTER TO THE IMMEDIATE RIGHT OF THE RIGHTMOST SLASH IN THE
FRACTION. ^THE FRACTION REPRESENTATION 1/2/3/ WOULD RETURN ^^KIND=6,
VALUE=0.16666..._. \\AND ^^DIVISR=3.
.SKIP
.INDENT -9
VALUE##=#\\RETURNED CONTAINING THE VALUE OF THE NUMBER IF ^^KIND
\\IS RETURNED CONTAINING 3 OR GREATER. ^THIS VALUE HAS BEEN
MULTIPLIED BY 10.0 RAISED TO THE POWER INDICATED BY THE EXPONENT IF
ANY. ^^VALUE \\IS RETURNED SET TO ZERO IF A NUMBER IS NOT FOUND.
.SKIP
.INDENT -9
^^DIVISR#=#\\RETURNED CONTAINING THE VALUE OF THE RIGHTMOST
DENOMINATOR WHICH IS SPECIFIED IN A FRACTION OR A MIXED NUMBER. ^THE
RETURNED VALUE OF ^^DIVISR \\HAS NOT BEEN MULTIPLIED BY THE POWER OF
10.0 INDICATED BY THE EXPONENT IF ANY. ^^DIVISR \\IS RETURNED SET TO
ONE IF A NUMBER IS NOT FOUND, OR IF A NUMBER IS FOUND WHICH DOES NOT
CONTAIN A FRACTION, OR IF A FRACTION IS FOUND IN WHICH A DENOMINATOR
IS NOT SPECIFIED. ^THE VALUE 0.666666..._. REPRESENTED AS 2/3/ WOULD
RETURN ^^DIVISR \\CONTAINING 3, WHILE THE VALUE 2 REPRESENTED AS 2/
WOULD RETURN ^^DIVISR \\CONTAINING 1.
.SKIP
.INDENT -9
^^ISHIFT#=#\\IF A NUMBER IS FOUND, THEN ^^ISHIFT \\IS RETURNED
DESCRIBING WHICH OF THE CHARACTERS ^E, %, ^K OR ^M, IF ANY, APPEARED
IN THE NUMBER SPECIFICATION. ^^ISHIFT \\IS RETURNED SET TO ZERO IF A
NUMBER IS NOT FOUND.
.INDENT -2
=#-4, THE NUMBER WAS FOLLOWED BY THE LETTER ^E, BUT NEITHER SIGN NOR
DIGITS APPEARED IN THE EXPONENT. ^^JSHIFT \\IS RETURNED ZEROED. ^NO
EXPONENT HAS BEEN APPLIED TO THE RETURNED VALUE.
.INDENT -2
=#-3, THE NUMBER WAS FOLLOWED BY THE LETTER ^E AND THEN BY A MINUS
SIGN, BUT NO DIGITS APPEARED IN THE EXPONENT. ^^JSHIFT \\IS RETURNED
ZEROED. ^NO EXPONENT HAS BEEN APPLIED TO THE RETURNED VALUE.
.INDENT -2
=#-2, THE NUMBER WAS FOLLOWED BY THE LETTER ^E AND THEN BY A PLUS
SIGN, BUT NO DIGITS APPEARED IN THE EXPONENT. ^^JSHIFT \\IS RETURNED
ZEROED. ^NO EXPONENT HAS BEEN APPLIED TO THE RETURNED VALUE.
.INDENT -2
=#-1, THE NUMBER WAS FOLLOWED BY THE LETTER ^E AND THEN BY THE
NUMBER WHICH IS RETURNED AS THE VALUE OF ^^JSHIFT.
.INDENT -2
=#0, \\RETURNED IF NONE OF THE CHARACTERS ^E, %, ^K OR ^M FOLLOW THE
NUMBER. ^^JSHIFT \\IS RETURNED CONTAINING 0.
.INDENT -2
=#1, THE NUMBER WAS FOLLOWED BY A PERCENT SIGN. ^^JSHIFT \I\S
\\RETURNED CONTAINING -2.
.INDENT -2
=#2, THE NUMBER WAS FOLLOWED BY THE LETTER ^^K. JSHIFT \\IS RETURNED
CONTAINING 3.
.INDENT -2
=#3, THE NUMBER WAS FOLLOWED BY THE LETTER ^^M. JSHIFT \\IS RETURNED
CONTAINING 6.
.SKIP
.INDENT -9
^^JSHIFT#=#\\IF A NUMBER IS FOUND, THEN ^^JSHIFT \\IS RETURNED
CONTAINING THE VALUE OF THE EXPONENT EVALUATED AT THE RIGHT END OF
THE NUMBER REPRESENTATION. ^THE RETURNED VALUE WILL HAVE BEEN
MULTIPLIED BY 10.0 RAISED TO THE POWER RETURNED IN ^^JSHIFT. I\F
\\THE LETTER ^E FOLLOWS THE NUMBER, THEN ^^JSHIFT \\IS THE NUMBER
APPEARING TO THE RIGHT OF THE LETTER ^E, OR IS RETURNED CONTAINING
ZERO IF NO DIGITS WERE FOUND TO THE RIGHT OF THE LETTER ^E. ^IF ONE
OF THE CHARACTERS %, ^K OR ^M FOLLOW THE NUMBER, THEN ^^JSHIFT \I\S
\\RETURNED CONTAINING -2, 3 AND 6 RESPECTIVELY. ^^JSHIFT \I\S
\\RETURNED SET TO ZERO IF A NUMBER IS NOT FOUND.
.LEFT MARGIN 0
.SKIP 2
.CENTER
^AN ^EXAMPLE OF THE ^USE OF ^^DAJOIN
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE SAMPLE PROGRAM LISTED BELOW DISPLAYS THE VALUES REPRESENTED BY
A LINE OF TEXT TYPED BY THE USER. ^EACH VALUE IS DISPLAYED TO THE
RIGHT OF THE ORIGINAL FRACTION AS RECONSTRUCTED FROM THE DENOMINATOR
AND THE EXPONENT IF ANY.
.SKIP
.NOFILL
      ^^DIMENSION IBUFFR(72),JBUFFR(50)
      DATA ISLASH,IEXPNT,IGREAT,IEQUAL,ISPACE/
     11H/,1HE,1H>,1H=,1H /
      DATA ITTY,JTTY/5,5/
      WRITE(JTTY,1)
    1 FORMAT(8H ITRAIL ,$)
      READ(ITTY,2)ITRAIL
    2 FORMAT(I)
    3 WRITE(JTTY,4)
    4 FORMAT(2H *,$)
      READ(ITTY,5)IBUFFR
    5 FORMAT(72A1)
      LOWBFR=1
C
C     EVALUATE NEXT NUMBER IN TEXT
    6 INIBFR=LOWBFR
      CALL DAJOIN(ITRAIL,IBUFFR,72,LOWBFR,KIND,
     1VALUE,DIVISR,ISHIFT,JSHIFT)
      IF(KIND.EQ.1)GO TO 3
      IF(KIND.EQ.2)GO TO 9
      J=LOWBFR-1
      IF(J.GE.INIBFR)WRITE(JTTY,7)(IBUFFR(I),I=INIBFR,J),
     1IGREAT
    7 FORMAT(2H <,132A1)
C
C     CONSTRUCT DESCRIPTION OF DENOMINATOR AND OF EXPONENT
      KOUNT=0
      FRCTN=(VALUE*DIVISR)/(10.0**JSHIFT)
      CALL DASHOW(1,0,6,1,6,
     15,IVALUE,FRCTN,50,KOUNT,JBUFFR,IERR)
      KOUNT=KOUNT+1
      JBUFFR(KOUNT)=ISLASH
      CALL DASHOW(1,0,6,1,6,
     15,IVALUE,DIVISR,50,KOUNT,JBUFFR,IERR)
      IF(JSHIFT.EQ.0)GO TO 8
      KOUNT=KOUNT+1
      JBUFFR(KOUNT)=IEXPNT
      CALL DASHOW(0,0,6,0,6,
     15,JSHIFT,VALUE,50,KOUNT,JBUFFR,IERR)
    8 KOUNT=KOUNT+3
      JBUFFR(KOUNT-2)=ISPACE
      JBUFFR(KOUNT-1)=IEQUAL
      JBUFFR(KOUNT)=ISPACE
      CALL DASHOW(1,0,6,1,6,
     15,IVALUE,VALUE,50,KOUNT,JBUFFR,IERR)
C
C     DESCRIBE THE RESULT, DENOMINATOR AND EXPONENT
      GO TO(3,9,11,13,15,17),KIND
    9 WRITE(JTTY,10)IBUFFR(LOWBFR)
   10 FORMAT(10H  UNKNOWN ,1A1)
      LOWBFR=LOWBFR+1
      GO TO 6
   11 WRITE(JTTY,12)(JBUFFR(I),I=1,KOUNT)
   12 FORMAT(8H  WHOLE ,50A1)
      GO TO 6
   13 WRITE(JTTY,14)(JBUFFR(I),I=1,KOUNT)
   14 FORMAT(8H  MIXED ,50A1)
      GO TO 6
   15 WRITE(JTTY,16)(JBUFFR(I),I=1,KOUNT)
   16 FORMAT(8H  FRCTN ,50A1)
      GO TO 6
   17 WRITE(JTTY,18)(JBUFFR(I),I=1,KOUNT)
   18 FORMAT(8H  ABSNT ,50A1)
      GO TO 6
      END
.SKIP 2
T\\YPICAL ^DIALOG ^BETWEEN ^^DAJOIN D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
^^ITRAIL 1
*1 2 3     1 2/3     1/2/3
<1>
 WHOLE 1/1 = 1
< 2>
 WHOLE 2/1 = 2
< 3>
 WHOLE 3/1 = 3
<     1 2/3>
 MIXED 5/3 = 1.66667
<     1/2/3>
 FRCTN .5/3 = .166667
*1K 2/3    1 2K/3    1 2/3K
<1K>
 WHOLE 1/1E3 = 1000
< 2/3>
 FRCTN 2/3 = .666667
<    1>
 WHOLE 1/1 = 1
< 2K>
 WHOLE 2/1E3 = 2000
</3>
 FRCTN 0/3 = 0
<    1 2/3K>
 MIXED 5/3E3 = 1666.67
*-12 3/4   -12-3/4   -12 3/-4
<-12 3/4>
 MIXED -51/4 = -12.75
<   -12>
 WHOLE -12/1 = -12
<-3/4>
 FRCTN -3/4 = -.75
<   -12 3/>
 ABSNT -15/1 = -15
<-4>
 WHOLE -4/1 = -4
*12.4,     12.4//    43.4//3.5//
<12.4>
 WHOLE 12.4/1 = 12.4
 UNKNOWN ,
<     12.4//>
 ABSNT 12.4/1 = 12.4
<    43.4//3.5//>
 ABSNT 43.4/3.5 = 12.4
.SUBTITLE ^^DALEAD, I\\DENTIFY ^COMMAND AND ^TRAILING ^WORD, ^NUMBER OR ^STRING
.PAGE
.NOFILL
.LEFT MARGIN 0
^^DDDDD         AAA   LL        EEEEEEEE        AAA   DDDDD
DD   DD      AAAA   LL        EE             AAAA   DD   DD
DD    DD    AA AA   LL        EE            AA AA   DD    DD
DD    DD   AA  AA   LL        EEEEE        AA  AA   DD    DD
DD    DD  AAAAAAA   LL        EE          AAAAAAA   DD    DD
DD   DD  AA    AA   LL        EE         AA    AA   DD   DD
DDDDD   AA     AA   LLLLLLLL  EEEEEEEE  AA     AA   DDDDD
.SKIP 3
.CENTER
DALEAD, I\\DENTIFY ^COMMAND AND ^TRAILING ^WORD, ^NUMBER OR ^STRING
.CENTER
------##-------- ------- --- -------- ----##------ -- ------
.SKIP
.FILL
^^DALEAD \\IDENTIFIES TO THE CALLING PROGRAM A COMMAND WORD AND AN
ASSOCIATED WORD OR NUMBER OR QUOTED TEXT STRING REPRESENTED BY THE
CHARACTERS IN AN INPUT BUFFER READ BY THE CALLING PROGRAM WITH A
MULTIPLE OF AN ^A1 FORMAT. ^THE CALLING PROGRAM SUPPLIES TO ^^DALEAD
\\TWO SEPARATE DICTIONARIES WHICH IDENTIFY ALL POSSIBLE COMMAND
WORDS AND ALL POSSIBLE ASSOCIATED WORDS. ^ANY ABBREVIATION WHICH IS
UNIQUE ACROSS BOTH DICTIONARIES IS ALLOWED. ^A WORD OR WORD
ABBREVIATION MUST BE FOLLOWED BY A KNOWN DELIMITER CHARACTER SUCH AS
THE BLANK, TAB, COMMA, APOSTROPHE, SEMICOLON, EXCLAMATION POINT OR
AMPERSAND, OR BY AN END OF LINE. ^THE APPEARANCE OF ANY OTHER
CHARACTER FOLLOWING A WORD OR WORD ABBREVIATION IS CONSIDERED TO BE
AN ERROR AND CAUSES THE WORD OR WORD ABBREVIATION AND THE FOLLOWING
CHARACTERS TO BE IDENTIFIED AS AN UNKNOWN SEQUENCE OF CHARACTERS. ^A
QUOTED TEXT STRING INCLUDES THE CHARACTERS TO THE RIGHT OF AN
INITIAL APOSTROPHE AND EXTENDS TO THE SECOND UNPAIRED APOSTROPHE OR
THROUGH THE RIGHTMOST PRINTING CHARACTER IN THE LINE IF A SECOND
UNPAIRED APOSTROPHE IS NOT FOUND. ^A PAIR OF APOSTROPHES WITHIN THE
STRING INDICATES THE INCLUSION OF A SINGLE APOSTROPHE AND THE EXTRA
APOSTROPHE IS REMOVED. ^ANY CHARACTER (EXCEPT OF COURSE ANOTHER
APOSTROPHE) CAN FOLLOW THE SECOND UNPAIRED APOSTROPHE WHICH MARKS
THE RIGHT END OF A QUOTED TEXT STRING. ^A NUMBER IS TERMINATED TO
THE LEFT OF ANY CHARACTER WHICH COULD NOT LOGICALLY EXTEND THE NUMBER.
.SKIP
^IF THE LEFTMOST PRINTING CHARACTERS IN THE BUFFER (IGNORING LEADING
COMMAS) FORM AN ASSOCIATED WORD OR ITS ABBREVIATION OR FORM A NUMBER
OR QUOTED TEXT STRING, THEN THE COMMAND WORD IDENTIFIED BY THE
PREVIOUS CALL TO THIS ROUTINE AND THE NEW ASSOCIATED WORD OR NUMBER
OR QUOTED TEXT STRING ARE IDENTIFIED TO THE CALLING PROGRAM. ^IF THE
PRINTING CHARACTERS IN THE BUFFER FORM A COMMAND WORD OR ITS
ABBREVIATION FOLLOWED TO ITS RIGHT BY SPACES AND/OR TABS AND/OR
COMMAS AND THEN BY AN ASSOCIATED WORD OR ITS ABBREVIATION OR BY A
NUMBER OR BY A QUOTED TEXT STRING, THEN THE NEW COMMAND WORD AND THE
NEW ASSOCIATED WORD OR NUMBER OR QUOTED TEXT STRING ARE IDENTIFIED
TO THE CALLING PROGRAM. ^IF A COMMAND WORD OR ITS ABBREVIATION IS
FOLLOWED BY SPACES AND/OR TABS AND/OR COMMAS AND THEN BY A SECOND
COMMAND WORD OR ITS ABBREVIATION, THEN THE FIRST COMMAND IS
IDENTIFIED BY THE CURRENT CALL TO THIS ROUTINE, AND THE SECOND
COMMAND IS IDENTIFIED BY THE SUBSEQUENT CALL.
.SKIP
^THE RANGE OF A COMMAND IS THE SEQUENCE OF ASSOCIATED WORDS AND/OR
NUMBERS AND/OR QUOTED TEXT STRINGS FOR WHICH THE COMMAND CONTINUES
TO BE IDENTIFIED BY THIS ROUTINE IF A NEW COMMAND IS NOT
ENCOUNTERED. ^THE RANGE OF A COMMAND EXTENDS TO THE NEXT APPEARANCE
OF ANOTHER COMMAND, TO THE NEXT APPEARANCE OF A SEMICOLON OR
EXCLAMATION POINT, OR TO THE END OF A LINE NOT PRECEDED BY AN
AMPERSAND. ^AN EXCLAMATION POINT AND ANY CHARACTERS TO ITS RIGHT ARE
TAKEN TO BE A COMMENT AND ARE IGNORED. ^AN AMPERSAND AND ANY
CHARACTERS TO ITS RIGHT ARE SIMILARLY IGNORED, BUT THE ASSOCIATED
WORDS AND/OR NUMBERS AND/OR QUOTED TEXT STRINGS AT THE START OF THE
NEXT TEXT READ INTO THE BUFFER AND INTERPRETED BY SUBSEQUENT CALLS
TO THIS ROUTINE ARE WITHIN THE RANGE OF THE COMMAND IN EFFECT WHEN
THE AMPERSAND WAS ENCOUNTERED. ^WORDS AND NUMBERS CANNOT EXTEND
ACROSS COMMAS, BUT COMMAS ARE OTHERWISE IGNORED. ^SEMICOLONS ARE
REPORTED TO THE CALLING PROGRAM.
.SKIP 3
.CENTER
^THE ^^DALEAD A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DALEAD \I\S
.SKIP
.NOFILL
      SUBROUTINE DALEAD(INITYP,NXTTYP,ITRAIL,KWRDLO,KWRDHI,
     1    KWORD ,KCNTLO,KCNTHI,KCOUNT,NUMTYP,LWRDLO,LWRDHI,
     2    LWORD ,LCNTLO,LCNTHI,LCOUNT,IBUFFR,MAXBFR,LOWBFR,
     3    KIND  ,KOMAND,KWRDID,KCNTID,LOCAL ,LWRDID,LCNTID,
     4    INITAL,IVALUE,VALUE ,IFLOAT)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION KWORD(KWRDHI),KCOUNT(KCNTHI),
     1NUMTYP(KCNTHI),LWORD(LWRDHI),LCOUNT(LCNTHI),
     2IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT ONLY, AND ARE RETURNED
UNCHANGED. ^^ITRAIL \\IS IDENTICAL TO THE ^^DAHEFT \\ARGUMENT HAVING
THE SAME NAME. ^THE DICTIONARY OF COMMAND WORDS IS DEFINED BY
^^KWRDLO, KWRDHI, KWORD, KCNTLO, KCNTHI \\AND ^^KCOUNT \\WHICH ARE
IDENTICAL TO THE ^^DAVERB \\ARGUMENTS ^^LOWWRD, MAXWRD, IWORD,
LOWKNT, MAXKNT \\AND ^^KNTLTR \\RESPECTIVELY. ^THE DICTIONARY OF
ASSOCIATED WORDS IS SIMILARLY DEFINED BY ^^LWRDLO, LWRDHI, LWORD,
LCNTLO, LCNTHI \\AND ^^LCOUNT.
.SKIP
.LEFT MARGIN 9
.INDENT -9
INITYP#=#\\IF THE REPRESENTATION OF A NUMBER IS FOUND OUTSIDE THE
RANGE OF A COMMAND, THEN ^^INITYP \\SPECIFIES WHETHER THE VALUE IS
TO BE RETURNED AS THE INTEGER ARGUMENT ^^IVALUE \\OR AS THE REAL
ARGUMENT ^^VALUE. T\\HE NUMBER CAN BE TYPED WITH A DECIMAL POINT
AND/OR AN EXPONENT REGARDLESS OF THE VALUE OF ^^INITYP.
.INDENT -2
=#-2, \\IF THE REPRESENTATION OF A NUMBER IS FOUND OUTSIDE THE RANGE
OF A COMMAND, THEN IT IS TREATED AS AN UNKNOWN SEQUENCE OF
CHARACTERS, AND ^^KIND \\IS RETURNED CONTAINING THE VALUE 7.
.INDENT -2
=#-1, THE VALUE IS CALCULATED AS AN OCTAL INTEGER AND RETURNED AS
THE ARGUMENT ^^IVALUE. H\\OWEVER, THE NUMBER FOLLOWING THE LETTER ^E
OF AN EXPONENT IS EVALUATED IN DECIMAL.
.INDENT -2
=#0, THE VALUE IS CALCULATED AS A DECIMAL INTEGER AND IS RETURNED AS
THE ARGUMENT ^^IVALUE.
.INDENT -2
=#1 \\OR GREATER, THE VALUE IS RETURNED AS THE REAL ARGUMENT
^^VALUE. I\\F POSSIBLE, THE REAL NUMBER WILL BE ACCUMULATED AS AN
INTEGER, THEN BE CONVERTED TO REAL AND SHIFTED AS NECESSARY.
^^INITYP \\IS THE MAXIMUM NUMBER OF DIGITS IN THE INTEGER.
.SKIP
.INDENT -9
^^NXTTYP#=#\\IF THE REPRESENTATION OF A NUMBER IS FOUND WITHIN THE
RANGE OF A COMMAND, THEN ^^NXTTYP \\SPECIFIES WHETHER THE VALUE IS
TO BE RETURNED AS THE INTEGER ARGUMENT ^^IVALUE \\OR AS THE REAL
ARGUMENT ^^VALUE. T\\HE NUMBER CAN BE TYPED WITH A DECIMAL POINT
AND/OR AN EXPONENT REGARDLESS OF THE VALUE OF ^^NXTTYP.
.INDENT -2
=#-3, \\WHETHER THE NUMBER IS INTERPRETED AS AN OCTAL INTEGER OR AS
A DECIMAL INTEGER OR AS A DECIMAL REAL, AND WHETHER THE VALUE IS
RETURNED IN THE ARGUMENT ^^IVALUE \O\R VALUE \\IS SPECIFIED BY THE
^^NUMTYP \\ARRAY ENTRY HAVING THE SAME SUBSCRIPT AS THE ^^KCOUNT
\\ARRAY ENTRY CONTAINING THE NUMBER OF CHARACTERS IN THE COMMAND.
^THE CALLING PROGRAM MUST NOT CHANGE THE VALUE OF ^^KCNTID
\\RETURNED BY THE PREVIOUS CALL TO THIS ROUTINE IF ^^NXTTYP \\IS SET
TO -3.
.INDENT -2
=#-2, IF THE REPRESENTATION OF A NUMBER IS FOUND WITHIN THE RANGE OF
A COMMAND, THEN IT IS TREATED AS AN UNKNOWN SEQUENCE OF CHARACTERS,
AND ^^KIND \\IS RETURNED CONTAINING THE VALUE 7 OR 14 DEPENDING UPON
WHETHER A COMMAND WORD WAS FOUND BY THE CURRENT CALL TO THIS ROUTINE.
.
.INDENT -2
=#-1, THE VALUE IS CALCULATED AS AN OCTAL INTEGER AND RETURNED AS
THE ARGUMENT ^^IVALUE. H\\OWEVER, THE NUMBER FOLLOWING THE LETTER ^E
OF AN EXPONENT IS EVALUATED IN DECIMAL.
.INDENT -2
=#0, THE VALUE IS CALCULATED AS A DECIMAL INTEGER AND IS RETURNED AS
THE ARGUMENT ^^IVALUE.
.INDENT -2
=#1 \\OR GREATER, THE VALUE IS RETURNED AS THE REAL ARGUMENT
^^VALUE. I\\F POSSIBLE, THE REAL NUMBER WILL BE ACCUMULATED AS AN
INTEGER, THEN BE CONVERTED TO REAL AND SHIFTED AS NECESSARY.
^^NXTTYP \\IS THE MAXIMUM NUMBER OF DIGITS IN THE INTEGER.
.SKIP
.INDENT -9
^^ITRAIL#=#\\SELECTS WHETHER EXPONENTS ARE TO BE RECOGNIZED. ^IF
NOT, THEN EACH NUMBER WILL TERMINATE PRIOR TO THE EXPONENT, AND
^^LOWBFR \\WILL BE RETURNED POINTING TO THE LETTER STARTING THE
EXPONENT.
.INDENT -2
=#-1, EXPONENTS EXPRESSED IN ^E NOTATION ARE TO BE RECOGNIZED, BUT
THE PERCENT SIGN AND THE LETTERS ^K AND ^M ARE TO BE TREATED THE
SAME AS ANY OTHER ALPHABETIC CHARACTERS.
.INDENT -2
=#0, NO EXPONENTS ARE TO BE RECOGNIZED. ^NUMBERS WILL BE TERMINATED
PRIOR TO PERCENT SIGNS OR TO THE LETTERS ^E OR ^K OR ^M.
.INDENT -2
=#1, PERCENT SIGNS, THE LETTERS ^K AND ^M, AND EXPONENTS EXPRESSED
IN ^E NOTATION ARE ALL TO BE RECOGNIZED.
.SKIP
.INDENT -9
^^KWRDLO#=#\\SUBSCRIPT OF THE LOCATION IN THE ^^KWORD \\ARRAY
CONTAINING THE FIRST CHARACTER OF THE FIRST COMMAND WORD WHICH CAN
BE RECOGNIZED.
.SKIP
.INDENT -9
^^KWRDHI#=#\\SUBSCRIPT OF THE LOCATION IN THE ^^KWORD \\ARRAY
CONTAINING THE FINAL CHARACTER OF THE FINAL COMMAND WORD WHICH CAN
BE RECOGNIZED.
.SKIP
.INDENT -9
^^KWORD##=#\\ARRAY CONTAINING THE CHARACTERS OF THE COMMAND WORDS
WHICH CAN BE RECOGNIZED, 1 CHARACTER PER ARRAY LOCATION AS THOUGH
READ BY A MULTIPLE OF AN ^A1 FORMAT OR DEFINED BY SEVERAL 1^H
FIELDS. ^ALL ALPHABETIC LETTERS WITHIN THE ^^KWORD \\ARRAY MUST BE
SUPPLIED IN UPPER CASE.
.SKIP
.INDENT -9
^^KCNTLO#=#\\SUBSCRIPT OF THE LOCATION IN THE ^^KCOUNT \\ARRAY
CONTAINING THE NUMBER OF CHARACTERS IN THE FIRST COMMAND WORD WHICH
CAN BE RECOGNIZED. ^IF ^^KCNTLO \\IS GREATER THAN ^^KCNTHI, \\THEN
NO COMMAND WORDS CAN BE RECOGNIZED, CAUSING ^^KIND \\TO ALWAYS BE
RETURNED CONTAINING 7 OR LESS.
.SKIP
.INDENT -9
^^KCNTHI#=#\\SUBSCRIPT OF THE LOCATION IN THE ^^KCOUNT \\ARRAY
CONTAINING THE NUMBER OF CHARACTERS IN THE FINAL COMMAND WORD WHICH
CAN BE RECOGNIZED.
.SKIP
.INDENT -9
^^KCOUNT#=#\\ARRAY CONTAINING IN LOCATIONS ^^KCOUNT(KCNTLO)
\\THROUGH AND INCLUDING ^^KCOUNT(KCNTHI) \\THE NUMBERS OF CHARACTERS
IN EACH OF THE SEVERAL COMMAND WORDS WHICH CAN BE RECOGNIZED. ^A
NEGATIVE ENTRY IN THE ^^KCOUNT \\ARRAY CAUSES THE NUMBER OF
CHARACTERS INDICATED BY THE ABSOLUTE VALUE OF THE NEGATIVE NUMBER TO
BE SKIPPED OVER IN THE ^^KWORD \\ARRAY WITHOUT FORMING A
RECOGNIZABLE WORD. ^IF THE COMMAND WORD IS FORMED OF TWO OR MORE
SECTIONS WHICH CAN BE MATCHED WHEN SEPARATED BY ANY NUMBER OF SPACES
OR TAB CHARACTERS, THEN THE WORD STORED IN THE ^^KWORD \\ARRAY MUST
CONTAIN A SINGLE SPACE AT EACH OF THE LOCATIONS IN THE WORD AT WHICH
A SPLIT IS ALLOWED, AND THE LENGTH STORED IN THE ^^KCOUNT \\ARRAY
MUST BE 100 MORE THAN THE ACTUAL NUMBER OF CHARACTERS INCLUDING THE
SPACES WHICH ARE STORED IN THE ^^KWORD \\ARRAY.
.SKIP
.INDENT -9
^^NUMTYP#=#\\SPECIFIES THE MANNER IN WHICH A NUMBER IS EVALUATED IF
THE NUMBER IS WITHIN THE RANGE OF A COMMAND AND IF ^^NXTTYP=-3.
W\\HETHER THE NUMBER IS INTERPRETED AS AN OCTAL INTEGER OR AS A
DECIMAL INTEGER OR AS A DECIMAL REAL, AND WHETHER THE VALUE IS
RETURNED IN THE ARGUMENT ^^IVALUE \O\R VALUE \\IS SPECIFIED BY THE
^^NUMTYP \\ARRAY ENTRY HAVING THE SAME SUBSCRIPT AS THE ^^KCOUNT
\\ARRAY ENTRY CONTAINING THE NUMBER OF CHARACTERS IN THE COMMAND.
^IF ^^NXTTYP \\IS GREATER THAN -3, THEN THE ^^NUMTYP \\ARRAY IS
IGNORED. ^THE VALUES OF THE INDIVIDUAL ENTRIES WITHIN THE ^^NUMTYP
\\ARRAY ARE DEFINED SIMILARLY TO THOSE OF THE NONDIMENSIONED
ARGUMENT ^^NXTTYP (\\OTHER THAN ^^NXTTYP=-3) \\AND ARE AS FOLLOW
.INDENT -2
=#-2, IF THE REPRESENTATION OF A NUMBER IS FOUND WITHIN THE RANGE OF
A COMMAND, THEN IT IS TREATED AS AN UNKNOWN SEQUENCE OF CHARACTERS,
AND ^^KIND \\IS RETURNED CONTAINING THE VALUE 7 OR 14 DEPENDING UPON
WHETHER A COMMAND WORD WAS FOUND BY THE CURRENT CALL TO THIS ROUTINE.
.
.INDENT -2
=#-1, THE VALUE IS CALCULATED AS AN OCTAL INTEGER AND RETURNED AS
THE ARGUMENT ^^IVALUE. H\\OWEVER, THE NUMBER FOLLOWING THE LETTER ^E
OF AN EXPONENT IS EVALUATED IN DECIMAL.
.INDENT -2
=#0, THE VALUE IS CALCULATED AS A DECIMAL INTEGER AND IS RETURNED AS
THE ARGUMENT ^^IVALUE.
.INDENT -2
=#1 \\OR GREATER, THE VALUE IS RETURNED AS THE REAL ARGUMENT
^^VALUE. I\\F POSSIBLE, THE REAL NUMBER WILL BE ACCUMULATED AS AN
INTEGER, THEN BE CONVERTED TO REAL AND SHIFTED AS NECESSARY.
^^NUMTYP(KCNTID) \\IS THE MAXIMUM NUMBER OF DIGITS IN THE INTEGER.
.SKIP
.INDENT -9
^^LWRDLO#=#\\SUBSCRIPT OF THE LOCATION IN THE ^^LWORD \\ARRAY
CONTAINING THE FIRST CHARACTER OF THE FIRST ASSOCIATED WORD WHICH
CAN BE RECOGNIZED.
.SKIP
.INDENT -9
^^LWRDHI#=#\\SUBSCRIPT OF THE LOCATION IN THE ^^LWORD \\ARRAY
CONTAINING THE FINAL CHARACTER OF THE FINAL ASSOCIATED WORD WHICH
CAN BE RECOGNIZED.
.SKIP
.INDENT -9
^^LWORD##=#\\ARRAY CONTAINING THE CHARACTERS OF THE ASSOCIATED WORDS
WHICH CAN BE RECOGNIZED, 1 CHARACTER PER ARRAY LOCATION AS THOUGH
READ BY A MULTIPLE OF AN ^A1 FORMAT OR DEFINED BY SEVERAL 1^H
FIELDS. ^ALL ALPHABETIC LETTERS WITHIN THE ^^LWORD \\ARRAY MUST BE
SUPPLIED IN UPPER CASE.
.SKIP
.INDENT -9
^^LCNTLO#=#\\SUBSCRIPT OF THE LOCATION IN THE ^^LCOUNT \\ARRAY
CONTAINING THE NUMBER OF CHARACTERS IN THE FIRST ASSOCIATED WORD
WHICH CAN BE RECOGNIZED. ^IF ^^LCNTLO \\IS GREATER THAN ^^LCNTHI,
\\THEN NO ASSOCIATED WORDS CAN BE RECOGNIZED SO THAT ^^KIND \\CANNOT
BE RETURNED WITH EITHER OF THE VALUES 4 OR 11.
.SKIP
.INDENT -9
^^LCNTHI#=#\\SUBSCRIPT OF THE LOCATION IN THE ^^LCOUNT \\ARRAY
CONTAINING THE NUMBER OF CHARACTERS IN THE FINAL ASSOCIATED WORD
WHICH CAN BE RECOGNIZED.
.SKIP
.INDENT -9
^^LCOUNT#=#\\ARRAY CONTAINING IN LOCATIONS ^^LCOUNT(LCNTLO)
\\THROUGH AND INCLUDING ^^LCOUNT(LCNTHI) \\THE NUMBERS OF CHARACTERS
IN EACH OF THE SEVERAL ASSOCIATED WORDS WHICH CAN BE RECOGNIZED. ^A
NEGATIVE ENTRY IN THE ^^LCOUNT \\ARRAY CAUSES THE NUMBER OF
CHARACTERS INDICATED BY THE ABSOLUTE VALUE OF THE NEGATIVE NUMBER TO
BE SKIPPED OVER IN THE ^^LWORD \\ARRAY WITHOUT FORMING A
RECOGNIZABLE WORD. ^IF THE ASSOCIATED WORD IS FORMED OF TWO OR MORE
SECTIONS WHICH CAN BE MATCHED WHEN SEPARATED BY ANY NUMBER OF SPACES
OR TAB CHARACTERS, THEN THE WORD STORED IN THE ^^LWORD \\ARRAY MUST
CONTAIN A SINGLE SPACE AT EACH OF THE LOCATIONS IN THE WORD AT WHICH
A SPLIT IS ALLOWED, AND THE LENGTH STORED IN THE ^^LCOUNT \\ARRAY
MUST BE 100 MORE THAN THE ACTUAL NUMBER OF CHARACTERS INCLUDING THE
SPACES WHICH ARE STORED IN THE ^^LWORD \\ARRAY.
.SKIP
.INDENT -9
^^IBUFFR#=#\\INPUT BUFFER ARRAY, CONTAINING CHARACTERS TYPED BY THE
USER AND READ BY A MULTIPLE OF AN ^A1 FORMAT, WHICH IS TO BE
SEARCHED FOR KNOWN COMMAND WORDS, KNOWN ASSOCIATED WORDS, NUMBERS
AND QUOTED TEXT STRINGS. ^^IBUFFR \\THEN CONTAINS 1 CHARACTER PER
COMPUTER STORAGE LOCATION. ^THE ALPHABETIC LETTERS FORMING THE
COMMAND WORDS, ASSOCIATED WORDS AND NUMERIC EXPONENTS WHICH APPEAR
WITHIN THE ^^IBUFFR \\ARRAY CAN BE EITHER UPPER OR LOWER CASE.
^^IBUFFR \\IS RETURNED MODIFIED IF A QUOTED TEXT STRING IS FOUND
WHICH CONTAINS A PAIR OF APOSTROPHES INDICATING A SINGLE APOSTROPHE
WITHIN THE STRING OR IF A QUOTED TEXT STRING IS FOUND WHICH IS
TERMINATED BY A SECOND UNPAIRED APOSTROPHE.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE FINAL (RIGHTMOST) LOCATION IN THE
^^IBUFFR \\ARRAY WHICH CAN BE SEARCHED FOR KNOWN WORDS, NUMBERS AND
QUOTED TEXT STRINGS.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS MUST BE SET BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS FIRST CALLED, THEN ARE RETURNED BY THIS ROUTINE
CONTAINING INFORMATION TO BE USED BY THE CALLING PROGRAM AND,
USUALLY, TO BE PASSED UNCHANGED TO THE SUBSEQUENT CALL TO THIS
ROUTINE.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LOWBFR#=#\\SHOULD BE INPUT CONTAINING THE SUBSCRIPT WITHIN THE
^^IBUFFR \\ARRAY OF THE FIRST (LEFTMOST) CHARACTER WHICH CAN BE
SCANNED FOR KNOWN WORDS AND NUMBERS AND QUOTED TEXT STRINGS.
^^LOWBFR \\IS RETURNED CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR
\\ARRAY LOCATION TO THE RIGHT OF THE RIGHTMOST CHARACTER OF THE
RIGHTMOST IDENTIFIED ITEM. ^IF A QUOTED TEXT STRING IS FOUND, THEN
^^LOWBFR \\IS RETURNED POINTING TO THE CHARACTER TO THE RIGHT OF THE
RIGHTMOST CHARACTER WITHIN THE STRING, RATHER THAN TO THE CHARACTER
TO THE RIGHT OF THE SECOND UNPAIRED APOSTROPHE. ^IF THE QUOTED TEXT
STRING WAS NOT TERMINATED BY A SECOND UNPAIRED APOSTROPHE, THEN
^^LOWBFR \\IS RETURNED POINTING TO THE CHARACTER TO THE RIGHT OF THE
RIGHTMOST PRINTING CHARACTER IN THE BUFFER. ^IF THE QUOTED TEXT
STRING WAS TERMINATED WITH A SECOND UNPAIRED APOSTROPHE, THEN THIS
APOSTROPHE IS CHANGED TO A SPACE WHICH IS POINTED TO BY THE RETURNED
VALUE OF ^^LOWBFR. I\\F AN UNKNOWN SEQUENCE OF PRINTING CHARACTERS,
OR A KNOWN WORD OR ABBREVIATION FOLLOWED BY AN UNKNOWN SEQUENCE OF
PRINTING CHARACTERS, IS FOUND, THEN ^^LOWBFR \\IS RETURNED POINTING
TO THE CHARACTER TO THE RIGHT OF THE UNKNOWN SEQUENCE. ^IF A NEW
COMMAND WORD IS FOLLOWED BY SPACES AND/OR TABS AND/OR COMMAS AND
THEN BY A SECOND NEW COMMAND WORD, THEN ^^LOWBFR \\IS RETURNED
CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION WHICH
CONTAINS THE FIRST CHARACTER OF THE SECOND COMMAND WORD WHICH WILL
THEN BE IDENTIFIED BY THE SUBSEQUENT CALL TO THIS ROUTINE. ^IF AN
EXCLAMATION POINT OR AMPERSAND IS FOUND, THEN ^^LOWBFR \\IS RETURNED
CONTAINING ^^MAXBFR+1. LOWBFR \\MUST BE RESET BY THE CALLING PROGRAM
TO POINT TO THE LEFTMOST CHARACTER IN THE ^^IBUFFR \\ARRAY EACH TIME
NEW TEXT IS READ INTO THIS ARRAY.
.SKIP
.INDENT -9
^^KIND###=#\\INPUT CONTAINING 0, THIS ROUTINE HAS NOT YET BEEN
CALLED DURING THE EXECUTION OF THE CURRENT LOGICAL SECTION OF THE
CALLING PROGRAM. ^THIS ROUTINE IS TO BEGIN EVALUATION OF THE
CONTENTS OF THE INPUT TEXT BUFFER, NOT CONTINUE THE RANGE OF A
COMMAND WORD IDENTIFIED BY A PREVIOUS CALL TO THIS ROUTINE. ^THE
FOLLOWING VALUES OF ^^KIND \\ARE RETURNED TO THE CALLING PROGRAM
DESCRIBING THE TYPE OF ITEM OR ITEMS LOCATED IN THE ^^IBUFFR
\\ARRAY. ^EXCEPT WHERE MENTIONED BELOW, THESE VALUES ARE USUALLY
PASSED UNCHANGED TO THE SUBSEQUENT CALL TO THIS ROUTINE.
.INDENT -2
=#1, EITHER THE INPUT BUFFER WAS EMPTY, OR ELSE THE NEXT PRINTING
CHARACTER AT OR TO THE RIGHT OF ^^IBUFFR(LOWBFR), \\IGNORING COMMAS,
WAS AN EXCLAMATION POINT. ^^LOWBFR \\IS RETURNED POINTING BEYOND THE
END OF THE BUFFER. ^IT IS EXPECTED THAT THE CALLING PROGRAM WILL
READ NEW TEXT INTO THE INPUT BUFFER AND RESET ^^LOWBFR \\TO POINT TO
THE FIRST CHARACTER IN THE BUFFER BEFORE AGAIN CALLING THIS ROUTINE.
^UNLESS ^^KIND \\IS CHANGED TO 3 BY THE CALLING PROGRAM, THE
SUBSEQUENT CALL TO THIS ROUTINE WILL RETURN ^^KOMAND \\ZEROED IF A
NEW COMMAND WORD IS NOT IDENTIFIED.
.INDENT -2
=#2, THE NEXT PRINTING CHARACTER AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR), \\IGNORING COMMAS, WAS A SEMICOLON. ^^LOWBFR \I\S
\\RETURNED POINTING TO THE CHARACTER TO THE RIGHT OF THE SEMICOLON.
^THE SUBSEQUENT CALL TO THIS ROUTINE WILL RETURN ^^KOMAND \\ZEROED
IF A NEW COMMAND WORD IS NOT IDENTIFIED.
.INDENT -2
=#3, THE NEXT PRINTING CHARACTER AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR), \\IGNORING COMMAS, WAS AN AMPERSAND. ^^LOWBFR \I\S
\\RETURNED CONTAINING ^^MAXBFR+1. I\\T IS EXPECTED THAT THE CALLING
PROGRAM WILL READ NEW TEXT INTO THE INPUT BUFFER AND RESET ^^LOWBFR
\\TO POINT TO THE FIRST CHARACTER IN THE BUFFER BEFORE AGAIN CALLING
THIS ROUTINE. ^UNLESS ^^KIND \\IS CHANGED TO 1 BY THE CALLING
PROGRAM, THE SUBSEQUENT CALL TO THIS ROUTINE WILL RETURN THE VALUES
OF ^^KOMAND, KWRDID \\AND ^^KCNTID \\UNCHANGED IF A NEW COMMAND WORD
IS NOT IDENTIFIED.
.INDENT -2
=#4, THE NEXT PRINTING CHARACTERS AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR), \\IGNORING COMMAS EXCEPT FOR THEIR USE AS WORD
SEPARATORS, UNIQUELY IDENTIFIED AN ASSOCIATED WORD IN THE DICTIONARY
CONTAINED IN THE ^^LWORD \\AND ^^LCOUNT \\ARRAYS. ^THE SEQUENCE
NUMBER OF THE IDENTIFIED WORD AMONG ALL POSSIBLE ASSOCIATED WORDS IS
RETURNED AS THE ARGUMENT ^^LOCAL. LWRDID \\IS RETURNED CONTAINING
THE SUBSCRIPT OF THE ^^LWORD \\ARRAY LOCATION CONTAINING THE FIRST
CHARACTER OF THE WORD, AND ^^LCNTID \\IS RETURNED CONTAINING THE
SUBSCRIPT OF THE ^^LCOUNT \\ARRAY LOCATION CONTAINING THE NUMBER OF
CHARACTERS WITHIN THE WORD. ^^INITAL \\IS RETURNED CONTAINING THE
SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION WHICH CONTAINS THE FIRST
CHARACTER OF THE ASSOCIATED WORD OR ABBREVIATION OF AN ASSOCIATED
WORD. ^^LOWBFR \\IS RETURNED POINTING TO THE CHARACTER TO THE RIGHT
OF THE WORD OR WORD ABBREVIATION. ^THE SUBSEQUENT CALL TO THIS
ROUTINE WILL RETURN THE VALUES OF ^^KOMAND, KWRDID \\AND ^^KCNTID
\\UNCHANGED IF A NEW COMMAND WORD IS NOT IDENTIFIED.
.INDENT -2
=#5, THE NEXT PRINTING CHARACTERS AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR), \\IGNORING COMMAS EXCEPT FOR THEIR USE AS NUMBER
SEPARATORS, FORMED A NUMBER. ^THE VALUE OF THE NUMBER IS RETURNED IN
THE ARGUMENT ^^IVALUE \\IF EVALUATED AS AN OCTAL INTEGER OR AS A
DECIMAL INTEGER, OR IN THE ARGUMENT ^^VALUE \\IF EVALUATED AS A
DECIMAL REAL. ^^INITAL \\IS RETURNED CONTAINING THE SUBSCRIPT OF THE
^^IBUFFR \\ARRAY LOCATION WHICH CONTAINS THE FIRST CHARACTER OF THE
NUMBER. ^^LOWBFR \\IS RETURNED POINTING TO THE CHARACTER TO THE
RIGHT OF THE NUMBER. ^THE SUBSEQUENT CALL TO THIS ROUTINE WILL
RETURN THE VALUES OF ^^KOMAND, KWRDID \\AND ^^KCNTID \\UNCHANGED IF
A NEW COMMAND WORD IS NOT IDENTIFIED.
.INDENT -2
=#6, THE NEXT PRINTING CHARACTER AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR), \\IGNORING LEADING COMMAS, WAS AN APOSTROPHE WHICH
IS POINTED TO BY THE RETURNED VALUE OF ^^INITAL. LOWBFR \I\S
\\RETURNED POINTING TO THE CHARACTER TO THE RIGHT OF THE RIGHTMOST
CHARACTER WITHIN THE QUOTED TEXT STRING. ^IF THE QUOTED TEXT STRING
IS NOT TERMINATED BY AN UNPAIRED APOSTROPHE, THEN ^^LOWBFR \I\S
\\RETURNED POINTING TO THE CHARACTER TO THE RIGHT OF THE RIGHTMOST
PRINTING CHARACTER IN THE BUFFER. ^IF THE QUOTED TEXT STRING IS
TERMINATED BY AN UNPAIRED APOSTROPHE, THEN THIS APOSTROPHE IS
CHANGED TO A SPACE POINTED TO BY THE RETURNED VALUE OF ^^LOWBFR.
I\\F A PAIR OF ADJACENT APOSTROPHES IS FOUND WITHIN THE QUOTED TEXT
STRING, THEN THE PORTION OF THE QUOTED TEXT STRING TO THE RIGHT OF
THE PAIR OF APOSTROPHES IS MOVED TO THE LEFT OVERWRITING THE SECOND
APOSTROPHE OF THE PAIR, AND ^^LOWBFR \\IS RETURNED POINTING TO THE
CHARACTER TO THE RIGHT OF THE RIGHTMOST CHARACTER OF THE QUOTED TEXT
STRING IN ITS NEW LOCATION. ^THE LOCATION VACATED BY THE RIGHTMOST
CHARACTER IS FILLED WITH A SPACE AFTER THE SHIFT IS COMPLETE.
.INDENT -2
=#7, THE NEXT PRINTING CHARACTERS AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR), \\IGNORING COMMAS EXCEPT FOR THEIR USE AS
CHARACTER SEQUENCE SEPARATORS, FORMED AN UNKNOWN SEQUENCE. ^THIS
VALUE OF ^^KIND \\IS RETURNED ALSO IF A WORD OR WORD ABBREVIATION IS
NOT UNIQUE ACROSS BOTH DICTIONARIES, OR IF A COMMAND WORD OR ITS
ABBREVIATION OR AN ASSOCIATED WORD OR ITS ABBREVIATION IS FOLLOWED
BY ANY CHARACTER OTHER THAN A SPACE, TAB, COMMA, APOSTROPHE,
SEMICOLON, EXCLAMATION POINT OR AMPERSAND. ^^INITAL \\IS RETURNED
CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION WHICH
CONTAINS THE FIRST CHARACTER OF THE UNKNOWN SEQUENCE OR OF THE WORD
OR ABBREVIATION WHICH IS FOLLOWED BY AN UNKNOWN SEQUENCE. ^^LOWBFR
\\IS RETURNED POINTING TO THE FOLLOWING SPACE, TAB, COMMA,
APOSTROPHE, SEMICOLON, EXCLAMATION POINT OR AMPERSAND OR BEYOND THE
END OF THE LINE IF THE UNKNOWN PRINTING CHARACTERS EXTEND THROUGH
THE END OF THE LINE. ^THE SUBSEQUENT CALL TO THIS ROUTINE WILL
RETURN THE VALUES OF ^^KOMAND, KWRDID \\AND ^^KCNTID \\UNCHANGED IF
A NEW COMMAND WORD IS NOT IDENTIFIED.
.INDENT -2
=#8 THROUGH 14, SAME AS ^^KIND \\VALUES 1 THROUGH 7 RESPECTIVELY
EXCEPT THAT A COMMAND WORD OR ABBREVIATION WAS RECOGNIZED PRIOR TO
THE END OF LINE (8), SEMICOLON (9), AMPERSAND (10), ASSOCIATED WORD
(11), NUMBER (12), QUOTED TEXT STRING (13) OR UNKNOWN SEQUENCE (14).
^THE SEQUENCE NUMBER OF THE IDENTIFIED COMMAND AMONG ALL POSSIBLE
COMMANDS IS RETURNED AS THE ARGUMENT ^^KOMAND. KWRDID \\IS RETURNED
CONTAINING THE SUBSCRIPT OF THE ^^KWORD \\ARRAY LOCATION CONTAINING
THE FIRST CHARACTER OF THE COMMAND, AND ^^KCNTID \\IS RETURNED
CONTAINING THE SUBSCRIPT OF THE ^^KCOUNT \\ARRAY LOCATION CONTAINING
THE NUMBER OF CHARACTERS WITHIN THE COMMAND. ^THE FOLLOWING
ADDITIONAL INFORMATION SHOULD BE NOTED.
.INDENT -2
=#8, A COMMAND WORD EXTENDED THROUGH THE RIGHTMOST PRINTING
CHARACTERS IN THE LINE, OR ELSE THE NEXT PRINTING CHARACTER TO THE
RIGHT OF A COMMAND WORD, IGNORING COMMAS EXCEPT FOR THEIR USE AS
WORD SEPARATORS, WAS AN EXCLAMATION POINT. ^UNLESS ^^KIND \I\S
\\CHANGED TO 10 BY THE CALLING PROGRAM, THE SUBSEQUENT CALL TO THIS
ROUTINE WILL RETURN ^^KOMAND \\ZEROED UNLESS A NEW COMMAND IS FOUND.
.INDENT -2
=#10, THE NEXT PRINTING CHARACTER TO THE RIGHT OF A COMMAND WORD,
IGNORING COMMAS EXCEPT FOR THEIR USE AS WORD SEPARATORS, WAS AN
AMPERSAND. ^THE CALLING PROGRAM SHOULD READ NEW TEXT INTO THE INPUT
BUFFER AND THE SUBSEQUENT CALL TO THIS ROUTINE IS THEN TO CONTINUE
THE INTERPRETATION OF THE NEW TEXT AS THOUGH THIS COMMAND WORD
APPEARED AT THE START OF THE NEW CONTENTS OF THE BUFFER. ^UNLESS
^^KIND \\IS CHANGED TO 8 BY THE CALLING PROGRAM, THE SUBSEQUENT CALL
TO THIS ROUTINE WILL RETURN ^^KOMAND, KWRDID \\AND ^^KCNTID
\\UNCHANGED AND WILL RETURN ^^KIND \\GREATER THAN 7.
.INDENT -2
=#15, IGNORING COMMAS EXCEPT FOR THEIR USE AS WORD TERMINATORS, A
COMMAND WORD OR ITS ABBREVIATION WAS FOLLOWED BY SPACES AND/OR TABS
AND/OR COMMAS AND THEN BY A SECOND COMMAND WORD OR ITS ABBREVIATION.
^THE FIRST COMMAND IS IDENTIFIED BY THE RETURNED VALUES OF ^^KOMAND,
KWRDID \\AND ^^KCNTID. LOWBFR \\IS RETURNED POINTING TO THE FIRST
CHARACTER OF THE SECOND COMMAND WORD WHICH WILL IN TURN BE
IDENTIFIED BY THE SUBSEQUENT CALL TO THIS ROUTINE. ^IF ^^KIND \\WAS
INPUT CONTAINING THE VALUE 10, THEN THE SECOND COMMAND WORD IS OF
COURSE ACTUALLY THE FIRST TO APPEAR IN THE CURRENT CONTENTS OF THE
BUFFER.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE RETURNED TO THE CALLING PROGRAM
IDENTIFYING THE COMMAND WORD FOUND BY THIS ROUTINE OR WHICH IS STILL
IN EFFECT FROM THE PREVIOUS CALL TO THIS ROUTINE. ^THE PREVIOUS
COMMAND IS STILL IN EFFECT AND THE INPUT VALUES OF THESE ARGUMENTS
ARE RETURNED UNCHANGED IF ^^KIND \\IS INPUT WITH A VALUE OTHER THAN
0, 1, 2, 8 OR 9, AND IF ^^KIND \\IS RETURNED WITH A VALUE LESS THAN
OR EQUAL TO 7.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KOMAND#=#\\RETURNED CONTAINING THE SEQUENCE NUMBER OF THE CURRENT
COMMAND WORD AMONG ALL POSSIBLE COMMAND WORDS. ^THE SEQUENCE NUMBER
DOES NOT INCLUDE THE LETTERS SKIPPED OVER BY THE VALUE OF ^^KWRDLO
\\BEING GREATER THAN 1, AND DOES NOT INCLUDE THE LETTERS SKIPPED
OVER BY NEGATIVE VALUES ENCOUNTERED IN THE ^^KCOUNT \\ARRAY.
^^KOMAND \\IS THE NUMBER OF VALUES IN THE ^^KCOUNT \\ARRAY WHICH ARE
GREATER THAN ZERO STARTING AT ^^KCOUNT(KCNTLO) \\UP TO AND INCLUDING
THE ^^KCOUNT \\ARRAY LOCATION WHICH CONTAINS THE NUMBER OF LETTERS
IN THE COMMAND WORD WHICH IS SUCCESSFULLY MATCHED. ^^KOMAND \I\S
\\RETURNED CONTAINING ZERO IF ^^KIND \\IS INPUT CONTAINING 0, 1, 2,
8 OR 9 INDICATING THAT THE RANGE OF THE PREVIOUS COMMAND IS BEING
TERMINATED, AND IF ^^KIND \\IS RETURNED LESS THAN OR EQUAL TO 7
INDICATING THAT NO NEW COMMAND WAS FOUND. ^^KOMAND \\IS RETURNED
UNCHANGED IF ^^KIND \\IS INPUT CONTAINING A VALUE OTHER THAN 0, 1,
2, 8 OR 9, AND IF ^^KIND \\IS RETURNED LESS THAN OR EQUAL TO 7.
.SKIP
.INDENT -9
^^KWRDID#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^KWORD
\\ARRAY LOCATION WHICH CONTAINS THE FIRST CHARACTER OF THE MATCHED
COMMAND WORD. ^^KWRDID \\IS RETURNED UNCHANGED IF THE COMMAND
IDENTIFIED BY A PREVIOUS CALL TO THIS ROUTINE IS STILL IN EFFECT.
.SKIP
.INDENT -9
^^KCNTID#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^KCOUNT
\\ARRAY LOCATION WHICH CONTAINS THE NUMBER OF CHARACTERS IN THE
MATCHED COMMAND WORD. ^^KCNTID \\IS RETURNED UNCHANGED IF THE
COMMAND IDENTIFIED BY A PREVIOUS CALL TO THIS ROUTINE IS STILL IN
EFFECT.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE RETURNED TO THE CALLING PROGRAM
IDENTIFYING THE ASSOCIATED WORD FOUND IF ^^KIND \\IS RETURNED
CONTAINING EITHER 4 OR 11. ^THESE ARGUMENTS ARE RETURNED UNCHANGED
IF ^^KIND \\IS RETURNED WITH ANY VALUE OTHER THAN 4 OR 11.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LOCAL##=#\\RETURNED CONTAINING THE SEQUENCE NUMBER OF THE
ASSOCIATED WORD AMONG ALL POSSIBLE ASSOCIATED WORDS. ^THE SEQUENCE
NUMBER DOES NOT INCLUDE THE LETTERS SKIPPED OVER BY THE VALUE OF
^^LWRDLO \\BEING GREATER THAN 1, AND DOES NOT INCLUDE THE LETTERS
SKIPPED OVER BY NEGATIVE VALUES ENCOUNTERED IN THE ^^LCOUNT \\ARRAY.
^^LOCAL \\IS THE NUMBER OF VALUES IN THE ^^LCOUNT \\ARRAY WHICH ARE
GREATER THAN ZERO STARTING AT ^^LCOUNT(LCNTLO) \\UP TO AND INCLUDING
THE ^^LCOUNT \\ARRAY LOCATION WHICH CONTAINS THE NUMBER OF LETTERS
IN THE ASSOCIATED WORD WHICH IS SUCCESSFULLY MATCHED.
.SKIP
.INDENT -9
^^LWRDID#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^LWORD
\\ARRAY LOCATION WHICH CONTAINS THE FIRST CHARACTER OF THE MATCHED
ASSOCIATED WORD.
.SKIP
.INDENT -9
^^LCNTID#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^LCOUNT
\\ARRAY LOCATION WHICH CONTAINS THE NUMBER OF CHARACTERS IN THE
MATCHED ASSOCIATED WORD.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR OUTPUT. ^THEIR INPUT
VALUES ARE IGNORED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^INITAL#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR
\\ARRAY LOCATION WHICH CONTAINS THE FIRST CHARACTER OF AN ASSOCIATED
WORD (^^KIND \\RETURNED AS 4 OR 11), OF A NUMBER (^^KIND \\RETURNED
AS 5 OR 12), OR OF AN UNKNOWN SEQUENCE OF CHARACTERS (^^KIND
\\RETURNED AS 7 OR 14). ^IF A QUOTED TEXT STRING IS FOUND (^^KIND
\\RETURNED CONTAINING 6 OR 13), THEN ^^INITAL \\IS RETURNED POINTING
TO THE APOSTROPHE AT THE LEFT END OF THE STRING.
.SKIP
.INDENT -9
^^IVALUE#=#\\RETURNED CONTAINING THE VALUE IF A NUMBER IS FOUND
(^^KIND \\BEING RETURNED CONTAINING 5 OR 12) AND IS EVALUATED AS AN
OCTAL INTEGER OR AS A DECIMAL INTEGER.
.SKIP
.INDENT -9
^^VALUE##=#\\RETURNED CONTAINING THE VALUE IF A NUMBER IS FOUND
(^^KIND \\BEING RETURNED CONTAINING 5 OR 12) AND IS EVALUATED AS A
DECIMAL REAL.
.SKIP
.INDENT -9
^^IFLOAT#=#\\SPECIFIES HOW A NUMBER WAS EVALUATED. ^^IFLOAT \I\S
\\RETURNED SET EQUAL TO ^^INITYP \\IF THE NUMBER IS OUTSIDE THE
RANGE OF A COMMAND, OR SET EQUAL TO ^^NXTTYP \\IF THE NUMBER IS
WITHIN THE RANGE OF A COMMAND AND ^^NXTTYP \\HAS A VALUE GREATER
THAN -3, OR SET EQUAL TO THE ENTRY IN THE ^^NUMTYP \\ARRAY HAVING
THE SAME SUBSCRIPT AS THE ^^KCOUNT \\ARRAY ENTRY WHICH SPECIFIES THE
NUMBER OF CHARACTERS IN THE COMMAND IF ^^NXTTYP=-3. IFLOAT \\IS
RETURNED UNDEFINED, BUT PROBABLY CHANGED, IF ^^KIND \\IS RETURNED
WITH A VALUE OTHER THAN 5 OR 12.
.INDENT -2
=#-1, THE NUMBER WAS EVALUATED AS AN OCTAL INTEGER AND ITS VALUE IS
RETURNED IN ^^IVALUE.
.INDENT -2
=#0, \\THE NUMBER WAS EVALUATED AS A DECIMAL INTEGER AND ITS VALUE
IS RETURNED IN ^^IVALUE.
.INDENT -2
=#1 \\OR GREATER, THE NUMBER WAS EVALUATED AS A DECIMAL REAL AND ITS
VALUE IS RETURNED IN THE ARGUMENT NAMED ^^VALUE.
.PAGE
.LEFT MARGIN 0
.FILL
.CENTER
A\N E\\XAMPLE OF THE ^USE OF ^^DALEAD
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE PROGRAM LISTED ON THE FOLLOWING PAGES REPORTS THE RESULTS OF
THE INTERPRETATION BY ^^DALEAD \\OF A LINE OF TEXT TYPED BY THE
USER. ^THE USER CAN TYPE THE COMMANDS ^^LEADING, TRAILING \O\R BOTH
\\FOLLOWED BY THE ASSOCIATED WORDS ^^NONE, OCTAL, DECIMAL \O\R REAL
\\TO MODIFY THE INTERPRETATION OF NUMBERS IN THE INDICATED
POSITIONS. ^FOR EXAMPLE, IF THE COMMAND ^^TRAILING \\HAS BEEN ISSUED
WITH THE ASSOCIATED WORD ^^DECIMAL, \\THEN NUMBERS ASSOCIATED WITH
ANY COMMAND WILL BE EVALUATED AS DECIMAL INTEGERS. ^THE COMMAND
^^TRAILING \\CAN ALSO BE FOLLOWED BY THE ASSOCIATED WORD ^^DEPENDENT
\\TO CAUSE THE SUBSEQUENT COMMANDS ^^TEST NONE, TEST OCTAL, TEST
DECIMAL, \\AND ^^TEST REAL \\TO TAKE ASSOCIATED NUMBERS OF THE TYPES
INDICATED BY THE COMMAND NAMES. ^FOR EXAMPLE, IF THE COMMAND
^^TRAILING \\HAS BEEN ISSUED WITH THE ASSOCIATED WORD ^^DEPENDENT,
\\THEN THE COMMAND ^^TEST NONE \\WILL NOT ALLOW ANY ASSOCIATED
NUMBERS, ^^TEST OCTAL \\WILL ACCEPT ONLY OCTAL ASSOCIATED NUMBERS,
AND SO FORTH. ^THE DEMONSTRATION PROGRAM DOES NOT TAKE SPECIAL
ACTION FOR THE OTHER WORDS WHICH IT CAN RECOGNIZE. ^A TYPICAL DIALOG
BETWEEN THE PROGRAM AND THE USER IS PRESENTED FOLLOWING THE LISTING
OF THE PROGRAM.
.SKIP
.NOFILL
^^C     PROGRAM TO DEMONSTRATE DALEAD ROUTINE
C
      DIMENSION KCOUNT(18),NUMTYP(18),KWORD(109)
      DIMENSION LCOUNT(21),LWORD(85)
      DIMENSION JAND(5),LGND1(11),LGND7(8),LGND15(7)
      DIMENSION IBUFFR(60),JBUFFR(60)
C
C     ARRAYS DEFINING DICTIONARY OF COMMANDS
C     1 LEADING     6 EXAMINE    11 EDIT
C     2 BOTH        7 LIST       12 TEST NONE
C     3 TRAILING    8 REMOVE     13 TEST OCTAL
C     4 CHANGE      9 RESTORE    14 TEST DECIMAL
C     5 MODIFY     10 NOTE       15 TEST REAL
C
      DATA KCNTLO,KCNTHI,KWRDLO,KWRDHI/4,18,7,109/
      DATA KCOUNT/ 99, 99, 99,  7,  4,  8,  6,  6,  7,  4,
     1              6,  7,  4,  4,109,110,112,109/
      DATA NUMTYP/ 0, 0, 0,-2,-2,-2, 0, 0, 0, 0,
     1 0, 0, 0, 0,-2,-1, 0, 1/
      DATA KWORD /1HI,1HG,1HN,1HO,1HR,1HE,1HL,1HE,1HA,1HD,
     11HI,1HN,1HG,1HB,1HO,1HT,1HH,1HT,1HR,1HA,1HI,1HL,1HI,
     21HN,1HG,1HC,1HH,1HA,1HN,1HG,1HE,1HM,1HO,1HD,1HI,1HF,
     31HY,1HE,1HX,1HA,1HM,1HI,1HN,1HE,1HL,1HI,1HS,1HT,1HR,
     41HE,1HM,1HO,1HV,1HE,1HR,1HE,1HS,1HT,1HO,1HR,1HE,1HN,
     51HO,1HT,1HE,1HE,1HD,1HI,1HT,1HT,1HE,1HS,1HT,1H ,1HN,
     61HO,1HN,1HE,1HT,1HE,1HS,1HT,1H ,1HO,1HC,1HT,1HA,1HL,
     71HT,1HE,1HS,1HT,1H ,1HD,1HE,1HC,1HI,1HM,1HA,1HL,1HT,
     81HE,1HS,1HT,1H ,1HR,1HE,1HA,1HL/
C
C     ARRAYS DEFINING DICTIONARY OF ASSOCIATED WORDS
C     1 DEPENDENT   6 SOME       11 TELL NOTHING
C     2 NONE        7 ALL        12 TRY NUMBER
C     3 OCTAL       8 FEW        13 NOT ALL
C     4 DECIMAL     9 MANY       14 TEST
C     5 REAL       10 MORE
C
      DATA LCNTLO,LCNTHI,LWRDLO,LWRDHI/8,21,6,85/
      DATA LCOUNT/ 99, 99, 99, 99, 99, 99, 99,  9,  4,  5,
     1              7,  4,  4,  3,  3,  4,  4,112,110,107,
     2              4/
      DATA LWORD /1HD,1HU,1HM,1HM,1HY,1HD,1HE,1HP,1HE,1HN,
     11HD,1HE,1HN,1HT,1HN,1HO,1HN,1HE,1HO,1HC,1HT,1HA,1HL,
     21HD,1HE,1HC,1HI,1HM,1HA,1HL,1HR,1HE,1HA,1HL,1HS,1HO,
     31HM,1HE,1HA,1HL,1HL,1HF,1HE,1HW,1HM,1HA,1HN,1HY,1HM,
     41HO,1HR,1HE,1HT,1HE,1HL,1HL,1H ,1HN,1HO,1HT,1HH,1HI,
     51HN,1HG,1HT,1HR,1HY,1H ,1HN,1HU,1HM,1HB,1HE,1HR,1HN,
     61HO,1HT,1H ,1HA,1HL,1HL,1HT,1HE,1HS,1HT/
C
C     ARRAYS USED TO GENERATE TEXT DESCRIPTIONS
      DATA JAND/1H ,1HA,1HN,1HD,1H /
      DATA LGND1/1HE,1HN,1HD,1H ,1HO,1HF,1H ,1HL,1HI,1HN,
     11HE/
      DATA LGND7/1HU,1HN,1HK,1HN,1HO,1HW,1HN,1H /
      DATA LGND15/1HC,1HO,1HM,1HM,1HA,1HN,1HD/
      DATA ILEFT,IRIGHT,IAND,IEND,IQUOTE/
     11H(,1H),1H_&,1H;,1H'/
C
C     INITIAL VALUES
      DATA ITTY,JTTY,MAXBFR,IFRCTN,INITYP,NXTTYP,ITRAIL,
     1KIND/5,5,60,0,0,0,0,0/
C
C     ASK USER FOR TEXT TO BE PROCESSED
    1 WRITE(JTTY,2)
    2 FORMAT(2H *,$)
      READ(ITTY,3)IBUFFR
    3 FORMAT(72A1)
      LOWBFR=1
C
C     FIND NEXT COMMAND AND ASSOCIATED WORD OR NUMBER
    4 CALL DALEAD(INITYP,NXTTYP,ITRAIL,KWRDLO,KWRDHI,
     1KWORD ,KCNTLO,KCNTHI,KCOUNT,NUMTYP,LWRDLO,LWRDHI,
     2LWORD ,LCNTLO,LCNTHI,LCOUNT,IBUFFR,MAXBFR,LOWBFR,
     3KIND  ,KOMAND,KWRDID,KCNTID,LOCAL ,LWRDID,LCNTID,
     4INITAL,IVALUE,VALUE ,IFLOAT)
C
C     INSERT COMMAND WORD INTO TEXT TO BE PRINTED
      INDEX=0
      IF(KOMAND.EQ.0)GO TO 7
      JBUFFR(INDEX+1)=ILEFT
      IF(KIND.LE.7)INDEX=INDEX+1
      J=KCOUNT(KCNTID)
      IF(J.GE.100)J=J-100
      J=KWRDID+J-1
      DO 5 I=KWRDID,J
      INDEX=INDEX+1
    5 JBUFFR(INDEX)=KWORD(I)
      JBUFFR(INDEX+1)=IRIGHT
      IF(KIND.LE.7)INDEX=INDEX+1
      DO 6 I=1,5
      INDEX=INDEX+1
    6 JBUFFR(INDEX)=JAND(I)
C
C     BRANCH TO CODE TO REPRESENT ASSOCIATED WORD OR NUMBER
    7 NEW=KIND
      IF(NEW.GT.7)NEW=NEW-7
      GO TO(8,10,11,12,14,17,15,19),NEW
C
C     END OF LINE
    8 DO 9 I=1,11
      INDEX=INDEX+1
    9 JBUFFR(INDEX)=LGND1(I)
      GO TO 21
C
C     SEMICOLON
   10 INDEX=INDEX+1
      JBUFFR(INDEX)=IEND
      GO TO 21
C
C     AMPERSAND
   11 INDEX=INDEX+1
      JBUFFR(INDEX)=IAND
      GO TO 21
C
C     ASSOCIATED WORD
   12 J=LCOUNT(LCNTID)
      IF(J.GE.100)J=J-100
      J=LWRDID+J-1
      DO 13 I=LWRDID,J
      INDEX=INDEX+1
   13 JBUFFR(INDEX)=LWORD(I)
C
C     CHECK IF DALEAD ARGUMENTS ARE TO BE CHANGED
      IF(LOCAL.GT.5)GO TO 21
      IF((KOMAND.EQ.1).OR.(KOMAND.EQ.2))INITYP=LOCAL-4
      IF((KOMAND.EQ.2).OR.(KOMAND.EQ.3))NXTTYP=LOCAL-4
      GO TO 21
C
C     NUMBER
   14 CALL DASHOW(IFLOAT,0,6,4,6,
     13,IVALUE,VALUE,MAXBFR,INDEX,JBUFFR,IERR)
      GO TO 21
C
C     QUOTED TEXT STRING OR UNKNOWN CHARACTER SEQUENCE
   15 DO 16 I=1,8
      INDEX=INDEX+1
   16 JBUFFR(INDEX)=LGND7(I)
   17 J=LOWBFR-1
      DO 18 I=INITAL,J
      INDEX=INDEX+1
   18 JBUFFR(INDEX)=IBUFFR(I)
      JBUFFR(INDEX+1)=IQUOTE
      IF(NEW.EQ.6)INDEX=INDEX+1
      GO TO 21
C
C     FOLLOWING COMMAND
   19 DO 20 I=1,7
      INDEX=INDEX+1
   20 JBUFFR(INDEX)=LGND15(I)
C
C     REPORT RESULTS TO USER
   21 WRITE(JTTY,22)(JBUFFR(I),I=1,INDEX)
   22 FORMAT(2X,100A1)
      IF(NEW.EQ.1)GO TO 1
      IF(NEW.EQ.3)GO TO 1
      GO TO 4
      END
.SKIP 3
T\\YPICAL ^DIALOG ^BETWEEN ^^DALEAD D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
*^^EXAM ALL!SIMPLE COMMAND AND ARGUMENT
 EXAMINE AND ALL
 (EXAMINE) AND END OF LINE
*EXAM ALL;!SEMICOLON
 EXAMINE AND ALL
 (EXAMINE) AND ;
 END OF LINE
*EXAM ALL_&AMPERSAND
 EXAMINE AND ALL
 (EXAMINE) AND _&
*NONE LISTING SOMETHING UNKNOWN;;_&UNKNOWN WORDS
 (EXAMINE) AND NONE
 (EXAMINE) AND UNKNOWN LISTING
 (EXAMINE) AND UNKNOWN SOMETHING
 (EXAMINE) AND UNKNOWN UNKNOWN
 (EXAMINE) AND ;
 ;
 _&
*T N TE N T NO TEST TEL N TE NOT!AMBIGUOUS AND UNIQUE
 UNKNOWN T N
 UNKNOWN TE N
 UNKNOWN T NO
 TEST
 TELL NOTHING
 TELL NOTHING
 END OF LINE
.TEST PAGE 10
*NOTE NOTA NON 12.34 ;ALL REAL 12.34 CHANGE SOM_&CONTINUE
 NOTE AND NOT ALL
 (NOTE) AND NONE
 (NOTE) AND 12
 (NOTE) AND ;
 ALL
 REAL
 12
 CHANGE AND SOME
 (CHANGE) AND _&
*MORE 12.3 MANNY EXAMINE_&CONTINUE WHEN NO ARGUMENT YET FOUND
 (CHANGE) AND MORE
 (CHANGE) AND 12
 (CHANGE) AND UNKNOWN MANNY
 EXAMINE AND _&
*LIST,,MANY EDIT MODIFY!COMMAND AFTER COMMAND
 EXAMINE AND COMMAND
 LIST AND MANY
 EDIT AND COMMAND
 MODIFY AND END OF LINE
*0169.20 NOTE 0169.20 LEAD REAL;0169.20 NOTE 0169.20
 169
 NOTE AND 169
 LEADING AND REAL
 (LEADING) AND ;
 169.2
 NOTE AND 169
 (NOTE) AND END OF LINE
*LEAD DEC TRAI REAL;0169.20 NOTE 0169.20 TRAIL DEPENDENT
 LEADING AND DECIMAL
 TRAILING AND REAL
 (TRAILING) AND ;
 169
 NOTE AND 169.2
 TRAILING AND DEPENDENT
 (TRAILING) AND END OF LINE
*TEST NONE 0169.20 TEST OCTAL 0169.20
 TEST NONE AND UNKNOWN 0169.20
 TEST OCTAL AND 16
 (TEST OCTAL) AND UNKNOWN 9.20
 (TEST OCTAL) AND END OF LINE
*TEST DECIMAL 0169.20 TEST REAL 0169.20
 TEST DECIMAL AND 169
 TEST REAL AND 169.2
 (TEST REAL) AND END OF LINE
.SUBTITLE ^^DALINE, B\A\R C\\HART ^PLOTTER FOR ^PRINTER
.PAGE
.NOFILL
.LEFT MARGIN 0
^^DDDDD          AAA   LL         IIIIII   NN    NN   EEEEEEEE
DD   DD       AAAA   LL           II     NNN   NN   EE
DD    DD     AA AA   LL           II     NNNN  NN   EE
DD    DD    AA  AA   LL           II     NN NN NN   EEEEE
DD    DD   AAAAAAA   LL           II     NN  NNNN   EE
DD   DD   AA    AA   LL           II     NN   NNN   EE
DDDDD    AA     AA   LLLLLLLL   IIIIII   NN    NN   EEEEEEEE
.SKIP 2
.FILL
.CENTER
DALINE, B\A\R C\\HART ^PLOTTER FOR ^PRINTER
.CENTER
------##---#----- ------- --- -------
.SKIP
^^DALINE \\IS A ^^FORTRAN \\SUBROUTINE WHICH CONSTRUCTS PRINTABLE
PLOTS CONTAINING HORIZONTAL BARS FORMED OF SEGMENTS THE LENGTHS OF
WHICH REPRESENT THE MAGNITUDES OF THE CORRESPONDING VALUES. ^THE
SEGMENTS CAN EACH BE REPRESENTED WITH A DIFFERENT CHARACTER. ^EITHER
THE ENTIRE LENGTHS OF THE SEGMENTS, OR MERELY THEIR TIPS, CAN BE
REPRESENTED. ^THE BARS CAN BE SUPERIMPOSED UPON A BACKGROUND GRID
AND CAN EXTEND TO EITHER SIDE OF A CENTRAL COLUMN CORRESPONDING TO
ZERO. ^NEGATIVE SEGMENTS (DEBITS) ARE ACCUMULATED TO ONE SIDE OF THE
ZERO COLUMN, AND POSITIVE SEGMENTS (CREDITS) TO THE OTHER, ALTHOUGH
THE USER HAS THE OPTION OF SUPPRESSING THE DISPLAY OF EITHER
PORTION. ^^DALINE \\IS CALLED AS MANY TIMES AS THERE ARE LINES IN
THE PLOT, EACH SUBSEQUENT CALL GENERATING THE NEXT LOWER LINE OF THE
PLOT. ^EITHER A NUMBER OR AN ALPHABETIC LABEL CAN BE PRINTED TO THE
LEFT OF EACH LINE OF THE PLOT. ^TICK MARKS AND SCALE NUMBERS CAN BE
GENERATED BELOW THE PLOT WHEN THE FINAL BAR IS PLOTTED, OR CAN BE
ADDED AFTERWARDS.
.SKIP
.CENTER
^THE ^^DALINE A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DALINE \I\S
.SKIP
.NOFILL
      SUBROUTINE DALINE(IGRID ,KNDBAR,LSTLIN,MARGIN,MSHLFT,
     1    MSHRIT,LNGLFT,LNGRIT,XLEFT ,XRIGHT,SEGMNT,MINSEG,
     2    MAXSEG,LETTER,MINLTR,MAXLTR,YVALUE,LABEL ,MINLBL,
     3    MAXLBL,LINPRT,IDISK )
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION SEGMNT(MAXSEG),LETTER(MAXLTR),LABEL(MAXLBL)
.SKIP
.FILL
A\\LL OF THE ARGUMENTS OF THIS ROUTINE ARE USED ONLY FOR INPUT AND
ARE RETURNED UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IGRID##=#\\SELECTS THE BACKGROUND CHARACTERS TO BE SHOWN WHERE NOT
HIDDEN BY THE CHARACTERS USED TO REPRESENT THE BAR SEGMENTS, SELECTS
THE CHARACTER, IF ANY, TO APPEAR IN THE CENTRAL ZERO COLUMN, AND
SELECTS THE TYPE OF CAPTION, EITHER NUMERIC OR ALPHABETIC, TO BE
SHOWN TO THE LEFT OF THE CURRENTLY GENERATED PANEL OF THE BAR CHART.
^THESE OPTIONS ARE SELECTED BY THE DIGITS IN THE ONES, TENS, AND
HUNDREDS POSITIONS RESPECTIVELY IN THE DECIMAL INTEGER VALUE OF
^^IGRID.
.SKIP
I\\F THE BAR CHART IS TO BE SUPERIMPOSED UPON A RECTANGULAR GRID
FORMED OF HORIZONTAL LINES REPRESENTED BY MINUS SIGNS AND OF
VERTICAL LINES REPRESENTED BY EXCLAMATION POINTS, THEN ^^IGRID
\\WOULD BE ASSIGNED 2 DIFFERENT VALUES, THE FIRST VALUE SELECTING
EXCLAMATION POINTS IN THE COLUMNS WHICH ARE TO RULED WITH VERTICAL
LINES AND SPACES ELSEWHERE IN EACH PANEL WHICH IS NOT TO BE RULED
WITH A HORIZONTAL GRID LINE, AND A SECOND VALUE SELECTING PLUS SIGNS
AT THE GRID LINE INTERSECTIONS AND MINUS SIGNS ELSEWHERE IN EACH
PANEL WHICH IS TO BE RULED WITH A HORIZONTAL GRID LINE. ^IF A
RECTANGULAR GRID IS NOT TO BE INCLUDED IN THE PLOT BUT BORDER LINES
ARE DESIRED, THEN ^^IGRID \\WOULD HAVE A VALUE SELECTING HORIZONTAL
GRID LINES IN THE TOP AND BOTTOM PANELS, AND ANOTHER VALUE SELECTING
ONLY THE LEFT AND RIGHT GRID LINES IN THE INTERVENING PANELS.
.SKIP
^THE MEANINGS ASSIGNED TO EACH POSITION IN THE VALUE OF ^^IGRID
\\ARE AS FOLLOW
.SKIP
.INDENT -2
^^ONES#DIGIT
.SKIP
\\SELECTS THE CHARACTERS TO BE INCLUDED ACROSS THE WIDTH OF THE PLOT
IN COLUMNS NOT OCCUPIED BY THE CHARACTERS USED TO REPRESENT THE BAR
SEGMENTS, BUT DOES NOT DICTATE THE CHARACTERS APPEARING IN EITHER
THE LEFT MARGIN OR IN THE COLUMN REPRESENTING ZERO.
.SKIP
.LEFT MARGIN 14
.INDENT -3
0##SPACES WILL BE SHOWN WHERE NOT HIDDEN BY THE CHARACTERS USED TO
REPRESENT THE BAR SEGMENTS.
.INDENT -3
1##MINUS SIGNS WILL BE SHOWN WHERE NOT HIDDEN BY THE CHARACTERS USED
TO REPRESENT THE BAR SEGMENTS.
.INDENT -3
2##IF NOT HIDDEN BY THE CHARACTERS USED TO REPRESENT THE BAR
SEGMENTS, THEN EXCLAMATION POINTS WILL BE SHOWN IN THE LEFTMOST
COLUMN WHICH COULD BEAR A LOWER SCALE NUMBER TO THE LEFT OF THE ZERO
COLUMN, AND IN THE RIGHTMOST COLUMN WHICH COULD BEAR A LOWER SCALE
NUMBER TO THE RIGHT OF THE ZERO COLUMN. ^SPACES WILL BE SHOWN IN THE
REMAINING COLUMNS WHERE NOT HIDDEN BY THE CHARACTERS USED TO
REPRESENT THE BAR SEGMENTS.
.INDENT -3
3##SAME AS ^^IGRID=2, \\EXCEPT THAT MINUS SIGNS ARE INCLUDED INSTEAD
OF SPACES IN THE COLUMNS WHICH CONTAIN NEITHER EXCLAMATION POINTS
NOR THE CHARACTERS WHICH REPRESENT THE BAR SEGMENTS.
.INDENT -3
4##SAME AS ^^IGRID=2, \\EXCEPT THAT IF NOT HIDDEN BY THE CHARACTERS
USED TO REPRESENT THE BAR SEGMENTS, THEN PLUS SIGNS WILL BE SHOWN IN
THE LEFTMOST COLUMN WHICH COULD BEAR A LOWER SCALE NUMBER TO THE
LEFT OF THE ZERO COLUMN, AND IN THE RIGHTMOST COLUMN WHICH COULD
BEAR A LOWER SCALE NUMBER TO THE RIGHT OF THE ZERO COLUMN.
.INDENT -3
5##SAME AS ^^IGRID=4, \\EXCEPT THAT MINUS SIGNS ARE INCLUDED INSTEAD
OF SPACES IN THE COLUMNS WHICH CONTAIN NEITHER PLUS SIGNS NOR THE
CHARACTERS WHICH REPRESENT THE BAR SEGMENTS.
.INDENT -3
6##IF NOT HIDDEN BY THE CHARACTERS USED TO REPRESENT THE BAR
SEGMENTS, THEN EXCLAMATION POINTS WILL BE SHOWN IN EACH COLUMN WHICH
COULD BEAR A LOWER SCALE NUMBER. ^SPACES WILL BE SHOWN IN THE
REMAINING COLUMNS WHERE NOT HIDDEN BY THE CHARACTERS USED TO
REPRESENT THE BAR SEGMENTS.
.INDENT -3
7##SAME AS ^^IGRID=6, \\EXCEPT THAT MINUS SIGNS ARE INCLUDED INSTEAD
OF SPACES IN THE COLUMNS WHICH CONTAIN NEITHER EXCLAMATION POINTS
NOR THE CHARACTERS WHICH REPRESENT THE BAR SEGMENTS.
.INDENT -3
8##SAME AS ^^IGRID=6, \\EXCEPT THAT IF NOT HIDDEN BY THE CHARACTERS
USED TO REPRESENT THE BAR SEGMENTS, THEN PLUS SIGNS WILL BE SHOWN IN
EACH COLUMN WHICH COULD BEAR A LOWER SCALE NUMBER.
.INDENT -3
9##SAME AS ^^IGRID=8, \\EXCEPT THAT MINUS SIGNS ARE INCLUDED INSTEAD
OF SPACES IN THE COLUMNS WHICH CONTAIN NEITHER PLUS SIGNS NOR THE
CHARACTERS WHICH REPRESENT THE BAR SEGMENTS.
.LEFT MARGIN 9
.SKIP
^THE FOLLOWING EXAMPLES DEMONSTRATE THE RESULTS PRODUCED BY THE
VARIOUS VALUES OF THE ONES DIGIT.
.SKIP
.NOFILL
.TEST PAGE 12
ONES DIGIT = 0
           = 1    --------------- ---------------
           = 2    !                             !
           = 3    !-------------- --------------!
           = 4    +                             +
           = 5    +-------------- --------------+
           = 6    !    !    !         !    !    !
           = 7    !----!----!---- ----!----!----!
           = 8    +    +    +         +    +    +
           = 9    +----+----+---- ----+----+----+
    TICK MARKS    !    !    !    !    !    !    !
 SCALE NUMBERS   -15  -10  -5    0    5   10   15
.FILL
.SKIP
.INDENT -2
^^TENS#DIGIT
.SKIP
\\SELECTS THE CHARACTER, IF ANY, TO BE SHOWN IN THE ZERO COLUMN, AND
WHETHER THE LOWER SCALE NUMBERS, IF GENERATED BY THE CURRENT CALL TO
THIS ROUTINE, ARE TO INCLUDE THE IDENTIFICATION OF THE ZERO COLUMN.
.LEFT MARGIN 14
.SKIP
.INDENT -3
0##THE ZERO COLUMN IS NOT TO BE INCLUDED WITHIN THE REPRESENTATION
OF THE CURRENT PANEL. ^IF THE TENS DIGIT HAS THE VALUE ZERO FOR ANY
PANEL OF THE PLOT, THEN IT MUST HAVE THE VALUE ZERO FOR ALL PANELS
OF THE PLOT OR ELSE THE BAR SEGMENTS TO THE RIGHT OF THE ZERO COLUMN
WILL BE IMPROPERLY ALIGNED.
.INDENT -3
1##THE ZERO COLUMN IS TO BE REPRESENTED BY THE SPACE CHARACTER, BUT
IS NOT TO BE IDENTIFIED IN THE LOWER SCALE NUMBERS WHICH MIGHT BE
GENERATED BY THE CURRENT CALL TO THIS ROUTINE.
.INDENT -3
2##THE ZERO COLUMN IS TO BE REPRESENTED BY THE MINUS SIGN, BUT IS
NOT TO BE IDENTIFIED IN THE LOWER SCALE NUMBERS WHICH MIGHT BE
GENERATED BY THE CURRENT CALL TO THIS ROUTINE.
.INDENT -3
3##THE ZERO COLUMN IS TO BE REPRESENTED BY THE EXCLAMATION POINT,
BUT IS NOT TO BE IDENTIFIED IN THE LOWER SCALE NUMBERS WHICH MIGHT
BE GENERATED BY THE CURRENT CALL TO THIS ROUTINE.
.INDENT -3
4##THE ZERO COLUMN IS TO BE REPRESENTED BY THE PLUS SIGN, BUT IS NOT
TO BE IDENTIFIED IN THE LOWER SCALE NUMBERS WHICH MIGHT BE GENERATED
BY THE CURRENT CALL TO THIS ROUTINE.
.INDENT -3
5##THE ZERO COLUMN IS TO BE REPRESENTED BY THE SPACE CHARACTER. ^IF
THE CURRENT CALL TO THIS ROUTINE ALSO GENERATES THE LOWER SCALE
NUMBERS, THEN THE ZERO COLUMN WILL BE IDENTIFIED BY A SCALE NUMBER
HAVING THE VALUE ZERO.
.INDENT -3
6##THE ZERO COLUMN IS TO BE REPRESENTED BY THE MINUS SIGN. ^IF THE
CURRENT CALL TO THIS ROUTINE ALSO GENERATES THE LOWER SCALE NUMBERS,
THEN THE ZERO COLUMN WILL BE IDENTIFIED BY A SCALE NUMBER HAVING THE
VALUE ZERO.
.INDENT -3
7##THE ZERO COLUMN IS TO BE REPRESENTED BY THE EXCLAMATION POINT.
^IF THE CURRENT CALL TO THIS ROUTINE ALSO GENERATES THE LOWER SCALE
NUMBERS, THEN THE ZERO COLUMN WILL BE IDENTIFIED BY A SCALE NUMBER
HAVING THE VALUE ZERO.
.INDENT -3
8##THE ZERO COLUMN IS TO BE REPRESENTED BY THE PLUS SIGN. ^IF THE
CURRENT CALL TO THIS ROUTINE ALSO GENERATES THE LOWER SCALE NUMBERS,
THEN THE ZERO COLUMN WILL BE IDENTIFIED BY A SCALE NUMBER HAVING THE
VALUE ZERO.
.SKIP
.FILL
.LEFT MARGIN 9
^THE FOLLOWING EXAMPLES DEMONSTRATE THE RESULTS PRODUCED BY THE
VARIOUS VALUES OF THE TENS DIGIT.
.SKIP
.NOFILL
.TEST PAGE 17
TENS DIGIT = 0
.SKIP
         +-+--+-+
         ! !  ! !
        -4-2  2 4
.SKIP
TENS DIGIT = 1          2          3          4
.SKIP
         +-+- -+-+  +-+---+-+  +-+-!-+-+  +-+-+-+-+
         ! !   ! !  ! !   ! !  ! !   ! !  ! !   ! !
        -4-2   2 4 -4-2   2 4 -4-2   2 4 -4-2   2 4
.SKIP
TENS DIGIT = 5          6          7          8
.SKIP
         +-+- -+-+  +-+---+-+  +-+-!-+-+  +-+-+-+-+
         ! ! ! ! !  ! ! ! ! !  ! ! ! ! !  ! ! ! ! !
        -4-2 0 2 4 -4-2 0 2 4 -4-2 0 2 4 -4-2 0 2 4
.FILL
.SKIP
.INDENT -2
^^HUNDREDS#DIGIT
.SKIP
\\SELECTS THE TYPE OF CAPTION, EITHER NUMERIC OR ALPHABETIC, TO BE
SHOWN TO THE LEFT OF THE CURRENTLY GENERATED PANEL OF THE BAR CHART.
.LEFT MARGIN 14
.SKIP
.INDENT -3
0##THE LEFT MARGIN IS TO CONTAIN SPACES.
.INDENT -3
1##THE REPRESENTATION OF THE VALUE INPUT AS THE ARGUMENT NAMED
^^YVALUE \\IS TO BE RIGHT JUSTIFIED IN THE MARGIN TO THE LEFT OF THE
LEFT BORDER OF THE BAR CHART.
.INDENT -3
2##THE CHARACTERS INPUT IN ^^LABEL(MINLBL) \\THROUGH AND INCLUDING
^^LABEL(MAXLBL) \\ARE TO BE RIGHT JUSTIFIED IN THE MARGIN TO THE
LEFT OF THE LEFT BORDER OF THE BAR CHART.
.INDENT -3
3##A SPACE CHARACTER IS TO BE PLACED INTO THE COLUMN TO THE
IMMEDIATE LEFT OF THE LEFT BORDER OF THE BAR CHART, AND THE
REPRESENTATION OF THE VALUE INPUT AS THE ARGUMENT NAMED ^^YVALUE
\\IS TO BE RIGHT JUSTIFIED IN THE REMAINING PORTION OF THE LEFT
MARGIN.
.INDENT -3
4##A SPACE CHARACTER IS TO BE PLACED INTO THE COLUMN TO THE
IMMEDIATE LEFT OF THE LEFT BORDER OF THE BAR CHART, AND THE
CHARACTERS INPUT IN ^^LABEL(MINLBL) \\THROUGH AND INCLUDING
^^LABEL(MAXLBL) \\ARE TO BE RIGHT JUSTIFIED IN THE REMAINING PORTION
OF THE LEFT MARGIN.
.INDENT -3
5##A MINUS SIGN IS TO BE PLACED INTO THE COLUMN TO THE IMMEDIATE
LEFT OF THE LEFT BORDER OF THE BAR CHART, AND THE REPRESENTATION OF
THE VALUE INPUT AS THE ARGUMENT NAMED ^^YVALUE \\IS TO BE RIGHT
JUSTIFIED IN THE REMAINING PORTION OF THE LEFT MARGIN.
.INDENT -3
6##A MINUS SIGN IS TO BE PLACED INTO THE COLUMN TO THE IMMEDIATE
LEFT OF THE LEFT BORDER OF THE BAR CHART, AND THE CHARACTERS INPUT
IN ^^LABEL(MINLBL) \\THROUGH AND INCLUDING ^^LABEL(MAXLBL) \\ARE TO
BE RIGHT JUSTIFIED IN THE REMAINING PORTION OF THE LEFT MARGIN.
.SKIP
.LEFT MARGIN 9
^THE FOLLOWING EXAMPLES DEMONSTRATE THE RESULTS PRODUCED BY THE
VARIOUS VALUES OF THE HUNDREDS DIGIT.
.SKIP
.NOFILL
.TEST PAGE 9
HUNDREDS DIGIT = 0          +----+---- ----+----+
               = 1     12.34+----+---- ----+----+
               = 2     ^^LABEL+----+---- ----+----+
               = 3    12.34 +----+---- ----+----+
               = 4    LABEL +----+---- ----+----+
               = 5    12.34-+----+---- ----+----+
               = 6    LABEL-+----+---- ----+----+
        \\TICK MARKS          !    !         !    !
     SCALE NUMBERS         -10  -5         5   10
.FILL
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KNDBAR#=#\\SPECIFIES WHICH BAR SEGMENT IS TO BE REPRESENTED IF
MORE THAN ONE BAR SEGMENT APPEARS IN A SINGLE COLUMN OF THE PLOT,
AND WHICH COLUMNS ARE TO REPRESENT ANY BAR SEGMENT WHICH EXTENDS
ACROSS MORE THAN A SINGLE COLUMN.
.INDENT -2
=#-1, NO BAR SEGMENTS ARE TO BE PLOTTED IN THE CURRENT PANEL. ^THE
RESULTING PANEL IS IDENTICAL TO THAT WHICH WOULD BE PRODUCED IF
^^MINSEG \\IS SET GREATER THAN ^^MAXSEG.
.INDENT -2
=#0, \\EACH BAR SEGMENT IS TO BE REPRESENTED ONLY IN THE FINAL
COLUMN (THAT FURTHEST FROM THE ZERO COLUMN) IN WHICH IT IS THE
LARGEST COMPONENT. ^SPACES ARE INSERTED INTO ANY OTHER COLUMNS IN
WHICH THE BAR SEGMENT IS DOMINANT.
.INDENT -2
=#1, EACH BAR SEGMENT IS TO BE REPRESENTED ONLY IN THE FINAL COLUMN
(THAT FURTHEST FROM THE ZERO COLUMN) IN WHICH IT IS THE LARGEST
COMPONENT. ^THE GRID CHARACTERS SELECTED BY THE ONES DIGIT OF THE
DECIMAL INTEGER VALUE OF ^^IGRID \\ARE INSERTED INTO ANY OTHER
COLUMNS IN WHICH THE BAR SEGMENT IS DOMINANT.
.INDENT -2
=#2, EACH BAR SEGMENT IS TO BE REPRESENTED IN ALL COLUMNS IN WHICH
IT IS THE LARGEST COMPONENT.
.INDENT -2
=#3, 4 OR 5, SAME AS ^^KIND=0, 1 \\OR 2 RESPECTIVELY, EXCEPT THAT
THE FINAL COLUMNS (THOSE FURTHEST TO THE LEFT AND TO THE RIGHT OF
THE ZERO COLUMN) WHICH CONTAIN THE FINAL NEGATIVE AND THE FINAL
POSITIVE VALUES SPECIFIED BY THE ^^SEGMNT \\ARRAY INSTEAD CONTAIN
THE GRID CHARACTERS SELECTED BY THE ONES DIGIT OF THE DECIMAL
INTEGER VALUE OF ^^IGRID \\IF THE LARGEST COMPONENTS WITHIN THESE
COLUMNS ARE SMALLER THAN THE SPACE REMAINING IN THESE COLUMNS.
.INDENT -2
=#6, EACH BAR SEGMENT IS TO BE REPRESENTED ONLY IN THE FINAL COLUMN
(THAT FURTHEST FROM THE ZERO COLUMN) IN WHICH THE BAR SEGMENT
APPEARS. ^IF TWO OR MORE BAR SEGMENTS TERMINATE IN THE SAME COLUMN,
THEN THE BAR SEGMENT SPECIFIED BY THE ^^SEGMNT \\ARRAY LOCATION
HAVING THE HIGHER SUBSCRIPT IS REPRESENTED, AND THE BAR SEGMENT
SPECIFIED BY THE THE ^^SEGMENT \\ARRAY LOCATION HAVING THE LOWER
SUBSCRIPT IS INSTEAD REPRESENTED IN THE ADJACENT COLUMN NEXT CLOSER
TO THE ZERO COLUMN IF THIS LOWER BAR SEGMENT IS THE ONLY BAR SEGMENT
WHICH APPEARS IN THIS ADJACENT COLUMN. ^SPACES ARE INSERTED INTO ANY
OTHER COLUMNS ACROSS WHICH A BAR SEGMENT EXTENDS.
.INDENT -2
=#7, EACH BAR SEGMENT IS TO BE REPRESENTED ONLY IN THE FINAL COLUMN
(THAT FURTHEST FROM THE ZERO COLUMN) IN WHICH THE BAR SEGMENT
APPEARS. ^IF TWO OR MORE BAR SEGMENTS TERMINATE IN THE SAME COLUMN,
THEN THE BAR SEGMENT SPECIFIED BY THE ^^SEGMNT \\ARRAY LOCATION
HAVING THE HIGHER SUBSCRIPT IS REPRESENTED, AND THE BAR SEGMENT
SPECIFIED BY THE THE ^^SEGMENT \\ARRAY LOCATION HAVING THE LOWER
SUBSCRIPT IS INSTEAD REPRESENTED IN THE ADJACENT COLUMN NEXT CLOSER
TO THE ZERO COLUMN IF THIS LOWER BAR SEGMENT IS THE ONLY BAR SEGMENT
WHICH APPEARS IN THIS ADJACENT COLUMN. ^THE GRID CHARACTERS SELECTED
BY THE ONES DIGIT OF THE DECIMAL INTEGER VALUE OF ^^IGRID \\ARE
INSERTED INTO ANY OTHER COLUMNS WHICH DO NOT CONTAIN THE TERMINATION
OF A BAR SEGMENT.
.INDENT -2
=#8, EACH BAR SEGMENT IS REPRESENTED IN THE FINAL COLUMN (THAT
FURTHEST FROM THE ZERO COLUMN) IN WHICH THE BAR SEGMENT APPEARS, AND
IN EACH COLUMN IN WHICH THE BAR SEGMENT IS THE ONLY COMPONENT.
.SKIP
.LEFT MARGIN 9
^AS A DEMONSTRATION OF THE PLOTTING MODIFICATIONS CAUSED BY THE
VARIOUS VALUES OF ^^KNDBAR, \\THE NUMBERS
.SKIP
.NOFILL
 .3  .4  .2  3.5  .1  .3  3.5  .2  .1  3.5  .3  .2
.SKIP
AND
.SKIP
-.3 -.4 -.2 -3.5 -.1 -.3 -3.5 -.2 -.1 -3.5 -.3 -.2
.FILL
.SKIP
ARE PLOTTED BELOW REPRESENTED BY THE LETTERS ^A THROUGH ^X
RESPECTIVELY WITH ^^LNGLFT=LNGRIT=15, XLEFT=-15 \\AND ^^XRIGHT=15
\\FOR ALL POSSIBLE VALUES OF ^^KNDBAR
.SKIP
.NOFILL
.TEST PAGE 12
   KNDBAR =-1   +----+----+----+----+----+----+
          = 0   +-WV   S  P   N+B   D  G   JK-+
          = 1   +-WV-+-S--P---N+B---D--G-+-JK-+
          = 2   +-WVVVVSSSPPPPN+BDDDDGGGJJJJK-+
          = 3   +--V   S  P   N+B   D  G   J--+
          = 4   +--V-+-S--P---N+B---D--G-+-J--+
          = 5   +--VVVVSSSPPPPN+BDDDDGGGJJJJ--+
          = 6   +-XV  US  RP  O+C  DF  GI  JL-+
          = 7   +-XV-+US--RP--O+C--DF--GI+-JL-+
          = 8   +-XVVVUSSSRPPPO+CDDDFGGGIJJJL-+
   \\TICK MARKS   !    !    !    !    !    !    !
SCALE NUMBERS  -15  -10  -5    0    5   10   15
.SKIP
.FILL
^THE LETTERS WHICH APPEAR IN COLUMNS 1, 5, 9 AND 13 WHEN ^^KNDBAR
\\IS LESS THAN OR EQUAL TO 5 ARE DIFFERENT THAN WHOSE WHICH APPEAR
WHEN ^^KNDBAR \\IS GREATER THAN OR EQUAL TO 6. ^THE CORRESPONDENCE
OF THE LETTERS TO THE COLUMNS IS SHOWN IN THE CHART BELOW.
.SKIP
.NOFILL
.TEST PAGE 11
                 COLUMNS                   COLUMNS
    COLUMN 1    ! 2 - 4 !     COLUMN 5    ! 6 - 8 !
                !       !                 !       !
_.3^^A .4B .2C .1D !  3.D  ! .4D .1E .3F .2G !  3.G  !
.SKIP
                 \\COLUMNS
    COLUMN 9    !10 - 12!     COLUMN 13
                !       !
_.3^^G .2H .1I .4J !  3.J  ! .1J .3K .2L \\AND .4 SPACE
.FILL
.SKIP
^FOR EXAMPLE, WHEN ^^KNDBAR \\IS LESS THAN OR EQUAL TO 5, COLUMN 5
CONTAINS THE LETTER ^D WHICH REPRESENTS THE LARGEST COMPONENT IN
COLUMN 5. ^WHEN ^^KNDBAR \\IS GREATER THAN OR EQUAL TO 6, COLUMN 5
INSTEAD CONTAINS THE LETTER ^F WHICH REPRESENTS THE HIGHEST
SUBSCRIPTED COMPONENT WHICH TERMINATES IN THIS COLUMN, AND, SINCE
THE COMPONENT REPRESENTED BY THE LETTER ^F DOES NOT APPEAR IN COLUMN
4, THE LETTER ^D IS FORCED TO APPEAR IN COLUMN 4.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LSTLIN#=#-1, \\ONLY TICK MARKS AND LOWER SCALE NUMBERS ARE TO BE
GENERATED, BUT A PANEL OF THE BAR CHART WILL NOT BE GENERATED. ^THIS
OPTION MIGHT BE USED TO ADD TICK MARKS AND SCALE NUMBERS TO A BAR
CHART AFTER IT HAS BEEN COMPLETED IF IT IS NOT POSSIBLE TO DETERMINE
WHETHER A PARTICULAR PANEL WILL TERMINATE THE BAR CHART BEFORE THE
PANEL IS TO BE GENERATED.
.INDENT -2
=#0, THE CURRENT PANEL FINISHES THE BAR CHART. ^SCALE NUMBERS
RANGING IN VALUE FROM THAT OF ^^XLEFT (\I\F LNGLFT \\IS GREATER THAN
ZERO) THROUGH THAT OF ^^XRIGHT (\I\F LNGRIT \\IS GREATER THAN ZERO)
ARE TO BE WRITTEN BELOW THE CURRENT PANEL OF THE BAR CHART.
.INDENT -2
=#GREATER THAN ZERO, THE CURRENT PANEL DOES NOT FINISH THE BAR
CHART. ^SCALE NUMBERS ARE NOT TO BE WRITTEN BELOW THE CURRENT PANEL
OF THE BAR CHART. ^SUBSEQUENT CALLS TO ^^DALINE \\WILL ADD
ADDITIONAL PANELS TO THE BAR CHART. ^THE VALUE OF ^^LSTLIN \I\S
\\IGNORED OTHER THAN TO DETERMINE WHETHER IT IS GREATER THAN ZERO.
^IF THE MAIN PROGRAM KNOWS THE TOTAL NUMBER OF TIME PERIODS, IT CAN
COUNT ^^LSTLIN \\DOWN TO ZERO. ^IF THE MAIN PROGRAM DOES NOT KNOW
THE TOTAL NUMBER OF TIME PERIODS, IT IS SUFFICIENT TO SET ^^LSTLIN
\\TO 1 UNTIL THE FINAL PANEL.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^MARGIN#=#\\NUMBER OF CHARACTERS WHICH MUST APPEAR IN THE OUTPUT
BETWEEN THE CARRIAGE CONTROL CHARACTER IN COLUMN 1 AND THE LEFT EDGE
OF THE CURRENT PANEL OF THE BAR CHART. ^THE WIDTH OF THIS MARGIN
MUST BE THE SAME FOR ALL PANELS FORMING THE BAR CHART. ^THE MARGIN
MUST INCLUDE SUFFICIENT ROOM FOR THE LEFT SCALE NUMBER OR FOR THE
LEFT ALPHAMERIC LABEL REQUESTED BY A NONZERO VALUE OF THE HUNDREDS
DIGIT OF THE DECIMAL INTEGER VALUE OF ^^IGRID, \\AND FOR THE EXTRA
SPACE OR FOR THE EXTRA MINUS SIGN IF THE HUNDREDS DIGIT OF ^^IGRID
\\IS GREATER THAN OR EQUAL TO 3. ^IF SCALE NUMBERS ARE TO BE WRITTEN
BELOW THE BAR CHART, AND IF ^^LNGLFT \\IS GREATER THAN ZERO, THEN
^^MARGIN \\SHOULD HAVE A VALUE OF AT LEAST 5 (OR OF AT LEAST HALF OF
^^MSHLFT \I\F MSHLFT \\IS LESS THAN 10) TO ALLOW A NUMBER TO BE
CENTERED BELOW THE LEFT BORDER LINE. ^IF ^^LNGLFT \\IS NOT GREATER
THAN ZERO, THEN ROOM DOES NOT NEED TO BE ALLOWED IN THE LEFT MARGIN
FOR THE LOWER SCALE NUMBERS.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^MSHLFT#=#\\WIDTH OF THE GRID DIVISIONS INDICATED EITHER BY
EXCLAMATION POINTS OR PLUS SIGNS IN THE PORTION OF THE BAR CHART TO
THE LEFT OF THE ZERO COLUMN. ^IF ^^MSHLFT \\IS EQUAL TO ZERO, THEN A
GRID DIVISION WIDTH OF 10 IS ASSUMED. ^^MSHLFT \\IS EQUAL TO ONE
MORE THAN THE NUMBER OF COLUMNS OF CHARACTERS APPEARING BETWEEN THE
EXCLAMATION POINTS OR PLUS SIGNS. ^IF ^^LSTLIN \\IS LESS THAN OR
EQUAL TO ZERO, THEN SCALE NUMBERS ARE WRITTEN BELOW THE BAR CHART
EVERY ^^MSHLFT \\COLUMNS TO THE LEFT OF THE ZERO COLUMN.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^MSHRIT#=#\\WIDTH OF THE GRID DIVISIONS INDICATED EITHER BY
EXCLAMATION POINTS OR PLUS SIGNS IN THE PORTION OF THE BAR CHART TO
THE RIGHT OF THE ZERO COLUMN. ^IF ^^MSHRIT \\IS EQUAL TO ZERO, THEN
A GRID DIVISION WIDTH OF 10 IS ASSUMED. ^^MSHRIT \\IS EQUAL TO ONE
MORE THAN THE NUMBER OF COLUMNS OF CHARACTERS APPEARING BETWEEN THE
EXCLAMATION POINTS OR PLUS SIGNS. ^IF ^^LSTLIN \\IS LESS THAN OR
EQUAL TO ZERO, THEN SCALE NUMBERS ARE WRITTEN BELOW THE BAR CHART
EVERY ^^MSHRIT \\COLUMNS TO THE RIGHT OF THE ZERO COLUMN.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LNGLFT#=#0, \\THE BAR CHART IS NOT TO INCLUDE ANY COLUMNS TO THE
LEFT OF THE ZERO COLUMN. ^THIS DOES NOT CHANGE THE WIDTH OF THE LEFT
MARGIN SPECIFIED BY THE VALUE OF ^^MARGIN. T\\HE VALUE OF ^^XLEFT
\\IS IGNORED.
.INDENT -2
=#GREATER THAN ZERO, ^^LNGLFT \\IS THE NUMBER OF COLUMNS OF
CHARACTERS TO BE INCLUDED IN THE BAR CHART TO THE LEFT OF THE ZERO
COLUMN. ^THE PORTION OF THE BAR CHART TO THE LEFT OF THE ZERO COLUMN
WILL REPRESENT NEGATIVE SEGMENTS IF ^^XLEFT \\IS LESS THAN ZERO, OR
POSITIVE SEGMENTS IF ^^XLEFT \\IS GREATER THAN ZERO. ^THE LEFT
BORDER OF THE BAR CHART WILL REPRESENT AN ACCUMULATED BAR LENGTH
EQUAL TO THE VALUE OF ^^XLEFT. I\\F REQUESTED BY THE ONES DIGIT OF
THE DECIMAL INTEGER VALUE OF ^^IGRID, \\A VERTICAL GRID LINE WILL BE
INDICATED EVERY ^^MSHLFT \\COLUMNS TO THE LEFT OF THE ZERO COLUMN.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LNGRIT#=#0, \\THE BAR CHART IS NOT TO INCLUDE ANY COLUMNS TO THE
RIGHT OF THE ZERO COLUMN. ^THE VALUE OF ^^XRIGHT \\IS IGNORED.
.INDENT -2
=#GREATER THAN ZERO, ^^LNGRIT \\IS THE NUMBER OF COLUMNS OF
CHARACTERS TO BE INCLUDED IN THE BAR CHART TO THE RIGHT OF THE ZERO
COLUMN. ^THE PORTION OF THE BAR CHART TO THE RIGHT OF THE ZERO
COLUMN WILL REPRESENT NEGATIVE SEGMENTS IF ^^XRIGHT \\IS LESS THAN
ZERO, OR POSITIVE SEGMENTS IF ^^XRIGHT \\IS GREATER THAN ZERO. ^THE
RIGHT BORDER OF THE BAR CHART WILL REPRESENT AN ACCUMULATED BAR
LENGTH EQUAL TO THE VALUE OF ^^XRIGHT. I\\F REQUESTED BY THE ONES
DIGIT OF THE DECIMAL INTEGER VALUE OF ^^IGRID, \\A VERTICAL GRID
LINE WILL BE INDICATED EVERY ^^MSHRIT \\COLUMNS TO THE RIGHT OF THE
ZERO COLUMN.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^XLEFT##=#\\THE ACCUMULATED TOTAL OF ^^SEGMNT \\VALUES HAVING THE
SAME SIGN AS ^^XLEFT \\WHICH IS TO BE REPRESENTED BY THE LEFT BORDER
OF THE PORTION OF THE BAR CHART TO THE LEFT OF THE ZERO COLUMN IF
^^LNGLFT \\IS GREATER THAN ZERO. ^IF ^^XLEFT \\IS NEGATIVE, THEN
ONLY NEGATIVE VALUES ARE REPRESENTED TO THE LEFT OF THE ZERO COLUMN.
^^IF XLEFT \\IS POSITIVE, THEN ONLY POSITIVE VALUES ARE REPRESENTED
TO THE LEFT OF THE ZERO COLUMN. ^THE MAGNITUDE OF ^^XLEFT \\SHOULD
DEPEND UPON THE MAGNITUDES OF THE VALUES IN THE ^^SEGMNT \\ARRAY.
^IF ^^XLEFT \\HAS A VALUE EQUAL TO -100 TIMES THE NUMBER OF COLUMNS
SPECIFIED BY ^^LNGLFT, \\THEN THE FIRST COLUMN TO THE LEFT OF THE
ZERO COLUMN WOULD REPRESENT AN ACCUMULATED TOTAL IN THE RANGE -100
TO 0, THE SECOND COLUMN TO THE LEFT OF THE ZERO COLUMN WOULD
REPRESENT AN ACCUMULATED TOTAL IN THE RANGE -200 TO -100 AND SO ON.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^XRIGHT#=#\\THE ACCUMULATED TOTAL OF ^^SEGMNT \\VALUES HAVING THE
SAME SIGN AS ^^XRIGHT \\WHICH IS TO BE REPRESENTED BY THE RIGHT
BORDER OF THE PORTION OF THE BAR CHART TO THE RIGHT OF THE ZERO
COLUMN IF ^^LNGRIT \\IS GREATER THAN ZERO. ^IF ^^XRIGHT \I\S
\\NEGATIVE, THEN ONLY NEGATIVE VALUES ARE REPRESENTED TO THE RIGHT
OF THE ZERO COLUMN. ^^IF XRIGHT \\IS POSITIVE, THEN ONLY POSITIVE
VALUES ARE REPRESENTED TO THE RIGHT OF THE ZERO COLUMN. ^THE
MAGNITUDE OF ^^XRIGHT \\SHOULD DEPEND UPON THE MAGNITUDES OF THE
VALUES IN THE ^^SEGMNT \\ARRAY. ^IF ^^XRIGHT \\HAS A VALUE EQUAL TO
100 TIMES THE NUMBER OF COLUMNS SPECIFIED BY ^^LNGRIT, \\THEN THE
FIRST COLUMN TO THE RIGHT OF THE ZERO COLUMN WOULD REPRESENT AN
ACCUMULATED TOTAL GREATER THAN ZERO BUT NOT GREATER THAN 100, THE
SECOND COLUMN TO THE RIGHT OF THE ZERO COLUMN WOULD REPRESENT AN
ACCUMULATED TOTAL GREATER THAN 100 BUT NOT GREATER THAN 200 AND SO ON.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^SEGMNT#=#\\ARRAY CONTAINING IN THE ARRAY LOCATIONS
^^SEGMNT(MINSEG) \\THROUGH AND INCLUDING ^^SEGMNT(MAXSEG) \\THE
LENGTHS OF THE BAR SEGMENTS SPECIFIED IN THE SAME COORDINATE SYSTEMS
AS USED FOR THE DEFINITIONS OF ^^XLEFT \\AND ^^XRIGHT. Z\\ERO VALUES
IN THE ^^SEGMNT \\ARRAY ARE IGNORED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^MINSEG#=#\\SUBSCRIPT OF THE FIRST LOCATION IN THE ^^SEGMNT \\ARRAY
WHICH CAN SPECIFY THE LENGTH OF A BAR SEGMENT. ^IF ^^MINSEG \I\S
\\GREATER THAN ^^MAXSEG, \\THEN NO BAR SEGMENTS WILL BE REPRESENTED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^MAXSEG#=#\\SUBSCRIPT OF THE FINAL LOCATION IN THE ^^SEGMNT \\ARRAY
WHICH CAN SPECIFY THE LENGTH OF A BAR SEGMENT.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LETTER#=#\\ARRAY CONTAINING IN THE ARRAY LOCATIONS
^^LETTER(MINLTR) \\THROUGH AND INCLUDING ^^LETTER(MAXLTR) \\THE
CHARACTERS BY WHICH THE BAR SEGMENTS ARE TO BE REPRESENTED, ONE
CHARACTER PER ^^LETTER \\ARRAY LOCATION AS THOUGH READ BY A MULTIPLE
OF AN ^A1 FORMAT OR DEFINED BY SEVERAL 1^H FIELDS IN A ^^DATA
\\STATEMENT. ^THE SEGMENT HAVING ITS LENGTH SPECIFIED BY
^^SEGMNT(MINSEG) \\WILL BE REPRESENTED BY THE CHARACTER FOUND IN
^^LETTER(MINLTR), \\THAT HAVING ITS LENGTH IN ^^SEGMNT(MINSEG+1)
\\BY THE CHARACTER IN ^^LETTER(MINLTR+1), \\AND SO ON. ^IF
^^MAXLTR-MINLTR \\IS LESS THAN ^^MAXSEG-MINSEG, \\THEN THE
ASSIGNMENT OF CHARACTERS RECYCLES THROUGH THE ^^LETTER \\ARRAY AS
MANY TIMES AS ARE NECESSARY TO REPRESENT ALL OF THE BAR SEGMENTS SO
THAT THE SEGMENT HAVING ITS LENGTH SPECIFIED BY
^^SEGMNT(MINSEG+MAXLTR-MINLTR+1) \\IS REPRESENTED BY THE CHARACTER
IN ^^LETTER(MINLTR), \\THAT HAVING ITS LENGTH IN
^^SEGMNT(MINSEG+MAXLTR-MINLTR+2) \\BY THE CHARACTER IN
^^LETTER(MINLTR+1), \\AND SO ON.
.SKIP
.INDENT -9
^^MINLTR#=#\\SUBSCRIPT OF THE ^^LETTER \\ARRAY LOCATION WHICH
SPECIFIES THE CHARACTER TO BE USED FOR THE REPRESENTATION OF THE BAR
SEGMENT HAVING ITS LENGTH IN ^^SEGMNT(MINSEG).
.SKIP
.INDENT -9
MAXLTR#=#\\SUBSCRIPT OF THE ^^LETTER \\ARRAY LOCATION WHICH
SPECIFIES THE CHARACTER TO BE USED FOR THE REPRESENTATION OF THE BAR
SEGMENT HAVING ITS LENGTH IN ^^SEGMNT(MINSEG+MAXLTR-MINLTR).
.SKIP
.INDENT -9
YVALUE#=#\\NUMBER TO BE PLACED TO THE LEFT OF THE BAR CHART IF THE
HUNDREDS DIGIT OF THE DECIMAL INTEGER VALUE OF ^^IGRID \\HAS THE
VALUE 1, 3 OR 5.
.SKIP
.INDENT -9
^^LABEL##=#\\ARRAY CONTAINING IN THE ARRAY LOCATIONS ^^LABEL(MINLBL)
\\THROUGH AND INCLUDING ^^LABEL(MAXLBL) \\THE CHARACTERS TO BE SHOWN
TO THE LEFT OF THE BAR CHART IF THE HUNDREDS DIGIT OF THE DECIMAL
INTEGER VALUE OF ^^IGRID \\HAS THE VALUE 2, 4 OR 6. ^THE CHARACTERS
IN THE ^^LABEL \\ARRAY ARE STORED ONE CHARACTER PER ARRAY LOCATION
AS THOUGH READ BY A MULTIPLE OF AN ^A1 FORMAT OR DEFINED BY SEVERAL
1^H FIELDS IN A ^^DATA \\STATEMENT. ^IF MORE CHARACTERS ARE
SPECIFIED IN THE ^^LABEL \\ARRAY THAN CAN BE SHOWN IN THE LEFT
MARGIN, THEN THE RIGHTMOST EXCESS CHARACTERS ARE NOT SHOWN.
.SKIP
.INDENT -9
^^MINLBL#=#\\SUBSCRIPT OF THE ^^LABEL \\ARRAY LOCATION CONTAINING
THE LEFTMOST CHARACTER TO BE SHOWN TO THE LEFT OF THE BAR CHART IF
THE HUNDREDS DIGIT OF THE DECIMAL INTEGER VALUE OF ^^IGRID \\HAS THE
VALUE 2, 4 OR 6.
.SKIP
.INDENT -9
^^MAXLBL#=#\\SUBSCRIPT OF THE ^^LABEL \\ARRAY LOCATION CONTAINING
THE RIGHTMOST CHARACTER TO BE SHOWN TO THE LEFT OF THE BAR CHART IF
THE HUNDREDS DIGIT OF THE DECIMAL INTEGER VALUE OF ^^IGRID \\HAS THE
VALUE 2, 4 OR 6.
.SKIP
.INDENT -9
^^LINPRT#=#-1, \\DO NOT INCLUDE A CARRIAGE CONTROL CHARACTER TO THE
LEFT OF EACH LINE OF THE PLOT. ^SINCE THE MINUS SIGN OF A NEGATIVE
SCALE NUMBER OR THE LEFT CHARACTER OF A LABEL CAN THEN APPEAR IN
COLUMN 1, THE RESULTING OUTPUT MUST NOT BE TREATED AS THOUGH THE
LEFT COLUMN CONTAINS CARRIAGE CONTROL CHARACTERS.
.INDENT -2
=#0, THE PLOT WILL BE VIEWED BY THE USER ON A TERMINAL, EITHER TYPED
DIRECTLY WITH ^^IDISK \\BEING GIVEN THE TERMINAL UNIT NUMBER, OR
TYPED BY THE USER AFTER THIS ROUTINE HAS WRITTEN THE PLOT INTO A
FILE ON THE UNIT THE NUMBER OF WHICH IS CONTAINED IN ^^IDISK. A
\\BLANK OR SPACE WILL BE USED AS CARRIAGE CONTROL CHARACTER TO GIVE
SINGLE SPACING.
.INDENT -2
=#1, THE PLOT WILL BE PRINTED ON THE LINE PRINTER BY THE USER AFTER
THE PROGRAM HAS WRITTEN THE PLOT INTO A FILE. ^AN ASTERISK WILL BE
USED AS CARRIAGE CONTROL CHARACTER TO GIVE SINGLE SPACING WITH
SUPPRESSION OF SKIPPING EXTRA LINES AT THE PAGE BOUNDARIES. ^ON THE
^^PDP-10, \\AN ASTERISK AS THE CARRIAGE CONTROL CHARACTER GIVES
OVERPRINTING ON THE TERMINAL AS OPPOSED TO SINGLE SPACING.
.SKIP
.INDENT -9
^^IDISK##=#\\THE UNIT NUMBER OF THE DEVICE ONTO WHICH THE PLOTS ARE
TO BE WRITTEN. ^THIS ROUTINE WILL ONLY GENERATE THE PLOT. ^IT IS THE
RESPONSIBILITY OF THE CALLING PROGRAM TO OPEN THE OUTPUT FILE AND TO
WRITE THE CAPTIONS, THE FORM FEEDS AND/OR THE SEPARATING LINES.
.PAGE
.LEFT MARGIN 0
.NOFILL
.CENTER
^EXAMPLES OF ^GRID ^RULINGS ^SELECTED BY ^VARIOUS ^^IGRID V\\ALUES
.CENTER
-------- -- ---- ------- -------- -- ------- ----- ------
.SKIP
.FILL
^IN EACH ILLUSTRATION, A POSITIVE SEGMENT IS REPRESENTED BY THE
CHARACTER ^P AND A NEGATIVE SEGMENT BY THE CHARACTER ^N.
.NOFILL
.SKIP
^^IGRID=500         501         502         503         504
.SKIP
 1-   NP     1----NP---  1-!  NP  !  1-!--NP--!  1-+  NP  +
   ! !  ! !    ! !  ! !    ! !  ! !    ! !  ! !    ! !  ! !
  -4-2  2 4   -4-2  2 4   -4-2  2 4   -4-2  2 4   -4-2  2 4
.SKIP
IGRID=505         506         507         508         509
.SKIP
 1-+--NP--+  1-! !NP! !  1-!-!NP!-!  1-+ +NP+ +  1-+-+NP+-+
   ! !  ! !    ! !  ! !    ! !  ! !    ! !  ! !    ! !  ! !
  -4-2  2 4   -4-2  2 4   -4-2  2 4   -4-2  2 4   -4-2  2 4
.SKIP
IGRID=510         511         512         513         514
.SKIP
 1-   N P    1----N P--- 1-!  N P  ! 1-!--N P--! 1-+  N P  +
   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !
  -4-2   2 4  -4-2   2 4  -4-2   2 4  -4-2   2 4  -4-2   2 4
.SKIP
IGRID=515         516         517         518         519
.SKIP
 1-+--N P--+ 1-! !N P! ! 1-!-!N P!-! 1-+ +N P+ + 1-+-+N P+-+
   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !
  -4-2   2 4  -4-2   2 4  -4-2   2 4  -4-2   2 4  -4-2   2 4
.SKIP
IGRID=540         541         542         543         544
.SKIP
 1-   N+P    1----N+P--- 1-!  N+P  ! 1-!--N+P--! 1-+  N+P  +
   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !
  -4-2   2 4  -4-2   2 4  -4-2   2 4  -4-2   2 4  -4-2   2 4
.SKIP
IGRID=545         546         547         548         549
.SKIP
 1-+--N+P--+ 1-! !N+P! ! 1-!-!N+P!-! 1-+ +N+P+ + 1-+-+N+P+-+
   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !
  -4-2   2 4  -4-2   2 4  -4-2   2 4  -4-2   2 4  -4-2   2 4
.SKIP
IGRID=580         581         582         583         584
.SKIP
 1-   N+P    1----N+P--- 1-!  N+P  ! 1-!--N+P--! 1-+  N+P  +
   ! ! ! ! !   ! ! ! ! !   ! ! ! ! !   ! ! ! ! !   ! ! ! ! !
  -4-2 0 2 4  -4-2 0 2 4  -4-2 0 2 4  -4-2 0 2 4  -4-2 0 2 4
.SKIP
IGRID=585         586         587         588         589
.SKIP
 1-+--N+P--+ 1-! !N+P! ! 1-!-!N+P!-! 1-+ +N+P+ + 1-+-+N+P+-+
   ! ! ! ! !   ! ! ! ! !   ! ! ! ! !   ! ! ! ! !   ! ! ! ! !
  -4-2 0 2 4  -4-2 0 2 4  -4-2 0 2 4  -4-2 0 2 4  -4-2 0 2 4
.PAGE
.FILL
.CENTER
A\N E\\XAMPLE OF THE ^USE OF ^^DALINE
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE FOLLOWING PROGRAM WAS USED TO GENERATE THE 3 PLOTS SHOWN ON
THE NEXT PAGE. ^THE MAJOR PORTION OF THE PROGRAM DEFINES THE VALUES
OF ^^IGRID \\AND ^^KNDBAR \\NEEDED FOR THE PRODUCTION IN THE FIRST
PLOT OF THE HOLLOW BARS SEPARATED BY BLANK LINES.
.SKIP
.NOFILL
      ^^DIMENSION SEGMNT(7),LETTER(7),VALUES(7,6),LABEL(1)
      DATA ((VALUES(I,J),I=1,7),J=1,6)/
     1-2.,-4.,-2., 3., 8., 2., 1.,
     2-2.,-3.,-3., 4., 7., 2., 3.,
     3-1.,-2.,-4., 9., 6., 2., 7.,
     4 0.,-2.,-1., 6., 5., 3., 5.,
     5 0.,-2.,-6., 5., 5., 4., 3.,
     6 0.,-2.,-8., 4., 9.,10., 5./
      DATA LETTER/1HA,1HB,1HC,1HD,1HE,1HF,1HG/
      DATA IDISK/1/
      LSTLIN=1
      DO 9 LINE=1,6
      YVALUE=LINE
      DO 1 I=1,7
    1 SEGMNT(I)=VALUES(I,LINE)
      DO 9 INNER=1,7
      GO TO(2,3,4,5,4,6,7),INNER
    2 IF(LINE.NE.1)GO TO 9
      KNDBAR=-1
      IGRID=49
      GO TO 8
    3 IF(LINE.NE.1)GO TO 9
      IGRID=36
      GO TO 8
    4 IGRID=36
      KNDBAR=2
      GO TO 8
    5 IGRID=549
      KNDBAR=0
      GO TO 8
    6 KNDBAR=-1
      IGRID=36
      GO TO 8
    7 IF(LINE.NE.6)GO TO 9
      LSTLIN=0
      IGRID=49
    8 CALL DALINE(IGRID,KNDBAR,LSTLIN,10,10,
     110,10,30,-10.,30.,SEGMNT,1,
     27,LETTER,1,7,YVALUE,LABEL,2,
     31,0,IDISK)
    9 CONTINUE
      DO 12 KNDBAR=1,2
      WRITE(IDISK,10)
   10 FORMAT(1X)
      DO 12 LINE=1,6
      DO 11 I=1,7
   11 SEGMNT(I)=VALUES(I,LINE)
   12 CALL DALINE(176,KNDBAR,6-LINE,10,10,
     110,10,30,-10.,30.,SEGMNT,1,
     27,LETTER,1,7,FLOAT(LINE),LABEL,2,
     31,0,IDISK)
      STOP
      END
           +---------+---------+---------+---------+
           !         !         !         !         !
           ! CCBBBBAA!DDDEEEEEEEEFFG     !         !
         1-+-C B   A +  D       E FG-----+---------+
           ! CCBBBBAA!DDDEEEEEEEEFFG     !         !
           !         !         !         !         !
           ! CCCBBBAA!DDDDEEEEEEEFFGGG   !         !
         2-+-C  B  A +   D      E F  G---+---------+
           ! CCCBBBAA!DDDDEEEEEEEFFGGG   !         !
           !         !         !         !         !
           !  CCCCBBA!DDDDDDDDDEEEEEEFFGGGGGGG     !
         3-+--C   B A+        D     E F      G-----+
           !  CCCCBBA!DDDDDDDDDEEEEEEFFGGGGGGG     !
           !         !         !         !         !
           !      CBB!DDDDDDEEEEEFFFGGGGG!         !
         4-+------CB +     D    E  F    G+---------+
           !      CBB!DDDDDDEEEEEFFFGGGGG!         !
           !         !         !         !         !
           ! CCCCCCBB!DDDDDEEEEEFFFFGGG  !         !
         5-+-C     B +    D    E   F  G--+---------+
           ! CCCCCCBB!DDDDDEEEEEFFFFGGG  !         !
           !         !         !         !         !
           CCCCCCCCBB!DDDDEEEEEEEEEFFFFFFFFFFGGGGG !
         6-C       B +   D        E         F    G-+
           CCCCCCCCBB!DDDDEEEEEEEEEFFFFFFFFFFGGGGG !
           !         !         !         !         !
           +---------+---------+---------+---------+
           !                   !         !         !
          -10                 10        20        30
.SKIP
          1! C B   A !  D      !E FG     !         !
          2! C  B  A !   D     !E F  G   !         !
          3!  C   B A!        D!    E F  !   G     !
          4!      CB !     D   !E  F    G!         !
          5! C     B !    D    E   F  G  !         !
          6C       B !   D     !  E      !  F    G !
           !         !         !         !         !
          -10        0        10        20        30
.SKIP
          1! CCBBBBAA!DDDEEEEEEEEFFG     !         !
          2! CCCBBBAA!DDDDEEEEEEEFFGGG   !         !
          3!  CCCCBBA!DDDDDDDDDEEEEEEFFGGGGGGG     !
          4!      CBB!DDDDDDEEEEEFFFGGGGG!         !
          5! CCCCCCBB!DDDDDEEEEEFFFFGGG  !         !
          6CCCCCCCCBB!DDDDEEEEEEEEEFFFFFFFFFFGGGGG !
           !         !         !         !         !
          -10        0        10        20        30
.SUBTITLE ^^DALIST, R\\OUTINE TO ^LIST ^DICTIONARY ^CONSTRUCTED BY ^^DALOAD
.PAGE
.LEFT MARGIN 0
.NOFILL
  DDDDD          AAA  LL        IIIIII    SSSSSS  TTTTTTTT
  DD   DD       AAAA  LL          II    SS           TT
  DD    DD     AA AA  LL          II    SS           TT
  DD    DD    AA  AA  LL          II      SSSS       TT
  DD    DD   AAAAAAA  LL          II          SS     TT
  DD   DD   AA    AA  LL          II          SS     TT
  DDDDD    AA     AA  LLLLLLLL  IIIIII  SSSSSS       TT
.FILL
.SKIP 3
.CENTER
DALIST, R\\OUTINE TO ^LIST ^DICTIONARY ^CONSTRUCTED BY ^^DALOAD
.CENTER
------##------- -- ---- ---------- ----------- -- ------
.SKIP
DALIST \\SUMMARIZES THE ARRAY NAMES AND SUBSCRIPT RANGES SPECIFIED
IN THE DICTIONARY CONSTRUCTED BY THE ^^DALOAD \\ROUTINE. ^^DALIST
\\IS USED ALONG WITH SEVERAL OTHER ROUTINES IN THE ^^FASP \\PACKAGE
FOR THE PURPOSE OF SPECIFYING BY NAME, EXAMINING AND MODIFYING THE
VALUES OF MULTIPLY SUBSCRIPTED ARRAYS EQUIVALENCED WITH OR OTHERWISE
LOADED INTO A SINGLY SUBSCRIPTED BUFFER. ^THE INTERACTION BETWEEN
THESE ROUTINES IS DESCRIBED AT THE START OF THE ^^DALOAD
\\DOCUMENTATION. ^THE SAMPLE PROGRAM AT THE END OF THE ^^DALOAD
\\DOCUMENTATION ILLUSTRATES THE USE OF MOST OF THESE ROUTINES.
.SKIP 3
.TEST PAGE 7
.CENTER
^THE ^^DALIST A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DALIST \I\S
.SKIP
.NOFILL
      SUBROUTINE DALIST(JTTY  ,LTRLOW,LTRUSD,LTRSTR,NUMLOW,
     1NUMUSD,NUMSTR,NAMMAX,NAME)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION LTRSTR(LTRUSD),NUMSTR(NUMUSD),NAME(NAMMAX)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT ONLY AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^JTTY###=#\\NUMBER OF THE UNIT ONTO WHICH THE DESCRIPTION OF THE
CONTENTS OF THE DICTIONARY IS TO BE WRITTEN. ^THIS COULD BE THE
NUMBER ASSOCIATED WITH A TERMINAL OR BE THE NUMBER OF THE UNIT TO
WHICH A FILE IS TO BE WRITTEN. ^IF THE NUMBER IS THAT OF THE UNIT TO
WHICH A FILE IS TO BE WRITTEN, THEN THE CALLING PROGRAM MUST OPEN
THE FILE BEFORE CALLING THIS ROUTINE, AND CLOSE IT, IF NECESSARY,
AFTERWARDS.
.SKIP
.INDENT -9
^^LTRLOW#=#\\LOWEST SUBSCRIPT OF THE LOCATIONS IN THE ^^LTRSTR
\\ARRAY CONTAINING THE CHARACTERS OF THE NAMES IN THE DICTIONARY AS
ORIGINALLY READ BY ^^DALOAD \\USING A MULTIPLE OF AN ^A1 FORMAT.
^^LTRSTR(LTRLOW) \\CONTAINS EITHER THE FIRST LETTER OF THE NAME OF
THE FIRST LOGICAL GROUP OF NAMES IN THE DICTIONARY OR ELSE (IF THE
FIRST GROUP ITSELF ISN'T NAMED) THE FIRST LETTER OF THE FIRST NAME
WITHIN THE FIRST LOGICAL GROUP IN THE DICTIONARY.
.SKIP
.INDENT -9
^^LTRUSD#=#\\HIGHEST SUBSCRIPT OF THE LOCATIONS IN THE ^^LTRSTR
\\ARRAY CONTAINING THE CHARACTERS OF THE NAMES IN THE DICTIONARY AS
ORIGINALLY READ BY ^^DALOAD \\USING A MULTIPLE OF AN ^A1 FORMAT.
^^LTRSTR(LTRUSD) \\CONTAINS THE LAST CHARACTER OF THE LAST NAME IN
THE DICTIONARY.
.SKIP
.INDENT -9
^^LTRSTR#=#\\ARRAY CONTAINING THE CHARACTERS FORMING THE NAMES IN
THE DICTIONARY, 1 CHARACTER PER ARRAY LOCATION AS ORIGINALLY READ BY
^^DALOAD \\USING A MULTIPLE OF AN ^A1 FORMAT.
.SKIP
.INDENT -9
^^NUMLOW#=#\\LOWEST SUBSCRIPT OF THE LOCATIONS IN THE ^^NUMSTR
\\ARRAY CONTAINING THE NUMERIC INFORMATION CORRESPONDING TO THE
NAMES STORED IN THE ^^LTRSTR \\ARRAY. ^^NUMSTR(NUMLOW) \\MUST
CONTAIN THE START OF THE DESCRIPTION OF A LOGICAL GROUP OF NAMES,
NOT THE START OF THE DESCRIPTION OF AN INDIVIDUAL NAME.
.SKIP
.INDENT -9
^^NUMUSD#=#\\HIGHEST SUBSCRIPT OF THE LOCATIONS IN THE ^^NUMSTR
\\ARRAY CONTAINING THE NUMERIC INFORMATION CORRESPONDING TO THE
NAMES STORED IN THE ^^LTRSTR \\ARRAY.
.SKIP
.INDENT -9
^^NUMSTR#=#\\ARRAY CONTAINING THE NUMERIC INFORMATION CORRESPONDING
TO THE NAMES STORED IN THE ^^LTRSTR \\ARRAY. ^THE CONSTRUCTION OF
THE ^^NUMSTR \\ARRAY IS DESCRIBED IN DETAIL IN THE ^^DALOAD
\\DOCUMENTATION. ^FOR EACH NAME IN THE DICTIONARY, THE ^^NUMSTR
\\ARRAY CONTAINS
.SKIP
.LEFT MARGIN 14
.INDENT -3
A.#THE NUMBER OF CHARACTERS IN THE NAME
.SKIP
.INDENT -3
B.#AN INDICATION OF THE ASSOCIATED DATA TYPE
.SKIP
.INDENT -3
C.#THE NUMBER OF SUBSCRIPT RANGES
.SKIP
.INDENT -3
D.#PAIRS OF STARTING AND ENDING VALUES OF THESE RANGES.
.SKIP
.LEFT MARGIN 9
^IF THE NUMBER OF CHARACTERS IS INSTEAD ZERO OR NEGATIVE, THEN ITS
ABSOLUTE VALUE IS THE NUMBER OF CHARACTERS IN THE NAME OF A LOGICAL
GROUP OF NAMES, AND THE NEXT LOCATION, RATHER THAN INDICATING THE
DATA TYPE, CONTAINS THE NUMBER OF LOCATIONS WITHIN A SINGLY
SUBSCRIPTED BUFFER WHICH WOULD BE NEEDED TO STORE THE VALUES OF THE
MULTIPLY SUBSCRIPTED ARRAYS WHICH ARE WITHIN THE LOGICAL GROUP AND
EQUIVALENCED WITH OR OTHERWISE LOADED INTO SUCH A SINGLY SUBSCRIPTED
BUFFER.
.SKIP
.INDENT -9
^^NAMMAX#=#\\HIGHEST SUBSCRIPT OF ANY LOCATION IN THE ^^NAME \\ARRAY
WHICH CAN BE USED BY THIS ROUTINE FOR THE TEMPORARY STORAGE OF
CHARACTERS WHICH ARE TO BE INCLUDED IN THE SUMMARY OF THE DICTIONARY
CONTENTS. ^^NAMMAX \\IS THE MAXIMUM WIDTH OF ANY LINE WHICH CAN BE
INCLUDED IN THE SUMMARY. ^THE CONTENTS OF ^^NAME(1) \\THROUGH
^^NAME(NAMMAX) \\WILL BE DESTROYED BY THIS ROUTINE.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED INTERNALLY BY THIS ROUTINE. ^ITS
ORIGINAL CONTENTS ARE DESTROYED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^NAME###=#\\ARRAY USED INTERNALLY BY THIS ROUTINE FOR THE
CONSTRUCTION OF THE LINES OF TEXT FORMING THE SUMMARY OF THE
CONTENTS OF THE DICTIONARY.
.SUBTITLE ^^DALOAD, R\\OUTINE TO ^MAKE ^DICTIONARY ^DESCRIBING ^NAMED ^ARRAYS
.PAGE
.LEFT MARGIN 0
.NOFILL
 ^^DDDDD          AAA  LL         OOOOO         AAA  DDDDD
 DD   DD       AAAA  LL        OO   OO       AAAA  DD   DD
 DD    DD     AA AA  LL       OO     OO     AA AA  DD    DD
 DD    DD    AA  AA  LL       OO     OO    AA  AA  DD    DD
 DD    DD   AAAAAAA  LL       OO     OO   AAAAAAA  DD    DD
 DD   DD   AA    AA  LL        OO   OO   AA    AA  DD   DD
 DDDDD    AA     AA  LLLLLLLL   OOOOO   AA     AA  DDDDD
.FILL
.SKIP 2
.CENTER
DALOAD, R\\OUTINE TO ^MAKE ^DICTIONARY ^DESCRIBING ^NAMED ^ARRAYS
.CENTER
------##------- -- ---- ---------- ---------- ----- ------
.SKIP
.FILL
^^DALOAD \\READS THE ^^DIMENSION, COMMON, INTEGER, REAL \\AND
^^IMPLICIT \\STATEMENTS WHICH COULD BE USED TO DECLARE SUBSCRIPTED
ARRAYS IN A ^^FORTRAN \\PROGRAM, AND FROM THE INFORMATION IN THESE
STATEMENTS CONSTRUCTS A DICTIONARY CONTAINING THE NAMES, DATA TYPES,
AND SUBSCRIPT LIMITS OF THE ARRAYS. ^THE CALLING PROGRAM MUST OPEN
THE INPUT FILE CONTAINING THE ^^FORTRAN \\STATEMENTS. ^^DALOAD \I\S
\\THEN CALLED TO READ THE STATEMENTS FROM THIS INPUT FILE, RETURNING
CONTROL ONLY AFTER AN ^^END \\STATEMENT OR AN END-OF-FILE IS READ OR
IF THE SPACE ALLOCATED FOR THE DICTIONARY FILLS BEFORE THE
DICTIONARY IS COMPLETE.
.SKIP
^THE DICTIONARY CONSTRUCTED BY ^^DALOAD \\CAN BE USED BY SEVERAL
OTHER ROUTINES IN THE ^^FASP \\PACKAGE FOR THE PURPOSE OF SPECIFYING
BY NAME, EXAMINING AND MODIFYING THE VALUES OF MULTIPLY SUBSCRIPTED
ARRAYS EQUIVALENCED WITH OR OTHERWISE LOADED INTO A SINGLY
SUBSCRIPTED BUFFER. ^THE SAMPLE PROGRAM AT THE END OF THE ^^DALOAD
\\DOCUMENTATION ILLUSTRATES THE USE OF MOST OF THESE ROUTINES. ^A
SUMMARY OF THE DICTIONARY CAN BE TYPED BY THE ^^DALIST \\ROUTINE.
^ARRAY NAMES TYPED BY THE USER AND READ BY THE CALLING PROGRAM INTO
AN INPUT BUFFER WITH A MULTIPLE OF AN ^A1 FORMAT CAN BE MATCHED
AGAINST ENTRIES IN THE DICTIONARY BY THE ^^DAPICK \\ROUTINE. ^THE
^^DASITE \\ROUTINE USES THE DICTIONARY AND THE SUBSCRIPTS TYPED BY
THE USER AS EVALUATED BY ^^DAPICK \\TO LOCATE THE DESIRED VALUE OF
THE MULTIPLY SUBSCRIPTED ARRAY WHICH IS BEING SIMULATED WITHIN THE
SINGLY SUBSCRIPTED BUFFER. ^THE ^^DALONE \\ROUTINE CONSTRUCTS IN A
THIRD BUFFER (THE FIRST TWO BEING THE BUFFER CONTAINING THE TEXT
TYPED BY THE USER AND THE BUFFER CONTAINING THE ARRAY VALUES BEING
MANIPULATED) THE NAME AND ALPHAMERIC REPRESENTATION OF THE CURRENT
SUBSCRIPTS EVEN IF THE USER HAS TYPED A RANGE OR RANGES THROUGH
WHICH THE SUBSCRIPTS ARE TO BE VARIED. ^THE ^^DAVARY \\ROUTINE
DISPLAYS THE NAME AND CURRENT SUBSCRIPTS AS REPRESENTED BY ^^DALONE,
\\DISPLAYS THE VALUE CONTAINED IN THE INDICATED LOCATION, AND
ACCEPTS A NEW VALUE FOR THE ARRAY LOCATION IF THE USER HAS TYPED THE
CHARACTER = TO THE RIGHT OF THE SUBSCRIPT RANGE. ^^DAVARY \\WILL ASK
THE USER TO SUPPLY A NEW VALUE IF HE DID NOT TYPE SUCH A VALUE TO
THE RIGHT OF THE = CHARACTER. ^EITHER OF THE ROUTINES ^^DAROLL \O\R
DALOOP \\ARE THEN USED TO ADVANCE THE SUBSCRIPTS THROUGH THE RANGES
TYPED BY THE USER, THE MAIN PROGRAM CALLING ^^DALONE, DASITE \\AND
^^DAVARY \\FOR EACH NEW SET OF SUBSCRIPTS UNTIL THE RANGES HAVE BEEN
COMPLETED.
.SKIP
^THE ^^FORTRAN \\STATEMENTS READ AS DATA BY ^^DALOAD \\ARE WRITTEN
EITHER IN CONVENTIONAL CARD FORMAT, OR WITH A LEADING TAB CHARACTER.
^IN CARD FORMAT, THE STATEMENT BEGINS IN OR CONTINUES WITH THE TEXT
STARTING IN COLUMN 7. ^IF THE CARD FORMAT IS CHOSEN, A SPACE OR ZERO
IN COLUMN 6 INDICATES THE START OF A NEW STATEMENT, WHILE ANY OTHER
PRINTING CHARACTER INDICATES THE CONTINUATION OF THE CURRENT
STATEMENT. ^IN TAB FORMAT, ANY PRINTING CHARACTER OTHER THAN THE
DIGITS 0 THROUGH 9 TO THE IMMEDIATE RIGHT OF THE INITIAL TAB
CHARACTER STARTS THE TEXT OF A NEW STATEMENT. ^IF THE CHARACTER
RIGHT OF THE TAB CHARACTER IS A ZERO, THEN THE STATEMENT STARTS WITH
THE CHARACTER TO THE RIGHT OF THE ZERO. ^A DIGIT OTHER THAN ZERO TO
THE IMMEDIATE RIGHT OF THE TAB CHARACTER INDICATES THAT THE TEXT TO
THE RIGHT OF THE DIGIT CONTINUES THE PREVIOUSLY BEGUN STATEMENT.
^THE LEFT 72 CHARACTERS, COUNTING THE TAB CHARACTER AS A SINGLE
CHARACTER, ARE USUALLY READ FROM EACH LINE OF THE INPUT FILE, BUT
THE CALLING PROGRAM CAN SPECIFY THAT SOME OTHER NUMBER OF CHARACTERS
IS TO BE READ.
.SKIP
^UNRECOGNIZABLE STATEMENTS AND LINES BEGINNING WITH THE LETTER ^C IN
COLUMN 1 ARE IGNORED. ^STATEMENTS RECOGNIZED BY ^^DALOAD \\CANNOT
BEGIN WITH STATEMENT NUMBERS. ^COMMAND WORDS SUCH AS ^^COMMON,
DIMENSION, IMPLICIT, REAL, INTEGER \\AND ^^END \\MUST NOT BE SPLIT
ACROSS A CONTINUATION. ^ARRAY NAMES AND THE PARENTHETICAL
EXPRESSIONS USED TO DEFINE SUBSCRIPT LIMITS AND THE LETTERS TO BE
ASSOCIATED WITH VARIOUS DATA TYPES CAN, HOWEVER, BE SPLIT ACROSS
CONTINUATIONS. ^SUCH ARRAY NAMES AND NUMBERS WILL BE HANDLED
CORRECTLY EVEN IF COMMENT LINES INDICATED BY THE LETTER ^C IN COLUMN
1 APPEAR BEFORE THE NAME OR NUMBER IS COMPLETED BY A SUBSEQUENT
CONTINUATION LINE. ^SPACES AND/OR TABS CAN APPEAR ANYWHERE WITHIN
STATEMENTS BUT ARE IGNORED.
.SKIP
^EACH ARRAY NAME IN THE DICTIONARY CONSTRUCTED BY ^^DALOAD \\HAS
STORED WITH IT A SPECIFICATION OF THE TYPE OF DATA WHICH THE ARRAY
IS EXPECTED TO CONTAIN. ^ARRAY NAMES APPEARING IN AN ^^INTEGER \O\R
REAL \\STATEMENT ARE ADDED TO THE DICTIONARY WITH THE SPECIFICATION
OF THEIR DATA TYPE MATCHING THAT INDICATED BY THE STATEMENT IN WHICH
THEY ARE DECLARED. ^AN ADDITIONAL STATEMENT ^^OCTAL \\CAN BE USED TO
DECLARE ARRAYS CONTAINING OCTAL INFORMATION. ^THE ARRAY NAMES
APPEARING ON THE ^^INTEGER, OCTAL \\AND ^^REAL \\STATEMENTS ARE
ADDED TO THE DICTIONARY IN THE ORDER IN WHICH THEY ARE FOUND. ^THE
ARRAY NAMES ARE NOT SEARCHED FOR WITHIN THE DICTIONARY BEFORE BEING
ADDED, SO IT IS NOT POSSIBLE TO DECLARE AN ARRAY IN A ^^DIMENSION
\O\R COMMON \\STATEMENT, THEN LATER CHANGE ITS TYPE.
.SKIP
^WITHIN A ^^COMMON \O\R DIMENSION \\STATEMENT, THE DATA TYPE TO BE
ASSOCIATED WITH THE NAME IS INDICATED BY THE FIRST CHARACTER OF THE
ARRAY NAME. ^THE DEFAULT ASSOCIATION OF THE LETTERS ^I THROUGH ^N
WITH INTEGER, AND ^A THROUGH ^H AND ^O THROUGH ^Z WITH REAL IS
RESTORED EACH TIME ^^DALOAD \\IS CALLED. ^THESE ASSOCIATIONS OF
CHARACTERS WITH DATA TYPES CAN, HOWEVER, BE CHANGED FOR THE DURATION
OF A PARTICULAR EXECUTION OF ^^DALOAD \\BY THE USE OF THE ^^IMPLICIT
\\STATEMENT. ^ALTHOUGH THERE IS NO DEFAULT ASSOCIATION OF THE OCTAL
DATA TYPE WITH ANY INITIAL LETTERS, THE WORDS ^^INTEGER, OCTAL \\AND
^^REAL \\ARE ALL ACCEPTED IN ^^IMPLICIT \\STATEMENTS AS DATA TYPE
NAMES.
.SKIP
^THE ^^IMPLICIT \\STATEMENT CONSISTS OF THE WORD ^^IMPLICIT
\\FOLLOWED BY A DATA TYPE NAME AND ENCLOSED IN PARENTHESES THE
LETTERS TO BE ASSOCIATED WITH THAT DATA TYPE. ^WITHIN THE
PARENTHESES, SINGLE LETTERS SEPARATED BY COMMAS INDICATE THAT THESE
LETTERS ARE TO BEGIN ARRAY NAMES ASSOCIATED WITH THE DATA TYPE. ^TWO
(OR MORE) LETTERS NOT SEPARATED BY COMMAS BUT THE FIRST BEING LOWER
IN THE ALPHABET THAN THE SECOND INDICATE THAT ALL LETTERS WITHIN THE
RANGE FROM THE FIRST THROUGH THE LAST ARE TO BEGIN ARRAY NAMES
ASSOCIATED WITH THE DATA TYPE. ^MINUS SIGNS CAN APPEAR BETWEEN THE
LETTERS INDICATING RANGES, BUT ARE NOT REQUIRED. ^IF A SECOND (OR
ADDITIONAL) PARENTHETICAL EXPRESSION FOLLOWS THE FIRST WITHOUT THE
DECLARATION OF ANOTHER DATA TYPE AND WITH NO PRINTING CHARACTER
OTHER THAN AN OPTIONAL COMMA BETWEEN THE PAIR OF EXPRESSIONS, THEN
THE SECOND PARENTHETICAL EXPRESSION WILL BE ASSUMED TO CONTINUE THE
DECLARATION OF THE LETTERS TO BE ASSOCIATED WITH THE SAME DATA TYPE.
^ANOTHER DATA TYPE NAME AND ITS ASSOCIATED PARENTHETICAL EXPRESSIONS
CAN FOLLOW DIRECTLY OR WITH INTERVENING SPACES, TABS AND/OR COMMAS.
^THE ASSOCIATION OF DATA TYPES WITH THE INITIAL LETTERS OF THE ARRAY
NAMES APPLIES ONLY TO ARRAYS DECLARED BY THE FOLLOWING ^^COMMON \O\R
DIMENSION \\STATEMENTS AND ONLY UNTIL THE PARTICULAR LETTERS
INVOLVED ARE ASSOCIATED WITH ANOTHER DATA TYPE BY A SUBSEQUENT
^^IMPLICIT \\STATEMENT. ^THE STATEMENT
.SKIP
.NOFILL
      ^^IMPLICIT REAL(A-G,R-Z),OCTAL(W-Z,C),INTEGER(P,H,O)
.SKIP
.FILL
\\WOULD ASSOCIATE THE INITIAL LETTERS ^^A, B, D, E, F, G, R, S, T, U
\\AND ^V WITH THE REAL DATA TYPE. ^THE LETTERS ^C AND ^W THROUGH ^Z
ARE TEMPORARILY ASSOCIATED WITH THE REAL DATA TYPE, BUT THEN ARE
ASSOCIATED WITH THE OCTAL DATA TYPE. ^THE SAMPLE STATEMENT ALSO
ASSOCIATES THE LETTERS ^H, ^O AND ^P WITH THE INTEGER DATA TYPE.
^THE LETTERS NOT ASSIGNED BY THE CURRENT STATEMENT WILL RETAIN THEIR
PREVIOUS DATA TYPE ASSOCIATIONS.
.SKIP
^THE FORMATS OF ^^COMMON, DIMENSION, INTEGER, OCTAL \\AND ^^REAL
\\STATEMENTS ARE IDENTICAL. ^THE INITIAL COMMAND WORD IS FOLLOWED BY
THE ARRAY NAMES EACH OF WHICH CAN BE FOLLOWED IN TURN BY ITS
SUBSCRIPT LIMITS ENCLOSED IN PARENTHESES. ^ARRAY NAMES CAN BE OF ANY
LENGTH, BUT MUST START WITH AN ALPHABETIC LETTER AND CAN CONTAIN
ONLY ALPHABETIC LETTERS AND DIGITS. ^COMMAS ARE REQUIRED BETWEEN
ARRAY NAMES ONLY IF SUBSCRIPTS ARE NOT SPECIFIED. ^FOLLOWING AN
ARRAY NAME, THE SUBSCRIPTS ENCLOSED IN PARENTHESES ARE SEPARATED BY
COMMAS AND ARE SPECIFIED AS RANGES CONSISTING OF THE STARTING VALUE,
A SLASH CHARACTER OR A COLON (THE 2 CHARACTERS ARE EQUIVALENT), AND
THE ENDING VALUE. ^THE NUMBERS INDICATING THE SUBSCRIPT RANGES CAN
BE SIGNED, BUT CANNOT CONTAIN AN EXPONENT, NEITHER THE ^E OF
SCIENTIFIC NOTATION NOR ^K NOR ^M BEING ACCEPTED. ^IF A SLASH OR A
COLON IS PRESENT BUT EITHER NUMBER IS MISSING, THEN THE MISSING
NUMBER IS ASSUMED TO BE 1. ^IF A SINGLE NUMBER APPEARS WITHOUT A
SLASH AND WITHOUT A COLON, THEN THE RANGE IS ASSUMED TO START AT 1
AND EXTEND THROUGH THE INDICATED NUMBER. ^IF NOTHING OR JUST A SLASH
OR JUST A COLON APPEARS BETWEEN THE PARENTHESES AND/OR COMMAS, THEN
THE RANGE IS ASSUMED TO BE 1/1. ^FOR EXAMPLE, THE STATEMENT
.SKIP
.INDENT 6
^^DIMENSION ABC,DEF(-123),GHI(20/4,,4/20)
.SKIP
\\WOULD DECLARE A NONSUBSCRIPTED VARIABLE NAMED ^^ABC, \\AN ARRAY
NAMED ^^DEF \\WITH DIMENSIONS STARTING AT 1 AND EXTENDING THROUGH
-123, AND A TRIPLY SUBSCRIPTED ARRAY NAMED ^^GHI \\WITH FIRST
DIMENSION STARTING AT 20 AND EXTENDING THROUGH 4, WITH SECOND
DIMENSION HAVING THE SINGLE VALUE 1, AND WITH THE THIRD DIMENSION
STARTING AT 4 AND EXTENDING THROUGH 20.
.SKIP
^THE APPEARANCE OUTSIDE OF A PARENTHETICAL EXPRESSION OF TWO SLASHES
IN AN ARRAY DECLARATION STATEMENT (COLONS ARE NOT RECOGNIZED IN THIS
CONTEXT) INDICATES THAT THE ARRAYS WHICH FOLLOW IT IN THE CURRENT
STATEMENT OR WHICH ARE DECLARED BY THE FOLLOWING STATEMENTS ARE TO
BE CONSIDERED TO BE A LOGICAL GROUP (PERHAPS THE CONTENTS OF A
SINGLE RECORD OF A FILE). ^THE APPEARANCE OF THE TWO SLASHES CAUSES
A SPECIALLY MARKED ENTRY TO BE ADDED TO THE DICTIONARY. ^IF NOTHING
APPEARS BETWEEN THE SLASHES, THEN THIS ENTRY HAS NO ASSOCIATED NAME
AND NO ASSOCIATED SUBSCRIPT LIMITS. ^THE ENTRY DOES, HOWEVER,
SPECIFY THE TOTAL NUMBER OF BUFFER LOCATIONS WHICH WOULD BE
NECESSARY TO STORE THE VALUES ASSOCIATED WITH THE NAMES WHICH FOLLOW
IT IN THE DICTIONARY. ^IF NO SLASHES APPEAR AT THE START OF THE
FIRST ARRAY DECLARATION READ BY THE CURRENT CALL TO ^^DALOAD, \\THEN
SUCH A ZERO CHARACTER ZERO SUBSCRIPT ENTRY IS CONSTRUCTED ANYWAY.
^IF THE SAMPLE ^^DIMENSION \\STATEMENT SHOWN ABOVE WAS THE FIRST
ARRAY DECLARATION READ BY ^^DALOAD, \\THEN AN ENTRY WOULD BE CREATED
PRIOR TO THE ^^ABC \\ENTRY STATING THAT A TOTAL OF 415 BUFFER
LOCATIONS (1+125+17*1*17) WOULD BE NECESSARY TO STORE THE VALUES
ASSOCIATED WITH THE NAMES. ^IF A NAME AND/OR SUBSCRIPT INFORMATION
APPEARS BETWEEN THE SLASHES, THEN THIS INFORMATION IS STORED ALONG
WITH THE NUMBER OF REQUIRED BUFFER LOCATIONS. ^THE NAME AND/OR
SUBSCRIPT INFORMATION, IS MEANT ONLY TO IDENTIFY TO THE USER, OR TO
THE CALLING PROGRAM, THE PARTICULAR LOGICAL GROUPING INVOLVED.
^ALTHOUGH THE NAMES ENCLOSED WITHIN SLASHES ARE STORED IN THE
DICTIONARY, THE ^^DAPICK \\ROUTINE CANNOT MATCH SUCH NAMES WITH THE
TEXT TYPED BY THE USER. ^^DAPICK \\WILL, HOWEVER, IDENTIFY TO THE
CALLING PROGRAM THE LOCATION WITHIN THE DICTIONARY OF THE ENTRY
WHICH SPECIFIES THE LENGTH OF THE GROUPING CONTAINING THE USER
SELECTED NAME.
.SKIP
^THE DICTIONARY IS STORED IN TWO ARRAYS, ^^LTRSTR \\CONTAINING THE
CHARACTERS OF THE NAMES, AND ^^NUMSTR \\CONTAINING THE NUMERIC
INFORMATION. ^THE NUMERIC INFORMATION CONSISTS OF THE FOLLOWING
.LEFT MARGIN 5
.SKIP
.INDENT -3
A.#THE NUMBER OF CHARACTERS IN THE ARRAY NAME. ^THIS MUST BE 1 OR
GREATER SINCE ZERO LENGTH ARRAY NAMES ARE NOT ALLOWED.
.SKIP
.INDENT -3
B.#THE ASSOCIATED DATA TYPE. ^THE CODING IS AS FOLLOWS
.SKIP
.LEFT MARGIN 10
.INDENT -5
-1#=#OCTAL. ^THIS IS AN INTEGER TYPE. ^THE ^^DAVARY \\ROUTINE WILL
USE A RADIX VALUE OF 8 TO DISPLAY THE VALUES TO THE USER AND TO
ACCEPT NEW VALUES FROM THE USER. ^IT MUST BE NOTED THAT IT IS THE
VALUE THAT IS DISPLAYED BY ^^DAVARY, \\NOT AN OCTAL REPRESENTATION
OF THE BIT PATTERN. ^IF THE NUMBER WOULD BE DISPLAYED AS THE RADIX
10 INTEGER -10, THEN IT IS DISPLAYED AS THE RADIX 8 INTEGER -12
REGARDLESS OF WHETHER THESE OCTAL NUMERALS CAN BE DIRECTLY MAPPED TO
THE BINARY BITS USED TO STORE THE NUMBER IN THE COMPUTER.
.SKIP
.INDENT -4
0#=#STANDARD ^^FORTRAN \\INTEGER. ^THE ^^DAVARY \\ROUTINE USES RADIX
10 TO DISPLAY SUCH VALUES TO THE USER AND TO ACCEPT NEW VALUES FROM
THE USER.
.SKIP
.INDENT -4
1#=#STANDARD ^^FORTRAN \\REAL. ^THE ^^DAVARY \\ROUTINE WILL DISPLAY
SUCH VALUES TO THE PRECISION SPECIFIED BY THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 5
.INDENT -3
C.#THE NUMBER OF SUBSCRIPTS. ^IF THIS IS ZERO, THEN THE NAME IS
NONSUBSCRIPTED, BUT ^^DAPICK \\WILL ACCEPT EITHER THE NONSUBSCRIPTED
NAME OR THE NAME AND THE SINGLE SUBSCRIPT 1.
.SKIP
.INDENT -3
D.#^IF THE NUMBER OF SUBSCRIPTS IS GREATER THAN ZERO, THEN THE
FOLLOWING PAIRS OF NUMBERS SPECIFY THE BEGINNING AND ENDING VALUES
OF EACH SUBSCRIPT RANGE.
.SKIP
.LEFT MARGIN 0
^THE BUFFER SIZE NEEDED FOR A LOGICAL GROUPING IS STORED INSTEAD OF
AN ASSOCIATED DATA TYPE IN AN ENTRY THE FIRST NUMBER OF WHICH IS THE
NEGATIVE OF THE NUMBER OF CHARACTERS IN THE NAME FOUND BETWEEN THE
TWO SLASHES. ^SINCE A NAME IS NOT REQUIRED BETWEEN THE TWO SLASHES,
THE FIRST NUMBER OF SUCH AN ENTRY CAN BE ZERO.
.SKIP
^THE CHARACTERS OF EACH NAME ARE MERELY APPENDED TO THE END OF THE
^^LTRSTR \\ARRAY 1 CHARACTER PER ARRAY LOCATION AS READ BY A
MULTIPLE OF AN ^A1 FORMAT.
.SKIP
^THE ^^DIMENSION \\STATEMENT USED EARLIER AS AN EXAMPLE WOULD
GENERATE THE FOLLOWING DICTIONARY INFORMATION IF READ AS THE FIRST
ARRAY DECLARATION.
.SKIP
.TEST PAGE 3
.INDENT 5
CONTENTS OF THE ^^LTRSTR \\ARRAY
.SKIP
.INDENT 10
1^^HA,1HB,1HC,1HD,1HE,1HF,1HG,1HH,1HI
.SKIP
.LEFT MARGIN 5
.TEST PAGE 7
\\CONTENTS OF THE ^^NUMSTR \\ARRAY (SHOWN WITH EACH ENTRY ON A
SEPARATE LINE)
.SKIP
.LEFT MARGIN 10
.NOFILL
0, 415,   0,
3,   1,   0,
3,   1,   1,   1,-123,
3,   1,   3,  20,   4,   1,   1,   4,  20
.FILL
.LEFT MARGIN 0
.SKIP 2
.TEST PAGE 8
.LEFT MARGIN 0
.FILL
.CENTER
^THE ^^DALOAD A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DALOAD \I\S
.SKIP
.NOFILL
      SUBROUTINE DALOAD(IDSK  ,LTRMAX,NUMMAX,MAXBFR,LTRUSD,
     1NUMUSD,LTRSTR,NUMSTR,IBUFFR,IFULL )
.SKIP
.FILL
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
.NOFILL
      ^^DIMENSION LTRSTR(LTRMAX),NUMSTR(NUMMAX),IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE FOLLOWING ARE INPUT ARGUMENTS LEFT UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IDSK###=#\\NUMBER OF THE INPUT UNIT FROM WHICH THE ^^FORTRAN
\\STATEMENTS ARE TO BE READ AS DATA. ^THE FILE BEING READ FROM THIS
UNIT MUST PREVIOUSLY HAVE BEEN OPENED BY THE CALLING PROGRAM. ^IF
SEVERAL SETS OF ARRAY SPECIFICATIONS APPEAR IN THE FILE SEPARATED BY
^^END \\STATEMENTS, THEN SUBSEQUENT CALLS TO ^^DALOAD \\MIGHT READ
FROM THE SAME FILE.
.SKIP
.INDENT -9
^^LTRMAX#=#\\MAXIMUM SUBSCRIPT OF THE LOCATIONS IN THE ^^LTRSTR
\\ARRAY WHICH CAN BE USED TO STORE THE CHARACTERS OF NAMES IN THE
DICTIONARY.
.SKIP
.INDENT -9
^^NUMMAX#=#\\MAXIMUM SUBSCRIPT OF THE LOCATIONS IN THE ^^NUMSTR
\\ARRAY WHICH CAN BE USED TO STORE THE NUMERIC INFORMATION
ASSOCIATED WITH THE NAMES IN THE ^^LTRSTR \\ARRAY.
.SKIP
.INDENT -9
^^MAXBFR#=#\\MAXIMUM SUBSCRIPT OF THE LOCATIONS IN THE ^^IBUFFR
\\ARRAY WHICH CAN BE USED FOR TEMPORARY STORAGE OF EACH LINE OF THE
INPUT FILE, THE CHARACTERS OF WHICH ARE READ INTO ^^IBUFFR(1)
\\THROUGH ^^IBUFFR(MAXBFR). MAXBFR \\IS THE NUMBER OF CHARACTERS TO
BE READ FROM EACH LINE OF THE INPUT FILE. ^IT IS SUGGESTED THAT
^^IBUFFR \\BE DIMENSIONED TO AT LEAST 72, AND THAT ^^MAXBFR \B\E
\\INPUT WITH THE VALUE 72. ^THE FORMAT USED IN ^^DALOAD \\TO READ
THE INPUT FILE IS 100^A1 SO ^^MAXBFR \\SHOULD NOT EXCEED 100 UNLESS
THIS FORMAT IS INCREASED.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED BOTH FOR INPUT TO THE ^^DALOAD
\\ROUTINE, AND FOR OUTPUT TO THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LTRUSD#=#\\INPUT CONTAINING THE NUMBER OF LOCATIONS IN THE
^^LTRSTR \\ARRAY ALREADY IN USE AND WHICH MUST BE LEFT INTACT. ^IF
THE ^^LTRSTR \\ARRAY IS EMPTY, THEN ^^LTRUSD \\WOULD BE INPUT
CONTAINING THE VALUE 0.
.INDENT -2
=#RETURNED SPECIFYING THE NUMBER OF LOCATIONS IN THE ^^LTRSTR
\\ARRAY IN USE AFTER THE CURRENT CALL TO ^^DALOAD \\HAS APPENDED NEW
NAMES TO THE DICTIONARY. ^IF ^^LTRSTR \\IS RETURNED EQUAL TO ITS
INPUT VALUE, THEN NO NAMES WERE ADDED, BUT IT IS POSSIBLE THAT A
SLASH OR SLASHES IN AN ARRAY DECLARATION STATEMENT HAS CAUSED SOME
NUMERIC INFORMATION TO BE ADDED TO THE ^^NUMSTR \\ARRAY.
.SKIP
.INDENT -9
^^NUMUSD#=#\\INPUT CONTAINING THE NUMBER OF LOCATIONS IN THE
^^NUMSTR \\ARRAY ALREADY IN USE AND WHICH MUST BE LEFT INTACT. ^IF
THE ^^NUMSTR \\ARRAY IS EMPTY, THEN ^^NUMUSD \\WOULD BE INPUT
CONTAINING THE VALUE 0.
.INDENT -2
=#RETURNED SPECIFYING THE NUMBER OF LOCATIONS IN THE ^^NUMSTR
\\ARRAY IN USE AFTER THE CURRENT CALL TO ^^DALOAD \\HAS APPENDED NEW
ARRAY SPECIFICATIONS TO THE DICTIONARY. ^IF ^^NUMUSD \\IS RETURNED
UNCHANGED, THEN NOTHING WAS APPENDED TO THE DICTIONARY. ^IF THE
COMPUTER SYSTEM BEING USED DOES NOT SUPPORT END-OF-FILE TESTS IN
^^READ \\STATEMENTS, AND IF MORE THAN ONE SET OF DATA IS CONTAINED
IN THE INPUT FILE, THEN THE END OF THE FILE MIGHT BE MARKED BY AN
ADDITIONAL ^^END \\STATEMENT WHICH CAN BE DETECTED BY CHECKING THE
RETURNED VALUES OF BOTH ^^NUMUSD \\AND ^^IFULL.
.SKIP
.LEFT MARGIN 0
T\\HE FOLLOWING ARGUMENTS ARE USED TO ACCUMULATE THE DICTIONARY.
^DEPENDING UPON THE APPLICATION, A PREVIOUSLY CONSTRUCTED DICTIONARY
AT THE START OF THESE ARRAYS CAN BE KEPT INTACT.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LTRSTR#=#\\ARRAY USED TO STORE THE CHARACTERS OF THE NAMES, 1
CHARACTER PER STORAGE LOCATION AS READ BY A MULTIPLE OF AN ^A1
FORMAT. ^^LTRSTR \\MUST BE DIMENSIONED TO AT LEAST THE VALUE OF
^^LTRMAX.
.SKIP
.INDENT -9
NUMSTR#=#\\ARRAY USED TO STORE THE NUMERIC INFORMATION ASSOCIATED
WITH THE NAMES IN THE DICTIONARY. ^^NUMSTR \\MUST BE DIMENSIONED TO
AT LEAST THE VALUE OF ^^NUMMAX.
.SKIP
.LEFT MARGIN 0
T\\HE FOLLOWING ARGUMENT IS USED INTERNALLY BY THE ^^DALOAD
\\ROUTINE. ^THE INPUT CONTENTS OF THIS BUFFER ARE DESTROYED. ^NO
ATTEMPT IS MADE TO SUPPLY ANY MEANINGFUL INFORMATION TO THE CALLING
PROGRAM THROUGH THIS ARGUMENT.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IBUFFR#=#\\ARRAY USED BY THE ^^DALOAD \\ROUTINE TO STORE EACH LINE
OF THE INPUT FILE AS IT IS BEING PROCESSED. ^^IBUFFR \\MUST BE
DIMENSIONED AT LEAST TO THE VALUE OF ^^MAXBFR.
.SKIP
.LEFT MARGIN 0
T\\HE FOLLOWING ARGUMENT IS USED ONLY FOR OUTPUT. ^ITS INPUT VALUE
IS IGNORED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IFULL##=#\\RETURNED DESCRIBING THE REASON WHY ^^DALOAD \\HAS
RELINQUISHED CONTROL BACK TO THE CALLING PROGRAM.
.INDENT -2
=#1, RETURNED IF AN ^^END \\STATEMENT WAS READ IN THE INPUT FILE.
.INDENT -2
=#2, RETURNED IF AN END-OF-FILE WAS SENSED.
.INDENT -2
=#3, RETURNED IF ADDING A REQUESTED ARRAY DECLARATION TO THE
DICTIONARY WOULD HAVE CAUSED THE ^^NUMSTR \\ARRAY TO OVERFLOW.
^^NUMUSD \\IS RETURNED POINTING TO THE END OF THE NUMERIC
INFORMATION CONCERNING THE LAST SUCCESSFULLY APPENDED ARRAY
SPECIFICATION. ^SINCE READING AN ^^END \\STATEMENT, OR SENSING AN
END-OF-FILE, CAN CAUSE THE USED PORTION OF THE ^^NUMSTR \\ARRAY (BUT
NOT OF THE ^^LTRSTR \\ARRAY) TO INCREASE SLIGHTLY, ^^IFULL
\\RETURNED CONTAINING 3 DOES NOT ASSURE THAT AN ^^END \\STATEMENT OR
AN END-OF-FILE WAS NOT FOUND.
.INDENT -2
=#4, RETURNED IF ADDING A REQUESTED ARRAY DECLARATION TO THE
DICTIONARY WOULD HAVE CAUSED THE ^^LTRSTR \\ARRAY TO OVERFLOW.
^^LTRUSD \\IS RETURNED POINTING TO THE END OF THE NAME OF THE LAST
SUCCESSFULLY APPENDED ARRAY SPECIFICATION.
.LEFT MARGIN 0
.SKIP 2
.LEFT MARGIN 0
.FILL
.CENTER
^AN ^EXAMPLE OF THE ^USE OF ^^DALOAD
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE SAMPLE PROGRAM LISTED ON THE FOLLOWING PAGE CALLS ^^DALOAD
\\TO READ ARRAY SPECIFICATIONS FROM THE USER'S TERMINAL. ^THE
CONTENTS OF THE DICTIONARY ARE SUMMARIZED AFTER ^^DALOAD \\HAS
RETURNED CONTROL BACK TO THE CALLING PROGRAM. ^THIS REPORT CONSISTS
FIRST OF THE CHARACTERS IN THE ^^LTRSTR \\ARRAY, THEN OF THE NUMBERS
IN THE ^^NUMSTR \\ARRAY SHOWN TOGETHER WITH THE FIRST 6 LETTERS OF
EACH OF THE ASSOCIATED NAMES IN THE ^^LTRSTR \\ARRAY.
.SKIP
^A SAMPLE DIALOG BETWEEN THE PROGRAM AND USER IS PRESENTED FOLLOWING
THE LISTING OF THE PROGRAM.
.SKIP
^^DABELT \\IS CALLED TO PREPARE A BUFFER WHICH CAN BE TYPED TO
IDENTIFY THE LOCATIONS OF THE CHARACTERS OF THE NAMES WITHIN THE
^^LTRSTR \\ARRAY.
.PAGE
.NOFILL
^^C     PROGRAM TO DEMONSTRATE DALOAD ROUTINE
C
      DIMENSION IBUFFR(72),LTRSTR(1000),NUMSTR(1000)
      DATA ITTY,MAXBFR,LTRMAX,NUMMAX/5,72,1000,1000/
      DATA ISPACE/1H /
      LTRUSD=0
      NUMUSD=0
    1 LTRBGN=LTRUSD
      NUMBGN=NUMUSD
      WRITE(ITTY,2)
    2 FORMAT(' TYPE ARRAY SPECIFICATIONS'/)
      CALL DALOAD(ITTY,LTRMAX,NUMMAX,MAXBFR,LTRUSD,
     1NUMUSD,LTRSTR,NUMSTR,IBUFFR,IFULL)
C
C     REPORT CHARACTER INFORMATION IN LTRSTR ARRAY
      LTRRIT=LTRBGN
    3 IF(LTRRIT.GE.LTRUSD)GO TO 6
      LTRLFT=LTRRIT+1
      LTRRIT=LTRRIT+50
      IF(LTRRIT.GT.LTRUSD)LTRRIT=LTRUSD
      WRITE(ITTY,4)(LTRSTR(I),I=LTRLFT,LTRRIT)
    4 FORMAT(1X,50A1)
      LINE=0
    5 LINE=LINE+1
      CALL DABELT(1,1,1,LINE,LTRLFT,
     1LTRRIT,0,MAXBFR,IBUFFR,MAXLIN,MAXPRT,MAXUSD)
      WRITE(ITTY,4)(IBUFFR(I),I=1,MAXPRT)
      IF(LINE.LT.MAXLIN)GO TO 5
      WRITE(ITTY,4)
      GO TO 3
C
C     REPORT NUMERIC INFORMATION IN NUMSTR ARRAY
    6 IF(NUMBGN.GE.NUMUSD)GO TO 11
      NUMLFT=NUMBGN+1
      LTRLFT=LTRBGN+1
      NUMBGN=NUMBGN+3+(2*NUMSTR(NUMLFT+2))
      LTRBGN=LTRBGN+IABS(NUMSTR(NUMLFT))
      DO 7 MAXPRT=1,6
    7 IBUFFR(MAXPRT)=ISPACE
      MAXPRT=0
    8 IF(LTRLFT.GT.LTRBGN)GO TO 9
      MAXPRT=MAXPRT+1
      IBUFFR(MAXPRT)=LTRSTR(LTRLFT)
      LTRLFT=LTRLFT+1
      GO TO 8
    9 WRITE(ITTY,10)NUMLFT,NUMBGN,(IBUFFR(I),I=1,6),
     1(NUMSTR(I),I=NUMLFT,NUMBGN)
   10 FORMAT(' NUMSTR(',I4,'/',1I4,') ',6A1,100I4)
      GO TO 6
   11 WRITE(ITTY,12)IFULL
   12 FORMAT(/' IFULL=',1I2/)
      IF(IFULL.LE.2)GO TO 1
      STOP
      END
.PAGE
.CENTER
T\\YPICAL ^DIALOG ^BETWEEN ^^DALOAD D\\EMONSTRATION ^PROGRAM AND ^USER
.CENTER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
.NOFILL
^^TYPE ARRAY SPECIFICATIONS
      COMMON FIRST(10),SECOND,THIRD(-100/-91)
     1IFOURTH(10,10/,11/20)
      IMPLICIT INTEGER(O-V)OCTAL(A-H,W-Z)
      COMMON/SLASHES/FIFTH,SIXTH(-5)
      REAL SEVENTH(1),EIGHTH(3/3)
      DIMENSION/(4)/NINTH,TENTH//ELEVENTH
      END
.SKIP
FIRSTSECONDTHIRDIFOURTHSLASHESFIFTHSIXTHSEVENTHEIG
12345678911111111112222222222333333333344444444445
         01234567890123456789012345678901234567890
.SKIP
HTHNINTHTENTHELEVENTH
555555555666666666677
123456789012345678901
.SKIP
NUMSTR(   1/   3)          01021   0
NUMSTR(   4/   8) FIRST    5   1   1   1  10
NUMSTR(   9/  11) SECOND   6   1   0
NUMSTR(  12/  16) THIRD    5   1   1-100 -91
NUMSTR(  17/  25) IFOURT   7   0   3   1  10  10   1  11  20
NUMSTR(  26/  28) SLASHE  -7  10   0
NUMSTR(  29/  31) FIFTH    5  -1   0
NUMSTR(  32/  36) SIXTH    5   0   1   1  -5
NUMSTR(  37/  41) SEVENT   7   1   1   1   1
NUMSTR(  42/  46) EIGHTH   6   1   1   3   3
NUMSTR(  47/  51)          0   2   1   1   4
NUMSTR(  52/  54) NINTH    5   0   0
NUMSTR(  55/  57) TENTH    5   0   0
NUMSTR(  58/  60)          0   1   0
NUMSTR(  61/  63) ELEVEN   8  -1   0
.SKIP
IFULL= 1
.SKIP
TYPE ARRAY SPECIFICATIONS
C     TEST DEFAULT ASSOCIATIONS OF LETTERS WITH TYPES
      DIMENSION/PRESENT(22,55)/ABC,IJK,OPQ,WXY
      END
.SKIP
PRESENTABCIJKOPQWXY
7777777788888888889
2345678901234567890
.SKIP
NUMSTR(  64/  70) PRESEN  -7   4   2   1  22   1  55
NUMSTR(  71/  73) ABC      3   1   0
NUMSTR(  74/  76) IJK      3   0   0
NUMSTR(  77/  79) OPQ      3   1   0
NUMSTR(  80/  82) WXY      3   1   0
.SKIP
IFULL= 1
.FILL
.PAGE
.FILL
.LEFT MARGIN 0
.CENTER
E\\XAMPLE OF ^USE OF ^SEVERAL ^NAMED ^ARRAY ^MANIPULATION ^ROUTINES
.CENTER
------- -- --- -- ------- ----- ----- ------------ --------
.SKIP
^AN INTERACTIVE PROGRAM WHICH WAS USED TO PROVE THE SUFFICIENCY OF
THE NAMED ARRAY MANIPULATION ROUTINES FOR A PARTICULAR APPLICATION
IS LISTED ON THE FOLLOWING PAGES TOGETHER WITH A DIALOG BETWEEN THE
USER AND THE PROGRAM. ^ALSO LISTED IS A SHORTER NONINTERACTIVE
SUPPORT PROGRAM WHICH CONSTRUCTS A DATA BASE FOR THE INTERACTIVE
PROGRAM.
.SKIP
^THE INTERACTIVE PROGRAM ALLOWS THE USER TO EXAMINE AND CHANGE THE
VALUES IN 6 DIFFERENT GROUPS OF SIMULATED ARRAYS. ^EACH DATA FILE
READ AND WRITTEN BY THE PROGRAM STORES THE VALUES OF A SINGLE GROUP
OF SIMULATED ARRAYS. ^IN THOSE CASES WHERE DIFFERENT VERSIONS OF THE
VALUES OF A SINGLE GROUP ARE MAINTAINED, THESE VERSIONS ARE SELECTED
BY ^^GLOBAL \\AND ^^LOCAL \\IDENTIFICATION NUMBERS TYPED BY THE
USER. ^THE ^^GLOBAL \\NUMBER SELECTS THE FINAL CHARACTER OF THE FILE
NAME. ^THE ^^LOCAL \\NUMBER SELECTS A RECORD WITHIN THE FILE. ^IF
THE USER TYPES THE NAME OF AN ARRAY WHICH DOES NOT VARY ACCORDING TO
EITHER ^^GLOBAL \O\R LOCAL \\NUMBERS, THEN THESE NUMBERS ARE
IGNORED. ^TO SELECT A NEW ^^LOCAL \\NUMBER, THE USER TYPES AN EMPTY
LINE IN RESPONSE TO THE REQUEST FOR ANOTHER ARRAY NAME. ^TO SELECT A
NEW ^^GLOBAL \\NUMBER, THE USER TYPES AN EMPTY LINE (OR ZERO) IN
RESPONSE TO THE REQUEST FOR A NEW ^^LOCAL \\NUMBER. ^WHEN THE
CONTENTS OF A NEW RECORD MUST BE READ, THE CONTENTS OF PREVIOUS
RECORD ARE FIRST WRITTEN BACK INTO THE FILE IF THESE VALUES HAVE
BEEN CHANGED BY THE USER. ^THE PROGRAM REPORTS TO THE USER WHEN
FILES ARE OPENED AND WHEN RECORDS ARE READ AND WRITTEN.
.SKIP
^THE VALUES INITIALLY STORED IN THE DATA FILES ARE MERELY THE
SEQUENCE NUMBERS OF THE LOCATIONS CONTAINING THE VALUES RELATIVE TO
ALL LOCATIONS STORING VALUES FOR THAT PARTICULAR GROUP OF SIMULATED
ARRAYS. ^IN THE ASSIGNMENT OF THESE VALUES, THE ^^LOCAL \\NUMBER IS
VARIED MORE RAPIDLY THAN THE ^^GLOBAL \\NUMBERS, I.E. WHERE
DIFFERENT VERSIONS ARE STORED FOR BOTH ^^LOCAL \\AND ^^GLOBAL
\\NUMBERS, THE COUNTS CONTINUE IN THE RECORD SELECTED BY THE NEXT
HIGHER ^^LOCAL \\NUMBER, AND WHEN THE END OF THE FILE HAS BEEN
REACHED, ARE CONTINUED IN THE FILE SELECTED BY THE NEXT HIGHER
^^GLOBAL \\NUMBER. ^TO AID THE USER IN CHECKING THE OPERATION OF THE
PROGRAM, THE NAME OF EACH SIMULATED ARRAY IS CONSTRUCTED OF A SINGLE
ALPHABETIC LETTER FOLLOWED BY THE DIGITS OF THE NUMBER WHICH IS THE
SUBSCRIPT OF THE BUFFER LOCATION WHICH CONTAINS THE START OF THE
SIMULATED ARRAY, AND EACH GROUP OF SIMULATED ARRAYS WHICH CAN VARY
BY EITHER ^^GLOBAL \O\R LOCAL \\NUMBERS CONTAINS A MULTIPLE OF 1000
LOCATIONS.
.PAGE
.CENTER
^PROGRAM ^WHICH ^CONSTRUCTS ^DATA ^BASE FOR ^INTERACTIVE ^PROGRAM
.CENTER
------- ----- ---------- ---- ---- --- ----------- -------
.SKIP
.NOFILL
^^C     RENBR(MAKDAT/MAKE DATA FILES FOR NAMED ARRAY DEMO)
C
      DIMENSION LTRSTR(1000),NUMSTR(1000),IARRAY(2000),
     1AARRAY(2000),IBUFFR(72),ITWO(6),IFOUR(6)
      EQUIVALENCE(IARRAY(1),AARRAY(1))
C
C     NAMES OF INPUT FILE CONTAINING VALUES TO MANIPULATE
      DATA ITWO/
     15HTWO1 ,5HTWO2 ,5HTWO3 ,5HTWO4 ,5HTWO5 ,5HTWO6 /
      DATA IFOUR/
     15HFOUR1,5HFOUR2,5HFOUR3,5HFOUR4,5HFOUR5,5HFOUR6/
C
C     SIZES OF VARIOUS ARRAYS
C     MAXBFR = DIMENSION OF IBUFFR ARRAY
C     LTRMAX = DIMENSION OF LTRSTR ARRAY
C     NUMMAX = DIMENSION OF NUMSTR ARRAY
      DATA MAXBFR,LTRMAX,NUMMAX/72,1000,1000/
C
C     UNIT NUMBERS
C     ITTY   = UNIT NUMBER OF USER TERMINAL FOR INPUT
C     JTTY   = UNIT NUMBER OF USER TERMINAL FOR OUTPUT
C     IDSK   = UNIT NUMBER FOR READING ALL FILES
      DATA ITTY,JTTY,IDSK/5,5,1/
C
C     ESTABLISH ARRAY MANIPULATION DICTIONARY
      LTRUSD=0
      NUMUSD=0
      CALL IFILE(IDSK,5HARRAY)
      CALL DALOAD(IDSK,LTRMAX,NUMMAX,MAXBFR,LTRUSD,
     1NUMUSD,LTRSTR,NUMSTR,IBUFFR,IFULL)
      CALL RELEAS(IDSK)
      WRITE(JTTY,1)NUMUSD,NUMMAX,LTRUSD,LTRMAX
    1 FORMAT(' USED STORAGE',1I5,1H/,1I5,' NUMERIC'/
     113X,1I5,1H/,1I5,' CHARACTER')
C
C     OBTAIN DESCRIPTION OF NEXT FILE
      KNDFIL=0
    2 KNDFIL=KNDFIL+1
      CALL DABASE(2,2,1,IBUFFR,KNDFIL,
     11,LTRUSD,LTRSTR,1,NUMUSD,NUMSTR,LRGLTR,
     2LRGNUM,LRGKNT)
      IF(LRGKNT.LE.0)GO TO 19
      NEWSIZ=NUMSTR(LRGNUM+1)
      KNTLOC=0
      NUMINI=LRGNUM+3+(2*NUMSTR(LRGNUM+2))
      KONTRL=NUMSTR(NUMINI+1)
      MAXFIL=1
      MAXRCD=1
      NEWFIL=1
    3 GO TO(4,5,6,7,8,9),KNDFIL
    4 NEWNAM=3HONE
      GO TO 10
    5 MAXFIL=6
      NEWNAM=ITWO(NEWFIL)
      GO TO 10
    6 NEWNAM=5HTHREE
      GO TO 10
    7 MAXFIL=6
      MAXRCD=3
      NEWNAM=IFOUR(NEWFIL)
      GO TO 10
    8 MAXRCD=3
      NEWNAM=4HFIVE
      GO TO 10
    9 NEWNAM=3HSIX
C
C     WRITE THE FILE
   10 CALL OFILE(IDSK,NEWNAM)
      DO 18 NEWRCD=1,MAXRCD
      IF(KONTRL.GT.0)GO TO 12
      DO 11 I=1,NEWSIZ
      KNTLOC=KNTLOC+1
   11 IARRAY(I)=KNTLOC
      WRITE(IDSK)(IARRAY(I),I=1,NEWSIZ)
      GO TO 14
   12 DO 13 I=1,NEWSIZ
      KNTLOC=KNTLOC+1
   13 AARRAY(I)=KNTLOC
      WRITE(IDSK)(AARRAY(I),I=1,NEWSIZ)
   14 IF((NEWRCD.EQ.1).AND.(NEWFIL.EQ.1))
     1WRITE(JTTY,15)KNDFIL,NEWNAM,NEWRCD,KNTLOC
   15 FORMAT(' TYPE =',1I2,', NAME = ',1A5,
     1', RCRD =',1I2,', THRU =',1I6)
      IF((NEWRCD.EQ.1).AND.(NEWFIL.GT.1))
     1WRITE(JTTY,16)NEWNAM,NEWRCD,KNTLOC
   16 FORMAT(11X,'NAME = ',1A5,
     1', RCRD =',1I2,', THRU =',1I6)
      IF(NEWRCD.GT.1)WRITE(JTTY,17)NEWRCD,KNTLOC
   17 FORMAT(25X,'RCRD =',1I2,', THRU =',1I6)
   18 CONTINUE
      END FILE IDSK
      NEWFIL=NEWFIL+1
      IF(NEWFIL.LE.MAXFIL)GO TO 3
      GO TO 2
   19 STOP
      END
.PAGE
.CENTER
D\\ATA ^FILE ^READ BY ^^DALOAD \T\O D\\EFINE ^ARRAY ^NAMES IN ^DICTIONARY
.CENTER
---- ---- ---- -- ------ -- ------ ----- ----- -- ----------
.SKIP
.NOFILL
^^C     FILE TO BE READ BY NAMED ARRAY DEMONSTRATION PROGRAM
C
C     SECOND FILE TYPE, VARIES BY GLOBAL NUMBER ONLY
      COMMON/SECOND(2)/A1(24,4),A97(16,4),A161(16/1,4),A225(
     116,4/1),A289(16/1,4/1),A353(-1/-100),A453(6,64),A837(4
     2,4),A853(4,8),A885(4,4),A901(100/)
C
C     FOURTH FILE TYPE, VARIES BY GLOBAL AND LOCAL NUMBERS
      COMMON/FOURTH(4)/B1,B2(6,6),B38(6,4),B62(8,6),B110(2,1
     12,4),B206(3),B209(12,6),B281(3,2,6),B317(6,2),B329(6),
     2B335(4,4),B351(8,4),B383(2,3,4),B407(2,4),B415(2,4,3,4
     3),B511(2,3),B517(2,2,4)
      COMMON B533(2,12,4),B629(2,15,4),B749(40,2),B829(2,12,
     12),B877(12,4,2),B973(7,4,2),B1029(13,20),B1289(8,4),B1
     2321(8,20),B1481(6),B1487(10),B1497(4,4),B1513(2,6),B15
     325(4,4)
      COMMONB1541(5,4,4),B1621(20),B1641(4,4),B1657(10,4),
     1 B 1 6 9 7 ( 2 , 1 2 , 3 , 4 ) , B 1 9 8 5 ( 4 , 4 )
C
C     FIRST FILE TYPE, 1 COPY ONLY
      COMMON/FIRST(1)/C1(10),C11(10),C21(30),C51(8),C59(2,4)
     1,C67(3,3,2),C85(2,4),C93(3,3,3,2),C147(4,2,4),
     2C179(3,2,4,2),C227(2,3,4)
C
C     FIFTH FILE TYPE, VARIES BY LOCAL NUMBER ONLY
      COMMON/FIFTH(5)/D1(3,3),D10(14,4),D66(4,3),D78(4,22),
     1D166(2,3,6),D202(2,4),D210(3,4),D222(4),D226(4,3),
     2D238(5),D243(31,18),D801(2,2,4,8),D929(4,3,2,16),
     3D1313(3,4,3,16),D1889(2,4,14)
C
C     THIRD FILE TYPE, 1 COPY ONLY
      OCTAL/THIRD(3)/I1(4,2),I9(4),I13(25)
      COMMON I38(2,4),I46,I47(5/5),I48(1),I49(2)
C
C     SIXTH FILE TYPE, 1 COPY ONLY
      COMMON/SIXTH(6)/J1(4,4,2),J33(18)
      END
.PAGE
.CENTER
F\\ILE ^DESCRIPTION ^PRODUCED ^DURING ^CONSTRUCTION OF ^DATA ^BASE
.CENTER
---- ----------- -------- ------ ------------ -- ---- ----
.SKIP
.NOFILL
^^USED STORAGE  632/ 1000 NUMERIC
              348/ 1000 CHARACTER
TYPE = 1, NAME = ONE  , RCRD = 1, THRU =   250
TYPE = 2, NAME = TWO1 , RCRD = 1, THRU =  1000
          NAME = TWO2 , RCRD = 1, THRU =  2000
          NAME = TWO3 , RCRD = 1, THRU =  3000
          NAME = TWO4 , RCRD = 1, THRU =  4000
          NAME = TWO5 , RCRD = 1, THRU =  5000
          NAME = TWO6 , RCRD = 1, THRU =  6000
TYPE = 3, NAME = THREE, RCRD = 1, THRU =    50
TYPE = 4, NAME = FOUR1, RCRD = 1, THRU =  2000
                        RCRD = 2, THRU =  4000
                        RCRD = 3, THRU =  6000
          NAME = FOUR2, RCRD = 1, THRU =  8000
                        RCRD = 2, THRU = 10000
                        RCRD = 3, THRU = 12000
          NAME = FOUR3, RCRD = 1, THRU = 14000
                        RCRD = 2, THRU = 16000
                        RCRD = 3, THRU = 18000
          NAME = FOUR4, RCRD = 1, THRU = 20000
                        RCRD = 2, THRU = 22000
                        RCRD = 3, THRU = 24000
          NAME = FOUR5, RCRD = 1, THRU = 26000
                        RCRD = 2, THRU = 28000
                        RCRD = 3, THRU = 30000
          NAME = FOUR6, RCRD = 1, THRU = 32000
                        RCRD = 2, THRU = 34000
                        RCRD = 3, THRU = 36000
TYPE = 5, NAME = FIVE , RCRD = 1, THRU =  2000
                        RCRD = 2, THRU =  4000
                        RCRD = 3, THRU =  6000
TYPE = 6, NAME = SIX  , RCRD = 1, THRU =    50
.PAGE
.CENTER
I\\NTERACTIVE ^PROGRAM ^USING ^NAMED ^ARRAY ^MANIPULATION ^ROUTINES
.CENTER
----------- ------- ----- ----- ----- ------------ --------
.SKIP
.NOFILL
^^C     RENBR(TSTNAM/TEST NAMED ARRAY MANIPULATION ROUTINES)
C
      DIMENSION LTRSTR(1000),NUMSTR(1000),IARRAY(2000),
     1AARRAY(2000),IBUFFR(72),INISUB(7),LMTSUB(7),
     2NOWSUB(7),INCSUB(7),NAME(60),ITWO(6),IFOUR(6),
     3IDOUBL(2)
      EQUIVALENCE(IARRAY(1),AARRAY(1))
C
C     INITIAL VALUES FOR INCREMENT ARRAY
      DATA INCSUB/7*0/
C
C     NAMES OF INPUT FILE CONTAINING VALUES TO MANIPULATE
      DATA ITWO/
     15HTWO1 ,5HTWO2 ,5HTWO3 ,5HTWO4 ,5HTWO5 ,5HTWO6 /
      DATA IFOUR/
     15HFOUR1,5HFOUR2,5HFOUR3,5HFOUR4,5HFOUR5,5HFOUR6/
C
C     SIZES OF VARIOUS ARRAYS
C     NAMMAX = DIMENSION OF NAME ARRAY
C     MAXBFR = DIMENSION OF IBUFFR ARRAY
C     LTRMAX = DIMENSION OF LTRSTR ARRAY
C     NUMMAX = DIMENSION OF NUMSTR ARRAY
C     MAXSUB = DIMENSIONS OF INISUB,LMTSUB,NOWSUB,INCSUB
      DATA NAMMAX,MAXBFR,LTRMAX,NUMMAX,MAXSUB/
     160,72,1000,1000,7/
C
C     UNIT NUMBERS
C     ITTY   = UNIT NUMBER OF USER TERMINAL FOR INPUT
C     JTTY   = UNIT NUMBER OF USER TERMINAL FOR OUTPUT
C     IDSK   = UNIT NUMBER FOR READING ALL FILES
      DATA ITTY,JTTY,IDSK/5,5,1/
C
C     ESTABLISH ARRAY MANIPULATION DICTIONARY
      LTRUSD=0
      NUMUSD=0
      CALL IFILE(IDSK,5HARRAY)
      CALL DALOAD(IDSK,LTRMAX,NUMMAX,MAXBFR,LTRUSD,
     1NUMUSD,LTRSTR,NUMSTR,IBUFFR,IFULL)
      CALL RELEAS(IDSK)
      IF(IFULL.EQ.1)WRITE(JTTY,1)
    1 FORMAT(' DALOAD - END STATEMENT READ')
      IF(IFULL.EQ.2)WRITE(JTTY,2)
    2 FORMAT(' DALOAD - END-OF-FILE READ')
      IF(IFULL.EQ.3)WRITE(JTTY,3)
    3 FORMAT(' DALOAD - NUMSTR ARRAY OVERFLOW')
      IF(IFULL.EQ.4)WRITE(JTTY,4)
    4 FORMAT(' DALOAD - LTRSTR ARRAY OVERFLOW')
      WRITE(JTTY,5)NUMUSD,NUMMAX,LTRUSD,LTRMAX
    5 FORMAT(' USED STORAGE',1I5,1H/,1I5,' NUMERIC'/
     113X,1I5,1H/,1I5,' CHARACTER')
C
C     TYPE DESCRIPTION OF DICTIONARY
      WRITE(JTTY,6)
    6 FORMAT(' TYPE ARRAY DESCRIPTION (Y OR N) ',$)
      READ(ITTY,7)IFYES
    7 FORMAT(1A1)
      IF(IFYES.EQ.1HY)CALL DALIST(JTTY,1,LTRUSD,LTRSTR,1,
     1NUMUSD,NUMSTR,NAMMAX,NAME)
C
C     ASK USER FOR WHAT RECORD HE WANTS
      LSTRCD=0
    8 WRITE(JTTY,9)
    9 FORMAT(' GLOBAL NUMBER ',$)
      READ(ITTY,10)MAJOR
   10 FORMAT(1I)
      IF(MAJOR.LE.0)GO TO 11
      IF(MAJOR.LE.6)GO TO 13
   11 WRITE(JTTY,12)
   12 FORMAT(' EXIT (Y OR N) ',$)
      READ(ITTY,7)IFYES
      IF(IFYES.NE.1HY)GO TO 8
      IF(LSTRCD.EQ.0)GO TO 43
      MAJOR=0
      GO TO 33
   13 WRITE(JTTY,14)
   14 FORMAT(' LOCAL NUMBER ',$)
      READ(ITTY,10)MINOR
      IF(MINOR.LE.0)GO TO 8
      IF(MINOR.GT.3)GO TO 8
C
C     GET FIRST USER ARRAY SPECIFICATION
   15 WRITE(JTTY,16)
   16 FORMAT(' ARRAY NAME ',$)
      READ(ITTY,17)IBUFFR
   17 FORMAT(72A1)
      LOWBFR=1
      KIND=-1
   18 CALL DAPICK(MAXBFR,IBUFFR,1,LTRUSD,LTRSTR,
     11,NUMUSD,NUMSTR,MAXSUB,LOWBFR,KIND,LRGLTR,
     2LRGNUM,LRGKNT,INITAL,KOUNT,LTRINI,NUMINI,KNTSUB,
     3INISUB,LMTSUB)
      GO TO(25,25,13,15,23,23,21,19),KIND
C
C     SEMICOLON REQUIRED IF TEXT PREVIOUSLY SPECIFIED
   19 WRITE(JTTY,20)
   20 FORMAT(' SEMICOLON REQUIRED')
      GO TO 15
C
C     UNKNOWN NAME
   21 WRITE(JTTY,22)
   22 FORMAT(' UNKNOWN')
      GO TO 15
C
C     REPORT CORRECT SUBSCRIPT LIMITS IF IN ERROR
   23 NAMUSD=0
      CALL DALONE(-1,LTRINI,LTRUSD,LTRSTR,NUMINI,
     1NUMUSD,NUMSTR,7,NOWSUB,NAMMAX,NAME,NAMUSD)
      IF(NAMUSD.GT.0)WRITE(JTTY,24)(NAME(I),I=1,NAMUSD)
   24 FORMAT(' CORRECT LIMITS ARE ',72A1)
      GO TO 15
C
C     DETERMINE THE NEWLY SELECTED FILE AND RECORD
   25 NEWSIZ=NUMSTR(LRGNUM+1)
      NEWRCD=1
      IDENT=NUMSTR(LRGNUM+4)
      GO TO(26,27,28,29,30,31),IDENT
   26 NEWNAM=3HONE
      GO TO 32
   27 NEWNAM=ITWO(MAJOR)
      GO TO 32
   28 NEWNAM=5HTHREE
      GO TO 32
   29 NEWNAM=IFOUR(MAJOR)
      NEWRCD=MINOR
      GO TO 32
   30 NEWNAM=4HFIVE
      NEWRCD=MINOR
      GO TO 32
   31 NEWNAM=3HSIX
C
C     TEST IF NEED TO WRITE OUT FORMER DATA
   32 IF(LSTRCD.EQ.0)GO TO 36
      IF(LSTRCD.NE.NEWRCD)GO TO 33
      IF(LSTNAM.EQ.NEWNAM)GO TO 41
   33 IF(MODIFY.LE.0)GO TO 35
      WRITE(JTTY,34),LSTRCD
   34 FORMAT(1X,'WRITING RECORD',1I3)
      WRITE(IDSK_#LSTRCD)(AARRAY(I),I=1,LSTSIZ)
   35 IF(MAJOR.EQ.0)GO TO 43
      IF(LSTNAM.EQ.NEWNAM)GO TO 39
      CALL RELEAS(IDSK)
C
C     OPEN NEXT FILE
   36 ENCODE(10,37,IDOUBL)NEWNAM
   37 FORMAT(1A5,5H.DAT )
      WRITE(JTTY,38)IDOUBL,NEWSIZ
   38 FORMAT(1X,'OPENING ',2A5,'SIZE',1I5)
      CALL DEFINE FILE(IDSK,NEWSIZ,IDUMMY,IDOUBL,0,0)
C
C     READ NEW INFORMATION
   39 WRITE(JTTY,40)NEWRCD
   40 FORMAT(1X,'READING RECORD',1I3)
      READ(IDSK_#NEWRCD)(AARRAY(I),I=1,NEWSIZ)
      MODIFY=0
      LSTNAM=NEWNAM
      LSTRCD=NEWRCD
      LSTSIZ=NEWSIZ
C
C     ADVANCE THE SUBSCRIPTS THROUGH THE RANGE
   41 INLOOP=0
      KONTRL=NUMSTR(NUMINI+1)
      LSTKNT=KOUNT
   42 CALL DAROLL(0,1,KNTSUB,INISUB,LMTSUB,
     1INCSUB,INLOOP,NOWSUB)
      IF(INLOOP.EQ.0)GO TO 18
C
C     FIND THE NEWLY SELECTED ITEM IN THE BUFFER
      CALL DASITE(0,KOUNT,1,KNTSUB,NOWSUB,
     1-2,LRGNUM,NUMUSD,NUMSTR,LSTKNT,NUMINI,INITAL,
     2LOCATN)
C
C     CONSTRUCT ALPHAMERIC REPRESENTATION OF ARRAY NAME
      NAMUSD=0
      CALL DALONE(0,LTRINI,LTRUSD,LTRSTR,NUMINI,
     1NUMUSD,NUMSTR,KNTSUB,NOWSUB,NAMMAX,NAME,NAMUSD)
C
C     TYPE CURRENT VALUE AND MODIFY IF REQUESTED.
      CALL DAVARY(KONTRL,ITTY,JTTY,LOCATN,NAMUSD,
     1NAMMAX,MAXBFR,0,-1,8,6,6,
     25,AARRAY,IARRAY,NAME,IBUFFR,LOWBFR,KIND,
     3MODIFY)
      IF(KIND.NE.0)GO TO 42
      GO TO 18
C
C     USER HAS REQUESTED EXIT
   43 STOP
      END
.PAGE
.CENTER
P\\ORTION OF ^DIALOG ^TEXT ^SHOWN ^BELOW ^WHICH ^WAS ^TYPED BY ^USER
.CENTER
------- -- ------ ---- ----- ----- ----- --- ----- -- ----
.SKIP
.FILL
^THE USER TYPED THE FOLLOWING TEXT WHICH IS INCLUDED IN THE DIALOG.
.NOFILL
.SKIP
^Y
1
1
^^B1985(4,4)!END OF 1ST 2K RECORD OF 1ST FILE
.SKIP
3
B1985(4,4)!END OF 3RD 2K RECORD OF 1ST FILE
.SKIP
.SKIP
4
2
B1985(4,4)!END OF 2ND 2K RECORD OF 4TH 6K FILE
D1889(2,4,14!END OF 2ND 2K RECORD OF SINGLE FILE
_&NEXT LINE TESTS ARRAYS WITH WEIRD DIMENSIONS
A901(100);A161(16,1);A161(1,4);A353(/-4)
_&NEXT LINES TEST ABILITY TO CHANGE VALUES
I9()=100/100/400;I46(1)=
_&NOTE THAT I9 IS OCTAL, I46 DECIMAL
100;I48()=200;I48(1)=
.SKIP
_&BLANK RESPONSE KEPT THE ABOVE VALUE FOR I48
B407(,)=2*,2*.023,1K/1/2K;I9(4/1);I46;I48;B407(,)
.SKIP 3
.NOFILL
.CENTER
D\\IALOG ^WITH ^PROGRAM ^USING ^NAMED ^ARRAY ^MANIPULATION ^ROUTINES
.CENTER
------ ---- ------- ----- ----- ----- ------------ --------
.SKIP
.NOFILL
^^DALOAD - END STATEMENT READ
USED STORAGE  632/ 1000 NUMERIC
              348/ 1000 CHARACTER
TYPE ARRAY DESCRIPTION (Y OR N) Y
1000 SECOND(2)
REAL A1(24,4) A97(16,4) A161(16/1,4) A225(16,4/1)
REAL A289(16/1,4/1) A353(-1/-100) A453(6,64) A837(4,4)
REAL A853(4,8) A885(4,4) A901(100/1)
2000 FOURTH(4)
REAL B1 B2(6,6) B38(6,4) B62(8,6) B110(2,12,4) B206(3)
REAL B209(12,6) B281(3,2,6) B317(6,2) B329(6) B335(4,4)
REAL B351(8,4) B383(2,3,4) B407(2,4) B415(2,4,3,4)
REAL B511(2,3) B517(2,2,4) B533(2,12,4) B629(2,15,4)
REAL B749(40,2) B829(2,12,2) B877(12,4,2) B973(7,4,2)
REAL B1029(13,20) B1289(8,4) B1321(8,20) B1481(6) B1487(10)
REAL B1497(4,4) B1513(2,6) B1525(4,4) B1541(5,4,4)
REAL B1621(20) B1641(4,4) B1657(10,4) B1697(2,12,3,4)
REAL B1985(4,4)
250 FIRST(1)
REAL C1(10) C11(10) C21(30) C51(8) C59(2,4) C67(3,3,2)
REAL C85(2,4) C93(3,3,3,2) C147(4,2,4) C179(3,2,4,2)
REAL C227(2,3,4)
2000 FIFTH(5)
REAL D1(3,3) D10(14,4) D66(4,3) D78(4,22) D166(2,3,6)
REAL D202(2,4) D210(3,4) D222(4) D226(4,3) D238(5)
REAL D243(31,18) D801(2,2,4,8) D929(4,3,2,16)
REAL D1313(3,4,3,16) D1889(2,4,14)
50 THIRD(3)
OCTAL I1(4,2) I9(4) I13(25)
INTEGER I38(2,4) I46 I47(5/5) I48(1) I49(2)
50 SIXTH(6)
INTEGER J1(4,4,2) J33(18)
GLOBAL NUMBER 1
LOCAL NUMBER 1
ARRAY NAME B1985(4,4)!END OF 1ST 2K RECORD OF 1ST FILE
OPENING FOUR1.DAT SIZE 2000
READING RECORD  1
B1985(4,4) = 2000
ARRAY NAME
LOCAL NUMBER 3
ARRAY NAME B1985(4,4)!END OF 3RD 2K RECORD OF 1ST FILE
READING RECORD  3
B1985(4,4) = 6000
ARRAY NAME
LOCAL NUMBER
GLOBAL NUMBER 4
LOCAL NUMBER 2
ARRAY NAME B1985(4,4)!END OF 2ND 2K RECORD OF 4TH 6K FILE
OPENING FOUR4.DAT SIZE 2000
READING RECORD  2
B1985(4,4) = 22000
ARRAY NAME D1889(2,4,14!END OF 2ND 2K RECORD OF SINGLE FILE
OPENING FIVE .DAT SIZE 2000
READING RECORD  2
D1889(2,4,14) = 4000
ARRAY NAME _&NEXT LINE TESTS ARRAYS WITH WEIRD DIMENSIONS
ARRAY NAME A901(100);A161(16,1);A161(1,4);A353(/-4)
OPENING TWO4 .DAT SIZE 1000
READING RECORD  1
A901(100) = 3901
A161(16,1) = 3161
A161(1,4) = 3224
A353(-1) = 3353
A353(-2) = 3354
A353(-3) = 3355
A353(-4) = 3356
ARRAY NAME _&NEXT LINES TEST ABILITY TO CHANGE VALUES
ARRAY NAME I9()=100/100/400;I46(1)=
OPENING THREE.DAT SIZE   50
READING RECORD  1
I9(1) = 11 = 100
I9(2) = 12 = 200
I9(3) = 13 = 300
I9(4) = 14 = 400
I46 = 46 = _&NOTE THAT I9 IS OCTAL, I46 DECIMAL
I46 = 46 = 100;I48()=200;I48(1)=
I48(1) = 48 = 200
I48(1) = 200 =
ARRAY NAME _&BLANK RESPONSE KEPT THE ABOVE VALUE FOR I48
ARRAY NAME B407(,)=2*,2*.023,1K/1/2K;I9(4/1);I46;I48;B407(,)
WRITING RECORD  1
OPENING FOUR4.DAT SIZE 2000
READING RECORD  2
B407(1,2) = 20409 = .023
B407(2,2) = 20410 = .023
B407(1,3) = 20411 = 1000
B407(2,3) = 20412 = 1001
B407(1,4) = 20413 = 1002
B407(2,4) = 20414 = 1003
WRITING RECORD  2
OPENING THREE.DAT SIZE   50
READING RECORD  1
I9(4) = 400
I9(3) = 300
I9(2) = 200
I9(1) = 100
I46 = 100
I48(1) = 200
OPENING FOUR4.DAT SIZE 2000
READING RECORD  2
B407(1,1) = 20407
B407(2,1) = 20408
B407(1,2) = .023
B407(2,2) = .023
B407(1,3) = 1000
B407(2,3) = 1001
B407(1,4) = 1002
B407(2,4) = 1003
.SUBTITLE ^^DALONE, R\\OUTINE TO ^REPRESENT ^ARRAY ^NAME AND ^SUBSCRIPT ^LIMITS
.LEFT MARGIN 0
.PAGE
.NOFILL
 ^^DDDDD          AAA  LL         OOOOO    NN    NN  EEEEEEEE
 DD   DD       AAAA  LL        OO   OO   NNN   NN  EE
 DD    DD     AA AA  LL       OO     OO  NNNN  NN  EE
 DD    DD    AA  AA  LL       OO     OO  NN NN NN  EEEEE
 DD    DD   AAAAAAA  LL       OO     OO  NN  NNNN  EE
 DD   DD   AA    AA  LL        OO   OO   NN   NNN  EE
 DDDDD    AA     AA  LLLLLLLL   OOOOO    NN    NN  EEEEEEEE
.SKIP 3
.FILL
.CENTER
DALONE, R\\OUTINE TO ^REPRESENT ^ARRAY ^NAME AND ^SUBSCRIPT ^LIMITS
.CENTER
------##------- -- --------- ----- ---- --- --------- ------
.SKIP
^^DALOAN \\REPRESENTS THE NAME OF AN ARRAY CONTAINED IN THE
DICTIONARY CONSTRUCTED BY THE ^^DALOAD \\ROUTINE AND ALSO REPRESENTS
THE SUBSCRIPTS OF THIS ARRAY SO THAT THE NAME AND SUBSCRIPTS CAN BE
WRITTEN BY THE CALLING PROGRAM WITH A ^^FORTRAN \\FORMAT STATEMENT
CONTAINING A MULTIPLE OF AN ^A1 ALPHAMERIC SPECIFICATION.
.SKIP
^^DALONE \\IS USED ALONG WITH SEVERAL OTHER ROUTINES IN THE ^^FASP
\\PACKAGE FOR THE PURPOSE OF SPECIFYING BY NAME, EXAMINING AND
MODIFYING THE VALUES OF MULTIPLY SUBSCRIPTED ARRAYS EQUIVALENCED
WITH OR OTHERWISE LOADED INTO A SINGLY SUBSCRIPTED BUFFER. ^THE
INTERACTION BETWEEN THESE ROUTINES IS DESCRIBED AT THE START OF THE
^^DALOAD \\DOCUMENTATION. ^THE SAMPLE PROGRAM AT THE END OF THE
^^DALOAD \\DOCUMENTATION ILLUSTRATES THE USE OF MOST OF THESE
ROUTINES.
.SKIP 3
.TEST PAGE 7
.CENTER
^THE ^^DALONE A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DALONE \I\S
.SKIP
.NOFILL
      SUBROUTINE DALONE(LMTTYP,LTRINI,LTRUSD,LTRSTR,NUMINI,
     1    NUMUSD,NUMSTR,KNTSUB,NOWSUB,NAMMAX,NAME  ,NAMUSD)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION LTRSTR(LTRUSD),NUMSTR(NUMUSD),
     1NAME(NAMMAX),NOWSUB(KNTSUB)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED ONLY FOR INPUT AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LMTTYP#=#-2, \\THE CHARACTERS PLACED INTO THE ^^NAME \\ARRAY ARE
TO INCLUDE
.SKIP
.LEFT MARGIN 14
.INDENT -3
A.#AN IDENTIFICATION OF THE DATA TYPE ASSOCIATED WITH THE NAME OF
THE ARRAY. ^THIS WILL BE ONE OF THE WORDS ^^OCTAL, INTEGER \O\R
REAL. I\\F THE ITEM BEING REPRESENTED IS INSTEAD THE NAME AND/OR
SUBSCRIPT LIMITS ASSOCIATED WITH AN ENTIRE LOGICAL GROUP OF ARRAY
NAMES, THEN THE NUMBER OF LOCATIONS REQUIRED IN A SINGLY SUBSCRIPTED
BUFFER TO CONTAIN THE ENTIRE GROUP OF ARRAYS IS REPRESENTED RATHER
THAN THE DATA TYPE.
.SKIP
.INDENT -3
B.#THE NAME OF THE ARRAY OR OF THE LOGICAL GROUP OF ARRAYS.
.SKIP
.INDENT -3
C.#WITHIN PARENTHESES, THE SUBSCRIPT LIMITS STORED IN THE DICTIONARY
FOR THIS PARTICULAR ARRAY OR FOR THIS LOGICAL GROUP OF ARRAYS. ^WHEN
SUCH INFORMATION IS INCLUDED WITH THE NAME OF A LOGICAL GROUP OF
ARRAYS, IT IS MEANT TO BE SEARCHED FOR BY THE ^^DABASE \\ROUTINE,
RATHER THAN TO INDICATE SUBSCRIPT LIMITS.
.SKIP
.LEFT MARGIN 9
.INDENT -2
=#-1, SAME AS ^^LMTTYP=-2, \\EXCEPT THAT THE ASSOCIATED DATA TYPE OR
BUFFER SIZE IS NOT IDENTIFIED.
.INDENT -2
=#0, THE REPRESENTATION IS TO INCLUDE THE NAME OF THE ARRAY AND,
ENCLOSED IN PARENTHESES, THE VALUES OF THE CURRENT SUBSCRIPTS
CONTAINED IN THE ^^NOWSUB \\ARRAY. ^IF THE DICTIONARY INDICATES THAT
THE ARRAY IS NOT DIMENSIONED, THEN NO SUBSCRIPTS WILL FOLLOW THE
NAME EVEN IF ONE OR MORE SUBSCRIPTS ARE CONTAINED IN THE ^^NOWSUB
\\ARRAY.
.INDENT -2
=#GREATER THAN ZERO, THE VALUE OF ^^LMTTYP \\IS TO BE ENCLOSED IN
PARENTHESES FOLLOWING THE ARRAY NAME. ^THE SUBSCRIPT RANGES
INDICATED BY THE DICTIONARY, AND THE VALUES OF THE CURRENT
SUBSCRIPTS CONTAINED IN THE ^^NOWSUB \\ARRAY, ARE IGNORED. ^THE
VALUE OF ^^LMTTYP \\IS REPRESENTED EVEN IF THE DICTIONARY INDICATES
THAT THE NAME IS NOT DIMENSIONED.
.SKIP
.INDENT -9
^^LTRINI#=#\\SUBSCRIPT OF THE ^^LTRSTR \\ARRAY LOCATION CONTAINING
THE FIRST CHARACTER TO BE INCLUDED IN THE NAME OF THE ARRAY OR IN
THE NAME OF THE LOGICAL GROUP OF ARRAYS.
.SKIP
.INDENT -9
^^LTRUSD#=#\\HIGHEST SUBSCRIPT OF ANY LOCATION IN THE ^^LTRSTR
\\ARRAY USED FOR THE STORAGE OF A CHARACTER OF THE NAME OF ANY ARRAY.
.SKIP
.INDENT -9
^^LTRSTR#=#\\ARRAY CONTAINING THE CHARACTERS OF THE ARRAY NAMES IN
THE DICTIONARY, 1 CHARACTER PER ARRAY LOCATION AS READ BY A MULTIPLE
OF AN ^A1 FORMAT OR AS DEFINED BY SEVERAL 1^H FIELDS.
.SKIP
.INDENT -9
^^NUMINI#=#\\SUBSCRIPT OF THE ^^NUMSTR \\ARRAY LOCATION CONTAINING
THE FIRST OF THE NUMERIC INFORMATION ASSOCIATED WITH THE NAME OF THE
ARRAY OR WITH THE NAME OF THE LOGICAL GROUP OF ARRAYS.
.SKIP
.INDENT -9
^^NUMUSD#=#\\HIGHEST SUBSCRIPT OF ANY LOCATION USED IN THE ^^NUMSTR
\\ARRAY TO HOLD NUMERIC INFORMATION ASSOCIATED WITH ANY NAME IN THE
DICTIONARY.
.SKIP
.INDENT -9
^^NUMSTR#=#\\ARRAY CONTAINING THE NUMERIC INFORMATION CORRESPONDING
TO THE NAMES STORED IN THE ^^LTRSTR \\ARRAY. ^THE CONSTRUCTION OF
THE ^^NUMSTR \\ARRAY IS DESCRIBED IN DETAIL IN THE ^^DALOAD
\\DOCUMENTATION. ^FOR EACH NAME IN THE DICTIONARY, THE ^^NUMSTR
\\ARRAY CONTAINS
.SKIP
.LEFT MARGIN 14
.INDENT -3
A.#THE NUMBER OF CHARACTERS IN THE NAME
.SKIP
.INDENT -3
B.#AN INDICATION OF THE ASSOCIATED DATA TYPE
.SKIP
.INDENT -3
C.#THE NUMBER OF SUBSCRIPT RANGES
.SKIP
.INDENT -3
D.#PAIRS OF STARTING AND ENDING VALUES OF THESE RANGES.
.SKIP
.LEFT MARGIN 9
^IF THE NUMBER OF CHARACTERS IS INSTEAD ZERO OR NEGATIVE, THEN ITS
ABSOLUTE VALUE IS THE NUMBER OF CHARACTERS IN THE NAME OF A LOGICAL
GROUP OF NAMES, AND THE NEXT LOCATION, RATHER THAN INDICATING THE
DATA TYPE, CONTAINS THE NUMBER OF LOCATIONS WITHIN A SINGLY
SUBSCRIPTED BUFFER WHICH WOULD BE NEEDED TO STORE THE VALUES OF THE
MULTIPLY SUBSCRIPTED ARRAYS WHICH ARE WITHIN THE LOGICAL GROUP AND
EQUIVALENCED WITH OR OTHERWISE LOADED INTO SUCH A SINGLY SUBSCRIPTED
BUFFER.
.SKIP
.INDENT -9
^^KNTSUB#=#\\THE NUMBER OF CURRENT SUBSCRIPTS CONTAINED IN THE
^^NOWSUB \\ARRAY.
.SKIP
.INDENT -9
^^NOWSUB#=#\\ARRAY CONTAINING IN LOCATIONS ^^NOWSUB(1) \\THROUGH AND
INCLUDING ^^NOWSUB(KNTSUB) \\THE CURRENT VALUES OF THE SUBSCRIPTS OF
THE ARRAY BEING REPRESENTED. ^THIS IS USED ONLY IF ^^LMTTYP=0.
.SKIP
.INDENT -9
NAMMAX#=#\\HIGHEST SUBSCRIPT OF ANY LOCATION IN THE ^^NAME \\ARRAY
WHICH CAN BE USED FOR THE STORAGE OF CHARACTERS BY THIS ROUTINE.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED FOR BOTH INPUT TO THIS ROUTINE AND
FOR OUTPUT TO THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^NAME###=#\\THE ARRAY INTO WHICH THE REPRESENTATION OF THE ARRAY
NAME AND ITS SUBSCRIPTS IS TO BE PLACED SO THAT IT CAN BE WRITTEN BY
THE CALLING PROGRAM USING A MULTIPLE OF AN ^A1 FORMAT. ^THE
LOCATIONS WHICH CAN BE USED FOR THIS PURPOSE INCLUDE
^^NAME(NAMUSD+1) \\THROUGH ^^NAME(NAMMAX).
.SKIP
.INDENT -9
NAMUSD#=#\\INPUT CONTAINING THE HIGHEST SUBSCRIPT OF ANY LOCATION IN
THE ^^NAME \\ARRAY WHICH MUST BE PRESERVED. ^THE REPRESENTATION OF
THE ARRAY NAME AND ITS SUBSCRIPTS IS PLACED IN THE ^^NAME \\ARRAY
LOCATIONS HAVING SUBSCRIPTS ABOVE THE INPUT VALUE OF ^^NAMUSD.
.INDENT -2
=#\\RETURNED CONTAINING THE HIGHEST SUBSCRIPT OF A LOCATION IN THE
^^NAME \\ARRAY INTO WHICH THIS ROUTINE HAS PLACED A CHARACTER OF THE
REPRESENTATION OF THE ARRAY NAME AND ITS SUBSCRIPTS. ^IF THE NUMBER
OF LOCATIONS REMAINING IN THE ^^NAME \\ARRAY WAS INSUFFICIENT TO
HOLD THE REPRESENTATION OF THE ARRAY NAME AND ITS SUBSCRIPTS, OR IF
FOR ANY OTHER REASON THE REPRESENTATION COULD NOT BE GENERATED, THEN
^^NAMUSD \\IS RETURNED UNCHANGED.
.SUBTITLE ^^DALOOP, V\\ARIABLY ^EMBEDDED ^^DO L\\OOP ^SIMULATOR
.PAGE
.LEFT MARGIN 0
.RIGHT MARGIN 60
.NOFILL
^^DDDDDD         AAAA  LL        OOOOO      OOOOO    PPPPPP
DD    DD      AA AA  LL       OO   OO    OO   OO   PP    PP
DD     DD    AA  AA  LL      OO     OO  OO     OO  PP     PP
DD     DD   AA   AA  LL      OO     OO  OO     OO  PP    PP
DD     DD  AAAAAAAA  LL      OO     OO  OO     OO  PPPPPP
DD    DD  AA     AA  LL       OO   OO    OO   OO   PP
DDDDDD   AA      AA  LLLLLLLL  OOOOO      OOOOO    PP
.SKIP 3
.FILL
.CENTER
DALOOP, V\\ARIABLY ^EMBEDDED ^^DO L\\OOP ^SIMULATOR
.CENTER
------##-------- -------- -- ---- ---------
.SKIP
^^DALOOP \\SIMULATES ANY NUMBER OF VARIABLY EMBEDDED ^D^O LOOPS
WHICH HAVE THE SAME STATEMENTS WITHIN THEIR RANGES. ^THE ORDER IN
WHICH THE LOOP INDEXES ARE VARIED IS SPECIFIED BY THE CALLING
PROGRAM, BUT CAN NOT BE CHANGED WHILE THE STATEMENTS WITHIN THE
RANGE OF THE LOOPS ARE BEING EXECUTED. ^THE INDEX OF EACH LOOP HAS
ITS OWN INITIAL AND FINAL VALUES, AND ITS OWN INCREMENT BY WHICH IT
VARIES BETWEEN THESE LIMITS. ^THE FINAL VALUE CAN BE LESS THAN,
EQUAL TO, OR GREATER THAN THE INITIAL VALUE.
.SKIP
^^DALOOP \\IS CALLED AT THE START OF EACH EXECUTION OF THE
STATEMENTS WITHIN THE LOOP STRUCTURE TO DEFINE THE ARRAY NAMED
^^NOWSUB \\WHICH CONTAINS THE CURRENT VALUES OF THE LOOP INDEXES.
^THE ARGUMENT NAMED ^^INLOOP \\MUST BE SET TO ZERO BY THE CALLING
PROGRAM BEFORE ^^DALOOP \\IS FIRST CALLED. ^^DALOOP \\RETURNS
^^INLOOP \\NONZERO UNTIL THE OUTERMOST LOOP HAS BEEN COMPLETED. ^AS
AN EXAMPLE OF THE USE OF ^^DALOOP, \\IF THE ORDER SPECIFICATION
ARRAY NAMED ^^NXTSUB \\CONTAINS THE VALUES 1, 2, 3 AND 4 IN
LOCATIONS HAVING THE SUBSCRIPTS 5 (^^LOWSUB) \\THROUGH 8 (^^KNTSUB),
\\AND IF THE LOOP WITH THE INDEX VARYING THE MOST RAPIDLY (THE
INNERMOST LOOP) IS SELECTED BY THE LARGEST VALUE WITHIN THE ^^NXTSUB
\\ARRAY, THEN THE STATEMENTS
.SKIP
.NOFILL
.LEFT MARGIN 5
.TEST PAGE 11
      ^^INLOOP=0
    1 CALL DALOOP(1,5,8,INISUB,LMTSUB,
     1INCSUB,NXTSUB,INLOOP,NOWSUB)
      IF(INLOOP.EQ.0)GO TO 2
           *
           *
      \\TEXT TO BE EXECUTED WITHIN THE LOOP STRUCTURE
           *
           *
      ^^GO TO 1
    2 CONTINUE
.LEFT MARGIN 0
.SKIP
\\WOULD SIMULATE THE CORRESPONDING ^D^O LOOP STRUCTURE
.LEFT MARGIN 5
.SKIP
.TEST PAGE 10
      ^^DO 2 NOWSUB(5)=INISUB(5),LMTSUB(5),INCSUB(5)
      DO 2 NOWSUB(6)=INISUB(6),LMTSUB(6),INCSUB(6)
      DO 2 NOWSUB(7)=INISUB(7),LMTSUB(7),INCSUB(7)
      DO 2 NOWSUB(8)=INISUB(8),LMTSUB(8),INCSUB(8)
           *
           *
      \\TEXT TO BE EXECUTED WITHIN THE LOOP STRUCTURE
           *
           *
    2 ^^CONTINUE
.SKIP
.FILL
.LEFT MARGIN 0
H\\OWEVER, MERELY BY CHANGING THE CONTENTS OF THE ^^NXTSUB \\ARRAY
TO 3, 1, 4 AND 2, THE ORDER OF THE SIMULATED ^D^O LOOPS WOULD BECOME
.SKIP
.NOFILL
.LEFT MARGIN 5
.TEST PAGE 10
      ^^DO 2 NOWSUB(6)=INISUB(6),LMTSUB(6),INCSUB(6)
      DO 2 NOWSUB(8)=INISUB(8),LMTSUB(8),INCSUB(8)
      DO 2 NOWSUB(5)=INISUB(5),LMTSUB(5),INCSUB(5)
      DO 2 NOWSUB(7)=INISUB(7),LMTSUB(7),INCSUB(7)
           *
           *
      \\TEXT TO BE EXECUTED WITHIN THE LOOP STRUCTURE
           *
           *
    2 ^^CONTINUE
.FILL
.LEFT MARGIN 0
.SKIP
A \\SIMPLER VERSION OF ^^DALOOP \\IS ALSO PROVIDED WHICH BASES THE
ORDER OF THE EMBEDDED LOOPS STRICTLY UPON THE RELATIVE VALUES OF THE
SUBSCRIPTS OF THE ARRAY LOCATIONS CONTAINING THE LOOP DESCRIPTIONS.
^THIS SIMPLER VERSION, NAMED ^^DAROLL, \\IS MEANT FOR USE WHEN THE
ORDER OF THE EMBEDDED LOOPS IS NOT SUBJECT TO CHANGE DURING
EXECUTION OF THE PROGRAM.
.PAGE
.TEST PAGE 7
.CENTER
^THE ^^DALOOP \\AND ^^DAROLL A\\RGUMENT ^LISTS
.CENTER
--- ------ --- ------ -------- -----
.SKIP
^THE ARGUMENT LISTS OF ROUTINES ^^DALOOP \\AND ^^DAROLL \\ARE
.SKIP
.NOFILL
      ^^SUBROUTINE DALOOP(IRAPID,LOWSUB,KNTSUB,INISUB,LMTSUB,
     1    INCSUB,NXTSUB,INLOOP,NOWSUB)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION INISUB(KNTSUB),LMTSUB(KNTSUB),
     1INCSUB(KNTSUB),NXTSUB(KNTSUB),NOWSUB(KNTSUB)
.SKIP
\\AND
.SKIP
      ^^SUBROUTINE DAROLL(IRAPID,LOWSUB,KNTSUB,INISUB,LMTSUB,
     1    INCSUB,INLOOP,NOWSUB)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION INISUB(KNTSUB),LMTSUB(KNTSUB),
     1INCSUB(KNTSUB),NOWSUB(KNTSUB)
.SKIP
.FILL
T\\HE ARGUMENT LISTS OF THE 2 ROUTINES ARE IDENTICAL EXCEPT THAT THE
^^DALOOP \\ARGUMENT ^^NXTSUB \\DOES NOT APPEAR IN THE ^^DAROLL
\\ARGUMENT LIST. ^SINCE THE ^^NXTSUB \\ARRAY DICTATES THE ORDER OF
THE EMBEDDED LOOPS FOR ROUTINE ^^DALOOP, \\THE DEFINITION OF THE
ARGUMENT ^^IRAPID \\IS SOMEWHAT DIFFERENT FOR THE 2 ROUTINES. ^THE
DEFINITIONS OF THE REMAINING ARGUMENTS ARE IDENTICAL FOR THE 2
ROUTINES.
.SKIP
^THE FOLLOWING ARGUMENTS ARE USED AS INPUT AND ARE RETURNED
UNCHANGED. (^UNDER CIRCUMSTANCES DESCRIBED BELOW, THE CONTENTS OF
THE ^^INCSUB \\ARRAY CAN BE RETURNED CHANGED SLIGHTLY.) ^THE
CONTENTS OF THESE ARGUMENTS MUST NOT BE CHANGED BY THE CALLING
PROGRAM UNTIL THE OUTERMOST LOOP HAS BEEN COMPLETED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IRAPID#=#0 \\FOR ROUTINE ^^DALOOP, \\THE INNERMOST LOOP (THE LOOP
HAVING THE INDEX WHICH IS VARIED THE MOST RAPIDLY) IS THAT WITH THE
SMALLEST VALUE IN THE ^^NXTSUB \\ARRAY.
.INDENT -2
=#1 FOR ROUTINE ^^DALOOP, \\THE INNERMOST LOOP IS THAT WITH THE
LARGEST VALUE IN THE ^^NXTSUB \\ARRAY.
.SKIP
.INDENT -2
=#0 FOR ROUTINE ^^DAROLL, \\THE INNERMOST LOOP IS THAT REPRESENTED
BY THE CONTENTS OF ^^INISUB(LOWSUB), LMTSUB(LOWSUB), INCSUB(LOWSUB)
\\AND ^^NOWSUB(LOWSUB). T\\HE LOOPS REPRESENTED BY THE VALUES IN THE
ARRAY LOCATIONS HAVING HIGHER SUBSCRIPTS ARE PERFORMED LESS RAPIDLY
THAN THOSE HAVING LOWER SUBSCRIPTS.
.INDENT -2
=#1 FOR ROUTINE ^^DAROLL, \\THE INNERMOST LOOP IS THAT REPRESENTED
BY THE CONTENTS OF ^^INISUB(KNTSUB), LMTSUB(KNTSUB), INCSUB(KNTSUB)
\\AND ^^NOWSUB(KNTSUB). T\\HE LOOPS REPRESENTED BY THE VALUES IN THE
ARRAY LOCATIONS HAVING LOWER SUBSCRIPTS ARE PERFORMED LESS RAPIDLY
THAN THOSE HAVING HIGHER SUBSCRIPTS.
.SKIP
.INDENT -9
^^LOWSUB#=#\\THE LOWEST SUBSCRIPT OF THE ARRAYS WHICH ARE TO BE USED
AS THE LOOP DESCRIPTORS. ^THE PORTIONS, IF ANY, OF THE ARRAYS BELOW
SUBSCRIPT ^^LOWSUB \\AND ABOVE SUBSCRIPT ^^KNTSUB \\ARE IGNORED BY
THIS ROUTINE AND ARE RETURNED UNCHANGED. ^A TOTAL OF
^^KNTSUB-LOWSUB+1 \\LOOPS WILL BE SIMULATED BY THIS ROUTINE. ^IF
^^I=LOWSUB+N-1, \\THEN THE ^NTH LOOP IS DESCRIBED BY THE CONTENTS OF
^^INISUB(I), LMTSUB(I) \\AND ^^INCSUB(I), \\ITS ORDER RELATIVE TO
THE REST OF THE LOOPS IS SPECIFIED BY ^^NXTSUB(I), \\AND ITS CURRENT
SUBSCRIPT IS RETURNED BY THIS ROUTINE IN ^^NOWSUB(I).
.SKIP
.INDENT -9
KNTSUB#=#\\THE HIGHEST SUBSCRIPT OF THE ARRAYS WHICH ARE TO BE USED
AS THE LOOP DESCRIPTORS. ^^KNTSUB \\MUST BE GREATER THAN OR EQUAL TO
^^LOWSUB.
.SKIP
.INDENT -9
INISUB#=#\\ARRAY CONTAINING THE STARTING VALUES OF THE INDIVIDUAL
LOOP INDEXES.
.SKIP
.INDENT -9
^^LMTSUB#=#\\ARRAY CONTAINING ENDING VALUES OF THE INDIVIDUAL LOOP
INDEXES. ^AN INDIVIDUAL ITEM IN THE ^^LMTSUB \\ARRAY CAN BE EITHER
LESS THAN, EQUAL TO, OR GREATER THAN THE CORRESPONDING ITEM IN THE
^^INISUB \\ARRAY.
.SKIP
.INDENT -9
^^INCSUB#=#\\ARRAY CONTAINING THE INCREMENTS BY WHICH THE INDEXES
RETURNED IN THE ^^NOWSUB \\ARRAY ARE VARIED BETWEEN THE STARTING
VALUES IN THE ^^INISUB \\ARRAY, AND THE ENDING VALUES IN THE
^^LMTSUB \\ARRAY. ^IF AN INCREMENT IS ZERO, ITS VALUE IN THE ARRAY
IS CHANGED TO 1. ^IF AN INCREMENT HAS THE WRONG SIGN, ITS SIGN IN
THE ARRAY IS CHANGED.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED AS AN INPUT TO THE ^^DALOOP
\\ROUTINE, THEN IS RETURNED CHANGED FOR USE BY SUBSEQUENT ^^DALOOP
\\CALLS. ^THE CONTENTS OF THIS ARRAY FROM SUBSCRIPTS ^^LOWSUB
\\THROUGH ^^KNTSUB \\MUST NOT BE CHANGED BY THE CALLING PROGRAM
UNTIL THE OUTERMOST LOOP HAS BEEN COMPLETED. ^THIS ARGUMENT DOES NOT
APPEAR IN THE ^^DAROLL \\ARGUMENT LIST.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^NXTSUB#=#\\ARRAY SET BY THE CALLING PROGRAM BEFORE THE INITIAL
CALL TO ^^DALOOP \\TO CONTROL THE ORDER OF THE EMBEDDED LOOPS.
^^DALOOP \\WILL RETURN ^^NXTSUB \\AS AN ARRAY CONTAINING POINTERS
FOR USE BY SUBSEQUENT CALLS TO ^^DALOOP. T\\HE ORIGINAL CONTENTS OF
THE ^^NXTSUB \\ARRAY ARE SORTED TO DETERMINE THE ORDER OF THE
POINTERS, BUT THE ORIGINAL CONTENTS ARE DESTROYED AFTER BEING USED.
^THE RETURNED VALUES MUST NOT BE ALTERED BY THE CALLING PROGRAM.
.SKIP
^THE ORIGINAL CONTENTS COULD, BUT NEED NOT, EQUAL THE SUBSCRIPTS OF
THE LOOPS. ^ONLY THE RELATIVE SIZES OF THE ORIGINAL CONTENTS OF THE
^^NXTSUB \\ARRAY ARE USED AND ALL OF THE NUMBERS FROM LARGEST TO
SMALLEST NEED NOT BE REPRESENTED (I.E., THE ORDER OF THE EMBEDDED
LOOPS IS NOT CHANGED IF THE SAME OFFSET IS ADDED TO EACH OF THE
ORIGINAL VALUES IN THE ^^NXTSUB \\ARRAY AND THE DIFFERENCE BETWEEN
THE LARGEST AND SMALLEST NUMBERS IN THE ^^NXTSUB \\ARRAY CAN BE
GREATER THAN THE NUMBER OF EMBEDDED LOOPS).
.SKIP
^IF ^^IRAPID \\IS ZERO, THEN THE LOOPS CORRESPONDING TO THE SMALLER
ORIGINAL VALUES IN THE ^^NXTSUB \\ARRAY WILL BE DONE THE MOST
RAPIDLY. ^IF ^^IRAPID \\IS 1, THEN THE LOOPS CORRESPONDING TO THE
LARGER ORIGINAL VALUES IN THE ^^NXTSUB \\ARRAY WILL BE DONE THE MOST
RAPIDLY. ^LOOPS WHICH HAVE IDENTICAL ORIGINAL VALUES WITHIN THE
^^NXTSUB \\ARRAY ARE PERFORMED AS A SINGLE UNIT, A SINGLE CALL TO
^^DALOOP \\ADVANCING THE ^^NOWSUB \\ARRAY VALUES FOR ALL MEMBERS OF
THE GROUP UNTIL THE ^^NOWSUB \\ARRAY VALUE OF ANY MEMBER OF THE
GROUP EXCEEDS ITS OWN CORRESPONDING ^^LMTSUB \\ARRAY VALUE.
.SKIP
^WHEN ^^DALOOP \\FINALLY SIGNALS THAT ALL LOOPS HAVE BEEN COMPLETED,
BY RETURNING ^^INLOOP=0, \\IT WILL ALSO ATTEMPT TO RESTORE THE
ORIGINAL VALUES OF THE ^^NXTSUB \\ARRAY, MAKING THE ASSUMPTION THAT
THE SMALLEST VALUE IN THE RANGE ^^NXTSUB(LOWSUB) \\THROUGH
^^NXTSUB(KNTSUB) \\HAS THE VALUE ^^LOWSUB, \\AND THAT THE VALUES ARE
THEN INCREMENTED BY 1. ^THE RELATIVE ORDER WITHIN THE USED PORTION
OF THE ^^NXTSUB \\ARRAY WILL BE RETURNED CORRECT, BUT IF THE
ASSUMPTIONS ARE NOT CORRECT, THEN THE ORDER WILL BE INCORRECT
RELATIVE TO THAT OF THE UNUSED PORTION, IF ANY, OF THE ^^NXTSUB
\\ARRAY.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED AS INPUT, THEN IS RETURNED CHANGED
FOR USE BY BOTH THE CALLING PROGRAM AND BY SUBSEQUENT CALLS TO THIS
ROUTINE. ^THE CONTENTS OF THIS ARGUMENT MUST NOT BE CHANGED BY THE
CALLING PROGRAM UNTIL THE OUTERMOST LOOP HAS BEEN COMPLETED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^INLOOP#=#\\MUST BE SET TO ZERO BEFORE THE INITIAL CALL TO THIS
ROUTINE. ^THIS INITIAL CALL WILL SET ^^INLOOP \\NONZERO, AND WILL
COPY THE ^^INISUB \\ARRAY INTO THE ^^NOWSUB \\ARRAY FOR USE AS THE
INITIAL LOOP INDEXES. ^EACH SUBSEQUENT CALL TO THIS ROUTINE WILL
EITHER LOAD THE INDEXES FOR THE NEXT SET OF LOOPS INTO THE ^^NOWSUB
\\ARRAY OR WILL SET ^^INLOOP \\TO ZERO IF THE OUTERMOST LOOP HAS
BEEN COMPLETED.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS RETURNED CHANGED FOR USE BY BOTH THE
CALLING PROGRAM AND BY SUBSEQUENT CALLS TO THIS ROUTINE. ^THE
ORIGINAL CONTENTS ARE IGNORED. ^THE CONTENTS OF THIS ARGUMENT MUST
NOT BE CHANGED BY THE CALLING PROGRAM UNTIL THE OUTERMOST LOOP HAS
BEEN COMPLETED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^NOWSUB#=#\\ARRAY RETURNED CONTAINING THE INDEXES FOR THE CURRENT
LOOP STRUCTURE. ^THE CONTENTS OF ^^NOWSUB(LOWSUB) \\THROUGH
^^NOWSUB(KNTSUB) \\ARE USED IN THE SAME MANNER AS THE INDEXES OF
^^FORTRAN DO \\LOOPS. ^THE VALUES UPON INPUT TO THE INITIAL CALL TO
THIS ROUTINE ARE IGNORED.
.SKIP 3
.LEFT MARGIN 0
.CENTER
^CONTENTS OF ^^NXTSUB A\\RRAY ^AFTER ^FIRST ^^DALOOP EXECUTION
.CENTER
-------- -- ------ ----- ----- ----- ------ ---------
.SKIP
T\\O PREVENT UNNECESSARY SEARCHING BY SUBSEQUENT CALLS TO ^^DALOOP
\\OF THE ^^NXTSUB \\ARRAY WHICH ORIGINALLY CONTAINS VALUES
INDICATING THE LOOP ORDER, THE FIRST CALL TO ^^DALOOP \\CONVERTS THE
VALUES IN THIS ARRAY INTO POINTERS. ^THE FIRST LOCATION IN THE USED
PORTION OF THE ^^NXTSUB \\ARRAY AFTER ITS CONVERSION TO A POINTER
ARRAY CONTAINS THE SUBSCRIPT OF THE INDEX WHICH IS BEING VARIED THE
MOST RAPIDLY. ^IF ADDITIONAL INDEXES ARE BEING VARIED AT THE SAME
RATE, THEN THE SECOND LOCATION IN THE POINTER ARRAY WILL CONTAIN THE
SUM OF THE SUBSCRIPT OF THE INDEX BEING VARIED AT THE SAME RATE AND
THE TOTAL NUMBER OF ALL INDEXES SO THAT THE SUM IS GREATER THAN THE
MAXIMUM POSSIBLE SUBSCRIPT. ^SCANNING FROM LEFT TO RIGHT, THE NEXT
LOCATION IN THE POINTER ARRAY WHICH CONTAINS A VALUE LESS THAN OR
EQUAL TO THE MAXIMUM SUBSCRIPT OF AN INDEX WILL POINT TO THE INDEX
BEING VARIED THE NEXT MOST RAPIDLY.
.SKIP
^FOR EXAMPLE, IF THE INITIAL CONTENTS OF THE ^^NXTSUB \\ARRAY ARE
.SKIP
.INDENT 5
1, 2, 3, 2, 3, 4, 3, 4, 5
.SKIP
MEANING (IF SMALLEST NUMBER INDICATES INNERMOST LOOP) THAT THE FIRST
INDEX IS VARIED MOST RAPIDLY, THE SECOND AND FOURTH ARE VARIED NEXT
MOST RAPIDLY, AND SO ON THROUGH THE NINTH WHICH IS VARIED THE LEAST
RAPIDLY, AND IF ^^LOWSUB \\IS 1, THEN THE CONTENTS OF THE ^^NXTSUB
\\ARRAY AFTER CONVERSION TO POINTERS ARE
.SKIP
.INDENT 5
1, 2, (4+9)=13, 3, (5+9)=14, (7+9)=16, 6, (8+9)=17, 9
.SKIP
.SUBTITLE ^^DAMOVE, J\\USTIFY ^GROUP OF ^CHARACTERS WITHIN ^FIELD OF ^SPACES
.PAGE
.NOFILL
.LEFT MARGIN 0
^^DDDDD         AAA  MM      MM    OOOOO    VV    VV  EEEEEEEE
DD   DD      AAAA  MMM    MMM   OO   OO   VV   VV   EE
DD    DD    AA AA  MMMM  MMMM  OO     OO  VV  VV    EE
DD    DD   AA  AA  MM MMMM MM  OO     OO  VV VV     EEEEE
DD    DD  AAAAAAA  MM  MM  MM  OO     OO  VVVV      EE
DD   DD  AA    AA  MM      MM   OO   OO   VVV       EE
DDDDD   AA     AA  MM      MM    OOOOO    VV        EEEEEEEE
.SKIP
.FILL
.CENTER
DAMOVE, J\\USTIFY ^GROUP OF ^CHARACTERS WITHIN ^FIELD OF ^SPACES
.CENTER
------##------- ----- -- ---------- ------ ----- -- ------
.SKIP
^^DAMOVE \\LEFT JUSTIFIES, CENTERS OR RIGHT JUSTIFIES A GROUP OF
CHARACTERS WITHIN A LARGER SECTION OF THE ARRAY IN WHICH THESE
CHARACTERS ARE CONTAINED. ^THE REMAINDER OF THE SECTION IS FILLED
WITH SPACES. ^THE CHARACTERS ARE EACH CONTAINED IN SEPARATE ARRAY
LOCATIONS AS THOUGH THEY HAD BEEN READ USING A MULTIPLE OF AN ^A1
FORMAT OR DEFINED WITH SEVERAL 1^H FIELDS.
.SKIP
.CENTER
^THE ^^DAMOVE A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DAMOVE \I\S
.SKIP
.NOFILL
      SUBROUTINE DAMOVE(JSTIFY,IFILL ,LFTCOL,LTREND,IERR  ,
     1    IBUFFR,KOUNT )
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(LTREND)
.SKIP
.FILL
T\\HE FOLLOWING ARE INPUT ARGUMENTS RETURNED UNCHANGED
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^JSTIFY#=#-1, \\DO NOT MOVE THE GROUP OF CHARACTERS INPUT IN
^^IBUFFR(LFTCOL+1) \\THROUGH ^^IBUFFR(KOUNT).
.INDENT -2
=#0, \\THE GROUP OF CHARACTERS INPUT IN ^^IBUFFR(LFTCOL+1) \\THROUGH
^^IBUFFR(KOUNT) \\IS TO BE CENTERED IN THE FIELD STARTING AT
^^IBUFFR(LFTCOL+1) \\AND EXTENDING THROUGH ^^IBUFFR(LTREND).
S\\PACES ARE THEN PLACED INTO THE ^^IBUFFR \\ARRAY LOCATIONS
STARTING WITH ^^IBUFFR(LFTCOL+1) \\AND EXTENDING UP TO BUT NOT
INCLUDING THE ^^IBUFFR \\ARRAY LOCATION CONTAINING THE LEFTMOST
CHARACTER OF THE GROUP.
.INDENT -2
=#1, THE GROUP OF CHARACTERS INPUT IN ^^IBUFFR(LFTCOL+1) \\THROUGH
^^IBUFFR(KOUNT) \\IS TO BE MOVED TO THE RIGHT SO THAT THE CHARACTER
INPUT IN ^^IBUFFR(KOUNT) \\IS PLACED INTO ^^IBUFFR(LTREND). S\\PACES
ARE THEN PLACED INTO THE ^^IBUFFR \\ARRAY LOCATIONS STARTING WITH
^^IBUFFR(LFTCOL+1) \\AND EXTENDING UP TO BUT NOT INCLUDING THE
^^IBUFFR \\ARRAY LOCATION CONTAINING THE LEFTMOST CHARACTER OF THE
GROUP.
.SKIP
.INDENT -9
^^IFILL##=#0, \\DO NOT PLACE SPACES INTO ANY ^^IBUFFR \\ARRAY
LOCATIONS TO THE RIGHT OF THOSE RETURNED CONTAINING THE CHARACTERS
OF THE GROUP. ^THE VALUE OF ^^IFILL \\HAS NO EFFECT ON THE PLACEMENT
OF THE CHARACTERS OF THE GROUP. ^^KOUNT \\WILL BE RETURNED POINTING
TO THE RIGHTMOST CHARACTER OF THE GROUP.
.INDENT -2
=#1, PLACE SPACES INTO THE ^^IBUFFR \\ARRAY LOCATIONS TO THE RIGHT
OF THOSE RETURNED CONTAINING THE GROUP AND EXTENDING THROUGH
^^IBUFFR(LTREND). KOUNT \\WILL BE RETURNED RETURNED POINTING TO
^^IBUFFR(LTREND).
.SKIP
.INDENT -9
LFTCOL#=#\\SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION TO THE
IMMEDIATE LEFT OF THE FIRST CHARACTER IN THE GROUP.
.SKIP
.INDENT -9
^^LTREND#=#\\SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION WHICH FORMS
THE RIGHT END OF THE FIELD WHICH IS TO BE RETURNED CONTAINING THE
GROUP. ^IF ^^JSTIFY=1, \\THEN THE RIGHTMOST CHARACTER OF THE GROUP
WILL BE PLACED INTO ^^IBUFFR(LTREND).
.SKIP
.INDENT -9
IERR###=#-1, \\FILL THE ^^IBUFFR \\ARRAY LOCATIONS STARTING WITH
^^IBUFFR(LFTCOL+1) \\AND EXTENDING THROUGH ^^IBUFFR(LTREND) \\WITH
ASTERISKS AND RETURN ^^KOUNT \\POINTING TO ^^IBUFFR(LTREND). T\H\E
\\INPUT VALUES OF ^^JSTIFY, IFILL \\AND ^^KOUNT \\ARE IGNORED.
.INDENT -2
=#ZERO OR GREATER, MOVE THE GROUP OF CHARACTERS INPUT IN
^^IBUFFR(LFTCOL+1) \\THROUGH ^^IBUFFR(KOUNT) \\INTO THE POSITION
INDICATED BY ^^JSTIFY.
.SKIP
.LEFT MARGIN 0
T\\HE FOLLOWING ARGUMENTS ARE USED BOTH FOR INPUT TO THIS ROUTINE,
AND FOR RETURNING INFORMATION TO THE CALLING PROGRAM. ^THE CONTENTS
OF THE ^^IBUFFR \\ARRAY LOCATIONS WITH SUBSCRIPTS WHICH ARE LESS
THAN OR EQUAL TO ^^LFTCOL \\OR WHICH ARE GREATER THAN ^^LTREND \\ARE
NOT CHANGED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^IBUFFR#=#\\INPUT CONTAINING THE GROUP OF CHARACTERS TO BE MOVED IN
LOCATIONS ^^IBUFFR(LFTCOL+1) \\THROUGH ^^IBUFFR(KOUNT). E\\ACH
^^IBUFFR \\ARRAY LOCATION CONTAINS A SINGLE CHARACTER AS THOUGH READ
BY AN ^A1 FORMAT OR DEFINED BY A 1^H FIELD.
.INDENT -2
=#RETURNED CONTAINING THIS GROUP OF CHARACTERS LEFT JUSTIFIED,
CENTERED OR RIGHT JUSTIFIED (AS DIRECTED BY THE VALUE OF ^^JSTIFY)
\\IN THE LOCATIONS ^^IBUFFR(LFTCOL+1) \\THROUGH ^^IBUFFR(LTREND).
I\F IERR \\IS INPUT CONTAINING -1, THEN THE LOCATIONS
^^IBUFFR(LFTCOL+1) THROUGH IBUFFR(LTREND) \\ARE INSTEAD RETURNED
CONTAINING ASTERISKS.
.SKIP
.INDENT -9
^^KOUNT##=#\\INPUT CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY
LOCATION CONTAINING THE RIGHTMOST CHARACTER OF THE GROUP TO BE
POSITIONED AS DIRECTED BY ^^JSTIFY.
.INDENT -2
=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY
LOCATION CONTAINING THE RIGHTMOST CHARACTER DEFINED AFTER THE GROUP
HAS BEEN MOVED, AND, IF REQUESTED BY ^^IFILL, \\AFTER SPACES HAVE
BEEN ADDED.
.SUBTITLE ^^DANAME, C\\ONVERT ^BUFFER ^LOCATION TO ^ARRAY ^NAME AND ^SUBSCRIPTS
.PAGE
.NOFILL
.LEFT MARGIN 0
^^DDDDD         AAA  NN    NN       AAA  MM      MM  EEEEEEEE
DD   DD      AAAA  NNN   NN      AAAA  MMM    MMM  EE
DD    DD    AA AA  NNNN  NN     AA AA  MMMM  MMMM  EE
DD    DD   AA  AA  NN NN NN    AA  AA  MM MMMM MM  EEEEE
DD    DD  AAAAAAA  NN  NNNN   AAAAAAA  MM  MM  MM  EE
DD   DD  AA    AA  NN   NNN  AA    AA  MM      MM  EE
DDDDD   AA     AA  NN    NN AA     AA  MM      MM  EEEEEEEE
.SKIP 3
.FILL
.CENTER
DANAME, C\\ONVERT ^BUFFER ^LOCATION TO ^ARRAY ^NAME AND ^SUBSCRIPTS
.CENTER
------##------- ------ -------- -- ----- ---- --- ----------
.SKIP
^^DANAME \\CONVERTS A SUBSCRIPT OF A SINGLY SUBSCRIPTED BUFFER WHICH
IS CONSIDERED TO HOLD ONE OR MORE POSSIBLY MULTIPLY SUBSCRIPTED
ARRAYS INTO THE ARRAY NAME AND ITS SUBSCRIPTS AS DEFINED BY THE
DICTIONARY CONSTRUCTED BY THE ^^DALOAD \\ROUTINE. ^THIS CONVERSION
IS THE OPPOSITE OF THAT PERFORMED BY THE ^^DASITE \\ROUTINE.
.SKIP
^FOR EXAMPLE, IF THE FIRST STATEMENT READ DURING THE CONSTRUCTION OF
THE DICTIONARY BY ^^DALOAD \\WAS
.SKIP
.NOFILL
      ^^DIMENSION FIRST(10),SECOND(10,10),THIRD(10,10,10)
.FILL
.SKIP
\\AND IF IT IS ASSUMED THAT THE FIRST (LEFT) SUBSCRIPT OF EACH
SIMULATED ARRAY VARIES THE MOST RAPIDLY (THE USUAL ^^FORTRAN
\\CONVENTION FOR ARRAY NAMES APPEARING WITHOUT SUBSCRIPTS IN ^^READ
\\AND ^^WRITE \\STATEMENTS) THEN THE SINGLY SUBSCRIPTED BUFFER
LOCATION HAVING 123 AS ITS SUBSCRIPT WOULD BE EQUIVALENT TO THE
SIMULATED ARRAY LOCATION ^^THIRD(3,2,1). T\\HE BUFFER LOCATION
SUBSCRIPT IS CONVERTED BY ^^DANAME \\TO THE ARRAY NAME AND ITS
SUBSCRIPTS BY DETERMINING THAT THE LOCATIONS BELOW THE DESIRED
LOCATION INCLUDE
.SKIP
.LEFT MARGIN 5
.INDENT -3
A.#ALL 10 LOCATIONS OF THE ^^FIRST \\ARRAY
.SKIP
.INDENT -3
B.#ALL 100 LOCATIONS OF THE ^^SECOND \\ARRAY
.SKIP
.INDENT -3
C.#THE 10 LOCATIONS ^^THIRD(1,1,1) \\THROUGH ^^THIRD(10,1,1)
.SKIP
.INDENT -3
\\D.#THE 2 LOCATIONS ^^THIRD(1,2,1) \\AND ^^THIRD(2,2,1)
.SKIP
.LEFT MARGIN 0
S\\INCE THE DICTIONARY CONSTRUCTED BY ^^DALOAD \\IS DIVIDED INTO
LOGICAL GROUPS OF ARRAY NAMES, THE PROPER LOGICAL GROUP MUST BE
LOCATED BY CALLING THE ^^DABASE \\ROUTINE PRIOR TO THE FIRST CALL TO
^^DANAME, \\UNLESS IT IS KNOWN THAT THE DESIRED LOGICAL GROUP IS THE
FIRST (OR ONLY) GROUP IN THE DICTIONARY.
.PAGE
.CENTER
^THE ^^DANAME A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DANAME \I\S
.SKIP
.NOFILL
      SUBROUTINE DANAME(IRAPID,LOCATN,LRGNUM,NUMUSD,NUMSTR,
     1    LRGLTR,MAXSUB,INITAL,KOUNT ,LTRINI,NUMINI,KNTSUB,
     2    NOWSUB)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION NUMSTR(NUMUSD),NOWSUB(MAXSUB)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT ONLY AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IRAPID#=#0, \\MULTIPLY SUBSCRIPTED ARRAYS HAVE THEIR LEFT
SUBSCRIPTS VARY THE MOST RAPIDLY
.INDENT -2
=#1, MULTIPLY SUBSCRIPTED ARRAYS HAVE THEIR RIGHT SUBSCRIPTS VARY
THE MOST RAPIDLY.
.SKIP
.INDENT -9
^^LOCATN#=#\\THE VALUE OF THE SUBSCRIPT OF THE SINGLY SUBSCRIPTED
BUFFER WHICH IS TO BE CONVERTED TO THE CORRESPONDING ARRAY NAME AND
ITS SUBSCRIPTS.
.SKIP
.INDENT -9
^^LRGNUM#=#\\SUBSCRIPT OF THE ^^NUMSTR \\ARRAY LOCATION CONTAINING
THE START OF THE NUMERIC PORTION OF THE ARRAY DESCRIPTIONS.
.SKIP
^IF ^^NUMSTR(LRGNUM) \\IS LESS THAN OR EQUAL TO ZERO, THEN
^^NUMSTR(LRGNUM) \\IS THE FIRST LOCATION IN THE DESCRIPTION OF THE
LOGICAL GROUP OF ARRAYS THE VALUES OF WHICH ARE EQUIVALENCED WITH OR
OTHERWISE CONTAINED IN THE SINGLY SUBSCRIPTED BUFFER, AND THE
SUBSEQUENT DESCRIPTION IS OF THE ARRAY WHICH IF IT CONTAINED THE
LOCATION CORRESPONDING TO THE INPUT VALUE OF ^^LOCATN \\WOULD RETURN
^^KOUNT=1. I\F NUMSTR(LRGNUM) \\IS LESS THAN OR EQUAL TO ZERO, THEN
ITS ABSOLUTE VALUE IS THE NUMBER OF CHARACTERS WITHIN THE NAME OF
THE GROUP OF ARRAYS, NOT THE NUMBER OF CHARACTERS IN THE NAME OF THE
FIRST ARRAY, AND THE DICTIONARY IS EFFECTIVELY TERMINATED PRIOR TO
THE NEXT ARRAY DESCRIPTION WHICH DOES NOT START WITH A VALUE GREATER
THAN ZERO.
.SKIP
^IF ^^NUMSTR(LRGNUM) \\IS GREATER THAN ZERO, THEN THE DICTIONARY
STARTS WITH THE DESCRIPTION OF THE ARRAY WHICH IF IT CONTAINED THE
LOCATION CORRESPONDING TO THE INPUT VALUE OF ^^LOCATN \\WOULD RETURN
^^KOUNT=1. I\F NUMSTR(LRGNUM) \\IS GREATER THAN ZERO, THEN
^^NUMSTR(LRGNUM) \\CONTAINS THE NUMBER OF CHARACTERS IN THE NAME OF
THE FIRST ARRAY WITHIN THE LOGICAL GROUP, AND THE DICTIONARY IS
EFFECTIVELY TERMINATED PRIOR TO THE FIRST ARRAY DESCRIPTION WHICH
DOES NOT START WITH A VALUE GREATER THAN ZERO.
.SKIP
.INDENT -9
^^NUMUSD#=#\\HIGHEST SUBSCRIPT OF THE LOCATIONS IN THE ^^NUMSTR
\\ARRAY CONTAINING THE NUMERIC INFORMATION CORRESPONDING TO THE
POSSIBLY MULTIPLY SUBSCRIPTED ARRAYS THE VALUES OF WHICH ARE
EQUIVALENCED WITH OR OTHERWISE CONTAINED IN THE SINGLY SUBSCRIPTED
BUFFER. ^^NUMUSD \\IS THE HIGHEST SUBSCRIPT USED IN THE ^^NUMSTR
\\ARRAY FOR THE STORAGE OF INFORMATION ABOUT ANY ARRAY IN ANY
LOGICAL GROUP, AND IS NOT NECESSARILY THE HIGHEST SUBSCRIPT USED IN
THE ^^NUMSTR \\ARRAY FOR THE STORAGE OF INFORMATION ABOUT AN ARRAY
IN THE CURRENT LOGICAL GROUP.
.SKIP
.INDENT -9
^^NUMSTR#=#\\THE ARRAY CONTAINING THE NUMERIC INFORMATION
CORRESPONDING TO THE POSSIBLY MULTIPLY SUBSCRIPTED ARRAYS THE VALUES
OF WHICH ARE EQUIVALENCED WITH OR OTHERWISE CONTAINED IN THE SINGLY
SUBSCRIPTED BUFFER. ^THE CONSTRUCTION OF THE ^^NUMSTR \\ARRAY IS
DESCRIBED IN DETAIL IN THE ^^DALOAD \\DOCUMENTATION. ^FOR EACH NAME
IN THE DICTIONARY, THE ^^NUMSTR \\ARRAY CONTAINS
.SKIP
.LEFT MARGIN 14
.INDENT -3
A.#THE NUMBER OF CHARACTERS IN THE NAME
.SKIP
.INDENT -3
B.#AN INDICATION OF THE ASSOCIATED DATA TYPE
.SKIP
.INDENT -3
C.#THE NUMBER OF SUBSCRIPT RANGES
.SKIP
.INDENT -3
D.#PAIRS OF STARTING AND ENDING VALUES OF THESE RANGES.
.SKIP
.LEFT MARGIN 9
^IF THE NUMBER OF CHARACTERS IS INSTEAD ZERO OR NEGATIVE, THEN ITS
ABSOLUTE VALUE IS THE NUMBER OF CHARACTERS IN THE NAME OF A LOGICAL
GROUP OF NAMES, AND THE NEXT LOCATION, RATHER THAN INDICATING THE
DATA TYPE, CONTAINS THE NUMBER OF LOCATIONS WITHIN A SINGLY
SUBSCRIPTED BUFFER WHICH WOULD BE NEEDED TO STORE THE VALUES OF THE
MULTIPLY SUBSCRIPTED ARRAYS WHICH ARE WITHIN THE LOGICAL GROUP AND
EQUIVALENCED WITH OR OTHERWISE LOADED INTO SUCH A SINGLY SUBSCRIPTED
BUFFER.
.SKIP
.INDENT -9
^^LRGLTR#=#\\THE SUBSCRIPT OF THE ^^LTRSTR \\ARRAY (NOT AN ARGUMENT
OF THIS ROUTINE BUT CONSTRUCTED BY ^^DALOAD \\IN PARALLEL WITH
^^NUMSTR) \\LOCATION WHICH CONTAINS THE FIRST LETTER OF THE NAME
ASSOCIATED WITH THE LOGICAL GROUP OF NAMES IN THE DICTIONARY IF
^^NUMSTR(LRGNUM) \\IS NEGATIVE, OR WHICH CONTAINS THE FIRST LETTER
OF THE FIRST ARRAY NAME IN THE LOGICAL GROUP OF NAMES IF
^^NUMSTR(LRGNUM) \\IS POSITIVE OR ZERO.
.SKIP
.INDENT -9
^^MAXSUB#=#\\HIGHEST SUBSCRIPT OF THE LOCATIONS IN THE ^^NOWSUB
\\ARRAY WHICH CAN BE USED BY THIS ROUTINE TO STORE THE VALUES OF THE
SUBSCRIPTS OF THE ARRAY NAME CORRESPONDING TO THE SUBSCRIPT (INPUT
AS THE VALUE OF ^^LOCATN) \\OF THE SINGLY SUBSCRIPTED BUFFER.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED FOR BOTH INPUT AND OUTPUT. ^IF
THIS ROUTINE IS ASKED TO CONVERT A VALUE OF ^^LOCATN \\WHICH IS THE
SUBSCRIPT OF A LOCATION IN OR FURTHER BEYOND THE ARRAY IDENTIFIED BY
THE PREVIOUS CALL TO THIS ROUTINE BUT WHICH IS STILL WITHIN THE SAME
LOGICAL GROUP OF ARRAYS AS DEALT WITH BY THE PREVIOUS CALL, THEN THE
VALUES OF THESE ARGUMENTS AS OUTPUT BY THE PREVIOUS CALL ARE USED AS
THE NEW OFFSETS IN THE DICTIONARY AND BUFFER, RATHER THAN REPEATING
THE CALCULATIONS FOR THE LOWER PORTION OF THE LOGICAL GROUP.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^INITAL#=#\\SHOULD BE SET TO ZERO BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS FIRST CALLED, AND AGAIN SET TO ZERO WHENEVER THIS
ROUTINE IS CALLED TO REFERENCE A DIFFERENT LOGICAL GROUP OF ARRAY
NAMES IN THE DICTIONARY.
.INDENT -2
=#RETURNED GREATER THAN ZERO IF THE SUBSCRIPT OF THE SINGLY
SUBSCRIPTED BUFFER INPUT AS THE VALUE OF THE ARGUMENT ^^LOCATN
\\COULD BE CONVERTED INTO THE NAME AND SUBSCRIPTS OF A POSSIBLY
MULTIPLY SUBSCRIPTED ARRAY EQUIVALENCED WITH OR OTHERWISE CONTAINED
IN PART OR ALL OF THE SINGLY SUBSCRIPTED BUFFER. ^^INITAL \I\S
\\RETURNED CONTAINING THE SUBSCRIPT OF THE SINGLY SUBSCRIPTED BUFFER
LOCATION WHICH CONTAINS THE START OF (THE FIRST LOCATION WITHIN) THE
POSSIBLY MULTIPLY SUBSCRIPTED ARRAY SOME LOCATION WITHIN WHICH
CORRESPONDS TO THE SINGLY SUBSCRIPTED BUFFER LOCATION HAVING AS ITS
SUBSCRIPT THE INPUT VALUE OF ARGUMENT ^^LOCATN. I\\F THE POSSIBLY
MULTIPLY SUBSCRIPTED ARRAY IDENTIFIED BY THIS ROUTINE CONSISTS OF A
SINGLE LOCATION, THEN ^^INITAL \\IS RETURNED CONTAINING THE INPUT
VALUE OF ^^LOCATN.
.INDENT -2
=#0, \\RETURNED IF THE SUBSCRIPT OF THE SINGLY SUBSCRIPTED BUFFER
INPUT AS THE VALUE OF THE ARGUMENT ^^LOCATN \\COULD NOT BE CONVERTED
INTO A NAME AND SUBSCRIPTS OF AN ARRAY EQUIVALENCED WITH OR
OTHERWISE CONTAINED IN PART OR ALL OF THE SINGLY SUBSCRIPTED BUFFER.
^IN OTHER WORDS, ^^LOCATN \\WAS INPUT CONTAINING A VALUE NOT
INDICATED BY THE DICTIONARY AS BEING WITHIN THE SINGLY SUBSCRIPTED
BUFFER CONTAINING THE ARRAYS FORMING THE LOGICAL GROUP.
.INDENT -2
=#-1, ^^MAXSUB \\IS LESS THAN THE NUMBER OF SUBSCRIPTS OF THE
POSSIBLY MULTIPLY SUBSCRIPTED ARRAY IDENTIFIED BY THIS ROUTINE SO
THAT NOT ALL OF THE SUBSCRIPTS COULD BE REPRESENTED IN THE ^^NOWSUB
\\ARRAY.
.SKIP
.INDENT -9
^^KOUNT##=#\\INPUT VALUE IS IGNORED IF ^^INITAL \\IS INPUT
CONTAINING ZERO OR IF ^^INITAL \\IS INPUT GREATER THAN THE INPUT
VALUE OF ^^LOCATN. KOUNT \\IS SET BY EACH CALL TO THIS ROUTINE, AND
SHOULD NEVER BE SET BY THE CALLING PROGRAM.
.INDENT -2
=#IF ^^INITAL \\IS INPUT GREATER THAN ZERO BUT LESS THAN OR EQUAL TO
^^LOCATN, \\THEN ^^KOUNT, \\AS RETURNED BY THE PREVIOUS CALL TO THIS
ROUTINE, IS THE SEQUENCE NUMBER OF THE POSSIBLY MULTIPLY SUBSCRIPTED
ARRAY CORRESPONDING TO THE INPUT VALUE OF ^^INITAL.
.INDENT -2
=#\\RETURNED CONTAINING THE SEQUENCE NUMBER OF THE IDENTIFIED ARRAY
RELATIVE TO ALL ARRAYS IN THE LOGICAL GROUP OF ARRAYS. ^IF THE THIRD
ARRAY IN THE LOGICAL GROUP CONTAINS THE LOCATION CORRESPONDING TO
THE INPUT VALUE OF ^^LOCATN, \\THEN ^^KOUNT \\IS RETURNED CONTAINING
THE VALUE 3.
.SKIP
^IF ^^NUMSTR(LRGNUM) \\IS LESS THAN OR EQUAL TO ZERO, THEN
^^NUMSTR(LRGNUM) \\IS THE FIRST LOCATION IN THE DESCRIPTION OF THE
LOGICAL GROUP OF ARRAYS THE VALUES OF WHICH ARE EQUIVALENCED WITH OR
OTHERWISE CONTAINED IN THE SINGLY SUBSCRIPTED BUFFER, AND THE
SUBSEQUENT DESCRIPTION IS OF THE ARRAY WHICH IF IT CONTAINED THE
LOCATION CORRESPONDING TO THE INPUT VALUE OF ^^LOCATN \\WOULD RETURN
^^KOUNT=1. I\F NUMSTR(LRGNUM) \\IS LESS THAN OR EQUAL TO ZERO, THEN
ITS ABSOLUTE VALUE IS THE NUMBER OF CHARACTERS WITHIN THE NAME OF
THE GROUP OF ARRAYS, NOT THE NUMBER OF CHARACTERS IN THE NAME OF THE
FIRST ARRAY, AND THE DICTIONARY IS EFFECTIVELY TERMINATED PRIOR TO
THE NEXT ARRAY DESCRIPTION WHICH DOES NOT START WITH A VALUE GREATER
THAN ZERO.
.SKIP
^IF ^^NUMSTR(LRGNUM) \\IS GREATER THAN ZERO, THEN THE DICTIONARY
STARTS WITH THE DESCRIPTION OF THE ARRAY WHICH IF IT CONTAINED THE
LOCATION CORRESPONDING TO THE INPUT VALUE OF ^^LOCATN \\WOULD RETURN
^^KOUNT=1. I\F NUMSTR(LRGNUM) \\IS GREATER THAN ZERO, THEN
^^NUMSTR(LRGNUM) \\CONTAINS THE NUMBER OF CHARACTERS IN THE NAME OF
THE FIRST ARRAY WITHIN THE LOGICAL GROUP, AND THE DICTIONARY IS
EFFECTIVELY TERMINATED PRIOR TO THE FIRST ARRAY DESCRIPTION WHICH
DOES NOT START WITH A VALUE GREATER THAN ZERO.
.SKIP
.INDENT -9
^^LTRINI#=#\\INPUT VALUE IS IGNORED IF ^^INITAL \\IS INPUT
CONTAINING ZERO OR IF ^^INITAL \\IS INPUT GREATER THAN THE INPUT
VALUE OF ^^LOCATN. LTRINI \\IS SET BY EACH CALL TO THIS ROUTINE, AND
SHOULD NEVER BE SET BY THE CALLING PROGRAM.
.INDENT -2
=#IF ^^INITAL \\IS INPUT GREATER THAN ZERO BUT LESS THAN OR EQUAL TO
^^LOCATN, \\THEN ^^LTRINI, \\AS RETURNED BY THE PREVIOUS CALL TO
THIS ROUTINE, IS THE SUBSCRIPT OF THE ^^LTRSTR \\LOCATION CONTAINING
THE FIRST CHARACTER OF THE NAME OF THE POSSIBLY MULTIPLY SUBSCRIPTED
ARRAY CORRESPONDING TO THE INPUT VALUE OF ^^INITAL.
.INDENT -2
=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^LTRSTR \\ARRAY
LOCATION CONTAINING THE FIRST CHARACTER OF THE NAME OF THE
IDENTIFIED ARRAY.
.SKIP
.INDENT -9
^^NUMINI#=#\\INPUT VALUE IS IGNORED IF ^^INITAL \\IS INPUT
CONTAINING ZERO OR IF ^^INITAL \\IS INPUT GREATER THAN THE INPUT
VALUE OF ^^LOCATN. NUMINI \\IS SET BY EACH CALL TO THIS ROUTINE, AND
SHOULD NEVER BE SET BY THE CALLING PROGRAM.
.INDENT -2
=#IF ^^INITAL \\IS INPUT GREATER THAN ZERO BUT LESS THAN OR EQUAL TO
^^LOCATN, \\THEN ^^NUMINI, \\AS RETURNED BY THE PREVIOUS CALL TO
THIS ROUTINE, IS THE SUBSCRIPT OF THE ^^NUMSTR \\LOCATION CONTAINING
THE START OF THE NUMERIC DESCRIPTION OF THE POSSIBLY MULTIPLY
SUBSCRIPTED ARRAY CORRESPONDING TO THE INPUT VALUE OF ^^INITAL.
.INDENT -2
=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^NUMSTR \\ARRAY
LOCATION CONTAINING THE START OF THE NUMERIC DESCRIPTION OF THE
IDENTIFIED ARRAY.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR OUTPUT. ^THEIR INPUT
VALUES ARE IGNORED. ^THESE ARGUMENTS ARE RETURNED UNDEFINED IF
^^INITAL \\IS RETURNED LESS THAN OR EQUAL TO ZERO.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KNTSUB#=#\\RETURNED CONTAINING THE NUMBER OF SUBSCRIPTS OF THE
IDENTIFIED ARRAY. ^IF THE ^^NUMSTR \\ARRAY INDICATES THAT THE
IDENTIFIED ARRAY IS NONDIMENSIONED, THEN ^^KNTSUB \\IS RETURNED
CONTAINING 1, AND ^^NOWSUB(1) \\IS RETURNED ALSO CONTAINING 1. ^THIS
PRECAUTION IS PERFORMED SO THAT ANY SUBSEQUENT ^^FASP \\ROUTINE CALL
WHICH INCLUDES ^^KNTSUB \\IN ITS ARGUMENT LIST FOR USE IN A
^^DIMENSION \\STATEMENT WITHIN THE ROUTINE, WILL NOT HAVE THAT
DIMENSION INPUT AS THE VALUE ZERO WHICH COULD BE CONSIDERED ILLEGAL
DURING EXECUTION OF THE PROGRAM (DEPENDING UPON WHETHER THE COMPILER
GENERATES CODE TO CHECK FOR THIS CONDITION). ^WITHOUT THIS
PRECAUTION, A SUBSEQUENT CALL TO ^^DALONE, \\FOR EXAMPLE, COULD
CAUSE THE ^^DIMENSION \\STATEMENT IN THAT ROUTINE TO EFFECTIVELY
BECOME
.SKIP
.NOFILL
      ^^DIMENSION NOWSUB(0)
.FILL
.SKIP
A\\LTHOUGH SUCH A STATEMENT HAS MEANING TO ^^DALOAD \\WHEN READ AS
DATA (IN PARTICULAR, TO ^^DALOAD \\SUCH A STATEMENT MEANS THAT
^^NOWSUB \\INCLUDES THE 2 LOCATIONS ^^NOWSUB(1) \\AND ^^NOWSUB(0)
\\WITH THE HIGHER SUBSCRIPT VALUE OF 1 APPEARING FIRST IN STORAGE),
IT PROBABLY DOES NOT HAVE A VALID MEANING IN THE CODE GENERATED BY
THE COMPILER. ^OF COURSE, UNDER THESE CIRCUMSTANCES, THE LOGIC IN
^^DALONE \\IS SUCH THAT NO LOCATION WHATEVER IS USED IN THE ^^NOWSUB
\\ARRAY SO THAT PROBABLY NO DAMAGE WOULD BE DONE IF THE ZERO
DIMENSION IS NOT DETECTED AS BEING ILLEGAL BY THE ENTRY CODE
GENERATED BY THE COMPILER.
.SKIP
.INDENT -9
^^NOWSUB#=#\\ARRAY RETURNED CONTAINING IN LOCATIONS ^^NOWSUB(1)
\\THROUGH AND INCLUDING ^^NOWSUB(KNTSUB) \\THE VALUES OF THE
SUBSCRIPTS OF THE POSSIBLY MULTIPLY SUBSCRIPTED ARRAY LOCATION
CORRESPONDING TO THE SUBSCRIPT OF THE SINGLY SUBSCRIPTED BUFFER
INPUT AS THE ARGUMENT ^^LOCATN.
.SUBTITLE ^^DANEXT, R\\ETURNS ^NEXT ^VALUE ^TYPED AS ^SINGLE ^NUMBER OR ^SERIES
.PAGE
.LEFT MARGIN 0
.NOFILL
 ^^DDDDD          AAA  NN    NN  EEEEEEEE  XX    XX  TTTTTTTT
 DD   DD       AAAA  NNN   NN  EE         XX  XX      TT
 DD    DD     AA AA  NNNN  NN  EE          XXXX       TT
 DD    DD    AA  AA  NN NN NN  EEEEE        XX        TT
 DD    DD   AAAAAAA  NN  NNNN  EE          XXXX       TT
 DD   DD   AA    AA  NN   NNN  EE         XX  XX      TT
 DDDDD    AA     AA  NN    NN  EEEEEEEE  XX    XX     TT
.SKIP 2
.FILL
.CENTER
DANEXT, R\\ETURNS ^NEXT ^VALUE ^TYPED AS ^SINGLE ^NUMBER OR ^SERIES
.CENTER
------##------- ---- ----- ----- -- ------ ------ -- ------
.SKIP
^^DANEXT \\RETURNS TO THE CALLING PROGRAM THE NEXT NUMBER
REPRESENTED BY THE CHARACTERS IN AN INPUT BUFFER READ BY THE CALLING
PROGRAM WITH A MULTIPLE OF AN ^A1 FORMAT. ^IF A SERIES SPECIFICATION
IS ENCOUNTERED IN THE INPUT BUFFER, THEN THE INDIVIDUAL NUMBERS OF
THE SERIES ARE RETURNED BY THE CALLS TO THIS ROUTINE. ^WHEN ALL OF
THE NUMBERS FORMING THE SERIES HAVE BEEN RETURNED, THEN THE
SUBSEQUENT NUMBER OR SERIES OF NUMBERS SPECIFIED BY THE CONTENTS OF
THE BUFFER ARE EVALUATED.
.SKIP
^A SERIES EVALUATED BY THIS ROUTINE CAN BE WRITTEN AS A LOWER BOUND,
INCREMENT AND UPPER BOUND SEPARATED BY SLASHES OR BY COLONS (THE 2
CHARACTERS ARE EQUIVALENT). ^IF THE INCREMENT IS TO BE ONE, THEN THE
LOWER AND UPPER BOUNDS NEED BE SEPARATED ONLY BY A SINGLE SLASH OR
BY A SINGLE COLON. ^IF EITHER BOUND IS MISSING, IT IS ASSUMED TO BE
ZERO. ^THE LOWER BOUND IS THE FIRST NUMBER OF THE SERIES REPORTED TO
THE CALLING PROGRAM. ^THE SERIES CAN THEN EITHER INCREASE OR
DECREASE DEPENDING UPON WHETHER THE UPPER BOUND IS LESS THAN, EQUAL
TO, OR GREATER THAN THE LOWER BOUND. ^THE SIGN OF THE INCREMENT IS
CHANGED IF IT DOES NOT CONFORM TO THE RELATIVE VALUES OF THE BOUNDS.
.SKIP
^IF THE SERIES IS TO CONSIST OF SEVERAL REPETITIONS OF THE SAME
VALUE, THEN THE SERIES IS INSTEAD WRITTEN AS THE NUMBER OF TIMES THE
VALUE IS TO BE USED FOLLOWED IMMEDIATELY BY AN ASTERISK AND THE
VALUE ITSELF. ^THE VALUE TO BE REPEATED IS ASSUMED TO BE NULL IF IT
IS MISSING.
.SKIP
^THE ONLY PRINTING DELIMITER CHARACTER ALLOWED BETWEEN SERIES
SPECIFICATIONS IS THE COMMA. ^TWO COMMAS WITH NO OTHER PRINTING
CHARACTERS BETWEEN THEM ARE TAKEN TO INDICATE A MISSING SERIES
SPECIFICATION. ^THE CALLING PROGRAM IS INFORMED IF A SEMICOLON IS
ENCOUNTERED IN THE TEXT BEING EVALUATED BY THIS ROUTINE. ^THE
SEMICOLON MIGHT BE TYPED BY THE USER TO SIGNAL THAT THE CALLING
PROGRAM IS TO TERMINATE ITS REQUESTS FOR DATA FROM THE USER. ^AN
EXCLAMATION POINT AND ANY CHARACTERS TO ITS RIGHT ARE TAKEN TO BE A
COMMENT AND ARE OTHERWISE IGNORED. ^AN AMPERSAND AND THE CHARACTERS
TO ITS RIGHT ARE SIMILARLY CONSIDERED TO FORM A COMMENT, BUT THE
CALLING PROGRAM IS INFORMED THAT AN AMPERSAND WAS FOUND. ^AN
AMPERSAND MIGHT BE TYPED BY THE USER TO INDICATE THAT THE INPUT TEXT
IS TO BE CONTINUED ON THE FOLLOWING LINE.
.SKIP
^TWO VERSIONS OF THE ROUTINE ARE SUPPLIED. ^^DANEXT \\CAN EVALUATE
REAL NUMBERS AS WELL AS EITHER DECIMAL OR OCTAL INTEGERS INCLUDING
^E, ^K AND ^M NOTATIONS FOR SPECIFYING EITHER OF THESE. ^IF THE
CALLING PROGRAM DOES NOT OTHERWISE REFERENCE THE FREE FORMAT INPUT
ROUTINE ^^DAHEFT, \\IF THE EVALUATION OF EITHER REAL OR OCTAL
NUMBERS IS NOT NEEDED, AND IF INTEGERS CAN BE SPECIFIED WITHOUT
RESORTING TO THE ^E, ^K AND ^M NOTATIONS, THEN THE ROUTINE ^^DAINXT
\\SHOULD BE USED INSTEAD OF ^^DANEXT. N\\UMBERS EVALUATED BY
^^DAINXT \\MUST CONSIST ONLY OF DIGITS FOLLOWING THE OPTIONAL SIGN.
^^DAINXT \\TREATS THE CHARACTERS ., %, ^E, ^K AND ^M AS ILLEGAL
CHARACTERS.
.SKIP 2
.TEST PAGE 8
.CENTER
^THE ^^DANEXT \\AND ^^DAINXT A\\RGUMENT ^LISTS
.CENTER
--- ------ --- ------ -------- -----
.SKIP
^THE ARGUMENT LISTS OF ROUTINES ^^DANEXT \\AND ^^DAINXT \\ARE
.SKIP
.NOFILL
      ^^SUBROUTINE DANEXT(KONTRL,SLACK ,IBUFFR,MAXBFR,LOWBFR,
     1    MANY  ,KIND  ,NEWVAL,INCVAL,LMTVAL,VALNEW,VALINC,
     2    VALLMT)
.SKIP
\\AND
.SKIP
      ^^SUBROUTINE DAINXT              (IBUFFR,MAXBFR,LOWBFR,
     1    MANY  ,KIND  ,NEWVAL,INCVAL,LMTVAL)
.SKIP
.FILL
\\BOTH WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
.NOFILL
      ^^DIMENSION IBUFFR(MAXBFR)
.FILL
.SKIP
T\\HE ORDERING OF THE ARGUMENTS IS THE SAME FOR BOTH ROUTINES, BUT
THE FIRST 2 ARGUMENTS OF ^^DANEXT, \\AND THE LAST 3 ARGUMENTS OF
^^DANEXT \\ARE NOT INCLUDED IN THE ^^DAINXT \\ARGUMENT LIST. ^THE
ARGUMENT DEFINITIONS FOR ^^DAINXT \\ARE IDENTICAL TO THOSE OF
^^DANEXT \\WITH THE EXCEPTION THAT THE NEW VALUE IS ALWAYS RETURNED
IN INTEGER FORM FOR ^^DAINXT.
.SKIP
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT ONLY AND ARE RETURNED
UNCHANGED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KONTRL#=#-1, \\THE NUMBER (OR SERIES OF NUMBERS) IN THE ^^IBUFFR
\\ARRAY IS AN OCTAL INTEGER (OR A SERIES OF OCTAL INTEGERS). ^THE
NUMBER CAN BE TYPED WITH A DECIMAL POINT AND/OR WITH AN EXPONENT.
^HOWEVER, THE NUMBER FOLLOWING THE LETTER ^E OF THE EXPONENT IS
EVALUATED IN DECIMAL. ^THE VALUE OF THE OCTAL NUMBER IS RETURNED AS
THE ARGUMENT ^^NEWVAL. I\\T MUST BE NOTED THAT NUMBERS EVALUATED AS
NEGATIVE OCTAL INTEGERS HAVE THE NEGATIVE OCTAL INTEGER AS THEIR
VALUE, NOT AS THEIR BIT REPRESENTATION IN COMPUTER STORAGE. ^FOR
EXAMPLE, ON A 36 BIT TWOS COMPLEMENT COMPUTER, THE OCTAL NUMBER
-400000000000 (WHICH COULD ALSO BE TYPED AS -4^E11 OR -4^E+11 WHERE
THE 11 AFTER THE ^E IS IN DECIMAL) IS REPRESENTED AS THE BIT PATTERN
HAVING OCTAL NOTATION 400000000000 AND THE OCTAL NUMBER
-377777777777 IS REPRESENTED BY THE BIT PATTERN 400000000001.
.INDENT -2
=#0, THE NUMBER (OR SERIES OF NUMBERS) IN THE ^^IBUFFR \\ARRAY IS A
DECIMAL INTEGER (OR A SERIES OF DECIMAL INTEGERS). ^THE NUMBER CAN
BE TYPED WITH A DECIMAL POINT (FOR EXAMPLE 1.23^K OR 1.23^E3 EQUALS
1230), BUT IS STORED AS AN INTEGER, AND IS OUTPUT AS ARGUMENT
^^NEWVAL. A\\NY DECIMAL INTEGER WHICH THE COMPUTER CAN REPRESENT CAN
BE EVALUATED. ^THIS INCLUDES, ON TWOS COMPLEMENT COMPUTERS, THE
LARGEST NEGATIVE NUMBER THE ABSOLUTE VALUE OF WHICH CANNOT BE
STORED. ^ON THE ^^PDP10, \\A 36 BIT COMPUTER WITH TWOS COMPLEMENT
NOTATION, THE RANGE OF DECIMAL INTEGERS IS -34359738368 THROUGH
34359738367 (THE OCTAL NOTATION OF THE BIT PATTERNS BEING
400000000000 THROUGH 377777777777).
.INDENT -2
=#1 OR GREATER, THE NUMBER (OR SERIES OF NUMBERS) IN THE ^^IBUFFR
\\ARRAY IS A REAL NUMBER (OR A SERIES OF REAL NUMBERS). ^IF
POSSIBLE, THE REAL NUMBER WILL BE ACCUMULATED AS AN INTEGER, THEN BE
CONVERTED TO REAL AND SHIFTED IF NECESSARY. ^^KONTRL \\IS THEN THE
MAXIMUM NUMBER OF DIGITS IN THE INTEGER. ^THE VALUE IS OUTPUT AS THE
ARGUMENT ^^VALNEW. I\\F THE ITEM HAS MORE THAN ^^KONTRL \\DIGITS,
THEN THE ENTIRE EVALUATION IS DONE AS A REAL NUMBER. ^THE ADVANTAGE
OF CALCULATING THE REAL VALUES IN INTEGER AS LONG AS THE PRECISION
OF THE COMPUTER IS NOT OVERFLOWED IS THAT THE CALCULATION OF THE
PORTION OF THE NUMBER RIGHT OF THE DECIMAL POINT IS MORE EXACT. ^AS
AN EXAMPLE, IF ^^KONTRL \\IS GREATER THAN OR EQUAL TO 4, THEN THE
NUMBER 33.33 CAN BE STORED AS THE INTEGER 3333, THEN BE CONVERTED TO
THE REAL VALUE 3333.0 AND DIVIDED BY 100.0 TO OBTAIN THE FINAL
ANSWER. ^IF IT MAKES NO DIFFERENCE WHETHER THE NUMBER TYPED AS 33.33
HAS VALUE 33.33 OR 33.32999... THEN ^^KONTRL \\CAN BE GIVEN THE
VALUE 1.
.SKIP
.INDENT -9
^^SLACK##=#\\THE FRACTION OF THE INCREMENT OF A SERIES EXPRESSED IN
SLASH OR COLON NOTATION, IF ^^KONTRL \\IS GREATER THAN ZERO, BY
WHICH THE RETURNED VALUE OF THE ARGUMENT NAMED ^^VALNEW \\CAN EXCEED
THE UPPER BOUND AND STILL BE CONSIDERED TO BE WITHIN THE SERIES.
^^SLACK \\IS NECESSARY BECAUSE OF THE IMPRECISION OF CALCULATIONS
INVOLVING REAL NUMBERS. ^FOR EXAMPLE, IF THE USER WISHED TO HAVE THE
INCREMENT BE 0.666... BETWEEN A LOWER BOUND OF 3.0 AND AN UPPER
BOUND OF 5.0, HE MIGHT TYPE 3/.667/5 AND EXPECT THAT THE NUMBERS
3.000, 3.667, 4.333, AND 5.000 WOULD BE INCLUDED WITHIN THE SERIES,
WHILE, ACTUALLY, THE NUMBER NEAR 5.00 WOULD BE CALCULATED TO BE
5.001 AND WOULD THEREFORE BE OUTSIDE THE SERIES. ^ALTHOUGH ^^SLACK
\\CAN BE SET TO ZERO, A VALUE OF ABOUT 0.01 IS RECOMMENDED. ^IN THE
ABOVE EXAMPLE, ^^SLACK=0.01 \\WOULD CAUSE THE ACTUAL UPPER BOUND TO
BE 5.00667 SO THAT THE NUMBER CALCULATED NEAR THE UPPER BOUND WOULD
BE INCLUDED WITHIN THE SERIES. ^^SLACK \\SHOULD ALMOST CERTAINLY
NEVER EXCEED 0.5 SINCE LARGER VALUES WOULD OFTEN LEAD TO THE
INCLUSION OF VALUES NOT MEANT BY THE USER. ^^SLACK \\IS IGNORED IF
^^KONTRL \\IS LESS THAN OR EQUAL TO ZERO.
.SKIP
.INDENT -9
^^IBUFFR#=#\\INPUT BUFFER ARRAY CONTAINING CHARACTERS TYPED BY USER,
READ BY A MULTIPLE OF AN ^A1 FORMAT, WHICH IS TO BE SEARCHED FOR
SERIES SPECIFICATIONS. ^^IBUFFR \\THEN CONTAINS ONE CHARACTER PER
COMPUTER STORAGE LOCATION.
.SKIP
.INDENT -9
^^MAXBFR#=#\\MAXIMUM SUBSCRIPT OF ^^IBUFFR \\ARRAY TO BE SEARCHED
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED BOTH FOR INPUT TO THESE ROUTINES,
AND FOR OUTPUT TO THE CALLING PROGRAM.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LOWBFR#=#\\INPUT CONTAINING THE SUBSCRIPT WITHIN THE ^^IBUFFR
\\ARRAY OF THE FIRST (LEFTMOST) CHARACTER WHICH CAN BE SCANNED FOR A
SERIES SPECIFICATION. ^^LOWBFR \\IS RETURNED UNCHANGED IF THIS CALL
TO THIS ROUTINE MERELY GENERATES THE NEXT MEMBER OF A SERIES BEGUN
BY A PREVIOUS CALL. ^IF A NEW SERIES SPECIFICATION IS EVALUATED BY
THIS CALL TO THIS ROUTINE, THEN ^^LOWBFR \\WILL BE RETURNED POINTING
TO THE NEXT CHARACTER BEYOND THE SERIES SPECIFICATION. ^IF A SECOND
NUMBER IMMEDIATELY FOLLOWS A FIRST WITHOUT A SEPARATING SLASH OR
COLON OR ASTERISK, THEN ^^LOWBFR \\WILL BE RETURNED POINTING TO THE
FIRST CHARACTER OF THE SECOND NUMBER. ^IF EITHER A SPACE OR A TAB
CHARACTER FOLLOWS A SERIES SPECIFICATION, THEN ^^LOWBFR \\WILL BE
RETURNED POINTING TO THE SPACE OR TAB CHARACTER. ^IF THE FIRST
PRINTING CHARACTER AT OR TO RIGHT OF ^^IBUFFR(LOWBFR) \\IS AN
EXCLAMATION POINT, OR IF THERE ARE NO PRINTING CHARACTERS AT OR TO
THE RIGHT OF ^^IBUFFR(LOWBFR), \\THEN ^^LOWBFR \\WILL BE RETURNED
CONTAINING ^^MAXBFR+1 \\AND ^^KIND \\WILL BE RETURNED CONTAINING
ONE. ^^LOWBFR, MANY \\AND ^^KIND \\MUST BE SET BY THE CALLING
PROGRAM BEFORE ANYTHING IS PROCESSED IN THE CURRENT CONTENTS OF THE
^^IBUFFR \\ARRAY, BUT THEN SHOULD NOT BE MODIFIED BY THE CALLING
PROGRAM UNTIL THE ENTIRE CONTENTS OF THE ^^IBUFFR \\ARRAY HAVE BEEN
PROCESSED (EXCEPT THAT ^^KIND \\CAN BE RETURNED TO ZERO TO ABANDON
THE GENERATION OF A PARTICULAR SERIES).
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^MANY###=#\\SHOULD BE INPUT CONTAINING ZERO EACH TIME THIS ROUTINE
IS CALLED TO BEGIN PROCESSING OF A NEW LOGICAL SECTION OF TEXT, AS
FOR EXAMPLE WHEN BEGINNING PROCESSING OF A LINE OF TEXT NOT TIED TO
THE PREVIOUS LINE BY AN AMPERSAND AT THE END OF THE PREVIOUS LINE,
OR WHEN PROCESSING THE TEXT TO THE RIGHT OF A SEMICOLON. ^THE
INITIAL ZEROING OF THIS ARGUMENT MUST BE DONE BY THE CALLING
PROGRAM, BUT THEREAFTER THE VALUE RETURNED BY THE PREVIOUS CALL TO
THIS ROUTINE CAN USUALLY BE USED. ^^MANY \\IS RETURNED SET TO ZERO
EACH TIME A SEMICOLON (^^KIND=2) \\IS FOUND, AND EACH TIME AN END OF
LINE NOT TIED TO THE FOLLOWING LINE BY AN AMPERSAND (^^KIND=1) \I\S
\\FOUND. ^^MANY \\IS RETURNED CONTAINING ONE PLUS ITS INPUT ABSOLUTE
VALUE EACH TIME A NEW SPECIFICATION OF EITHER A SINGLE NUMBER OR OF
A SERIES IS FOUND, EACH TIME AN ERRONEOUS SERIES SPECIFICATION IS
FOUND, EACH TIME AN UNKNOWN CHARACTER IS FOUND, OR EACH TIME AN
INDICATION OF A MISSING SERIES SPECIFICATION IS FOUND. ^^MANY \I\S
\\RETURNED UNCHANGED IF THIS CALL TO THIS ROUTINE MERELY GENERATES
THE NEXT MEMBER OF A SERIES ALREADY BEGUN BY A PREVIOUS CALL TO THIS
ROUTINE. ^^KIND \\IS RETURNED CONTAINING THE VALUE 3 AND ^^MANY \I\S
\\RETURNED CONTAINING THE NEGATIVE OF THE NUMBER OF ITEMS FOUND IF
THE NEXT PRINTING CHARACTER FOLLOWING A COMMA IS AN AMPERSAND.
^^MANY \\SHOULD NOT BE CHANGED BY THE CALLING PROGRAM IF AN
AMPERSAND (^^KIND \\BEING RETURNED=3) IS FOUND INDICATING THAT THE
SUBSEQUENT CALL TO THIS ROUTINE IS TO PROCESS TEXT WHICH IS TO BE
TREATED AS THOUGH IT APPEARED IN PLACE OF THE AMPERSAND AND THE
CHARACTERS TO ITS RIGHT. ^THE EFFECT IS NOT QUITE THE SAME AS IF THE
USER HAD TYPED ALL OF THE TEXT ON A SINGLE LINE SINCE A SINGLE
SERIES SPECIFICATION CANNOT BE SPLIT ACROSS THE LINE BOUNDARY.
.SKIP
^IF ^^MANY \\IS INPUT CONTAINING ZERO, THEN AN INITIAL COMMA IN THE
INPUT TEXT BUFFER IS TAKEN TO INDICATE AN INITIAL MISSING ITEM, AND
^^MANY \\IS THEN RETURNED CONTAINING 1. ^IF ^^MANY \\IS INPUT
GREATER THAN ZERO, THEN AN INITIAL COMMA IS IGNORED IF FOLLOWED BY A
SERIES SPECIFICATION. ^IF ^^MANY \\IS INPUT GREATER THAN ZERO, THEN
AN INITIAL COMMA FOLLOWED BY NO OTHER PRINTING CHARACTERS, BY A
SEMICOLON, OR BY AN EXCLAMATION POINT INDICATES A MISSING ITEM. ^IF
^^MANY \\IS INPUT GREATER THAN ZERO, THEN AN INITIAL COMMA FOLLOWED
BY AN AMPERSAND WILL CAUSE THE REMAINING CHARACTERS IN THE BUFFER TO
BE IGNORED, AND ^^MANY \\WILL BE RETURNED CONTAINING THE NEGATIVE OF
ITS INPUT VALUE. ^IF ^^MANY \\IS INPUT NEGATIVE, THEN IT IS ASSUMED
THAT THE CONTENTS OF THE CURRENT BUFFER CONTINUE A PREVIOUS LINE
WHICH TERMINATED WITH A COMMA FOLLOWED BY AN AMPERSAND, AND ^^MANY
\\IS RETURNED GREATER THAN ZERO.
.SKIP
.INDENT -9
^^KIND###=#\\SHOULD BE INPUT CONTAINING ZERO THE FIRST TIME THIS
ROUTINE IS CALLED, OR TO ABANDON GENERATION OF VALUES WITHIN A
PARTICULAR SERIES. ^^KIND \\IS RETURNED DESCRIBING THE KIND OF ITEM
LOCATED IN THE ^^IBUFFR \\ARRAY. ^EXCEPT IN THE CASES OF WHEN THE
BUFFER IS FOUND TO BE EMPTY, OR WHEN THE CALLING PROGRAM RESETS
^^KIND \\TO ZERO TO TERMINATE THE EXPANSION OF THE CURRENT SERIES,
THE RETURNED VALUE OF ^^KIND \\SHOULD BE USED FOR THE NEXT CALL TO
THIS ROUTINE TO INFORM THIS ROUTINE WHETHER A SERIES IS BEING
EXPANDED. ^^KIND \\IS RETURNED CONTAINING ONE OF THE FOLLOWING VALUES.
.INDENT -2
=#1, NOTHING, EXCEPT PERHAPS A COMMENT INDICATED BY A LEADING
EXCLAMATION POINT, WAS FOUND AT OR TO THE RIGHT OF ^^IBUFFR(LOWBFR).
T\\HE CALLING PROGRAM SHOULD READ A NEW LINE INTO THE ^^IBUFFR
\\ARRAY BEFORE AGAIN CALLING THIS ROUTINE IF ADDITIONAL VALUES ARE
REQUIRED. ^^MANY \\IS RETURNED SET TO ZERO.
.INDENT -2
=#2, A SEMICOLON WAS FOUND AS THE FIRST PRINTING CHARACTER AT OR TO
THE RIGHT OF ^^IBUFFR(LOWBFR). LOWBFR \\IS RETURNED POINTING TO THE
NEXT CHARACTER BEYOND THE LOCATION OF THE SEMICOLON. ^IT IS ASSUMED
THE CALLING PROGRAM WILL TREAT THE APPEARANCE OF THE SEMICOLON AS
MARKING THE END OF A STATEMENT. ^^MANY \\IS RETURNED SET TO ZERO.
.LEFT MARGIN 9
.INDENT -2
=#3, AN AMPERSAND WAS FOUND AS THE FIRST PRINTING CHARACTER AT OR TO
THE RIGHT OF ^^LOWBFR. T\\HE TEXT TO THE RIGHT OF THE AMPERSAND IS
TAKEN AS A COMMENT SO ^^LOWBFR \\IS RETURNED POINTING BEYOND THE
RIGHT END OF THE BUFFER. ^IT IS ASSUMED THAT THE CALLING PROGRAM
WILL READ IN THE CONTENTS OF A NEW BUFFER, THEN AGAIN REQUEST A NEW
SERIES EVALUATION FROM THIS ROUTINE. ^THE VALUE OF ^^MANY \\MUST NOT
BE CHANGED BY THE CALLING PROGRAM PRIOR TO THIS FOLLOWING CALL. ^THE
EFFECT IS NOT QUITE THE SAME AS IF THE USER HAD TYPED ALL OF THE
TEXT ON A SINGLE LINE SINCE A SERIES SPECIFICATION CANNOT BE SPLIT
ACROSS A LINE BOUNDARY.
.INDENT -2
=#4, A NUMBER OR SERIES SPECIFICATION WAS NOT FOUND, BUT A COMMA WAS
FOUND INDICATING A MISSING SERIES SPECIFICATION. ^EITHER ^^NEWVAL
\O\R VALNEW, \\WHICHEVER IS APPROPRIATE, IS RETURNED WITH THE VALUE
ZERO SO ^^KIND=4 \\CAN BE CONSIDERED EQUIVALENT TO ^^KIND=5 \I\F
\\SUCH IS APPROPRIATE TO THE APPLICATION FOR WHICH THIS ROUTINE IS
BEING USED.
.INDENT -2
=#5, THE NEXT NUMBER SPECIFIED BY THE CONTENTS OF THE INPUT BUFFER
IS BEING RETURNED AS THE VALUE OF THE ARGUMENT ^^NEWVAL \O\R VALNEW,
\\WHICHEVER IS APPROPRIATE.
.INDENT -2
=#6, A SERIES WAS SPECIFIED IN ASTERISK NOTATION, BUT NO NUMBER
APPEARED TO RIGHT OF THE ASTERISK. ^^NEWVAL \O\R VALNEW, \\WHICHEVER
IS APPROPRIATE, IS RETURNED WITH VALUE ZERO. ^SUBSEQUENT CALLS TO
THIS ROUTINE WILL CONTINUE TO RETURN ^^KIND=6 \\UNTIL THE SPECIFIED
NUMBER OF NULL VALUES HAS BEEN RETURNED TO THE CALLING PROGRAM.
^NOTE THAT IF A NUMBER DOES NOT PRECEDE THE ASTERISK, THEN ^^KIND
\\IS RETURNED WITH THE VALUE 7 WHETHER OR NOT A NUMBER FOLLOWS THE
ASTERISK.
.INDENT -2
=#7, A SERIES WAS SPECIFIED IN ASTERISK NOTATION, BUT NO NUMBER
APPEARED TO THE LEFT OF THE ASTERISK OR THE NUMBER TO LEFT OF THE
ASTERISK WAS LESS THAN 1 (OR LESS THAN 0.5 IF EVALUATED AS A REAL
NUMBER AS THIS NUMBER IS ROUNDED WHEN USED). ^THE VALUE OF THE
NUMBER TO THE RIGHT OF THE ASTERISK WILL BE RETURNED IN EITHER
^^NEWVAL \O\R VALNEW, \\WHICHEVER IS APPROPRIATE. ^IF NO NUMBER
APPEARS TO THE RIGHT OF THE ASTERISK, THEN EITHER ^^NEWVAL \O\R
VALNEW, \\WHICHEVER IS APPROPRIATE, WILL BE RETURNED CONTAINING ZERO.
.INDENT -2
=#8, A SERIES SPECIFICATION WAS FOUND WHICH CONTAINED TOO MANY
NUMBERS, TOO MANY ASTERISKS, TOO MANY SLASHES OR TOO MANY COLONS.
.INDENT -2
=#9, THE FIRST PRINTING CHARACTER (OTHER THAN A POSSIBLE COMMA IF
^^MANY \\WAS INPUT GREATER THAN ZERO) IN OR TO RIGHT OF
^^IBUFFR(LOWBFR) \\WAS NOT A CHARACTER WHICH COULD APPEAR IN A
NUMBER OR NUMBER RANGE, AND WAS NOT A COMMA, SEMICOLON, AMPERSAND OR
EXCLAMATION POINT. ^^LOWBFR \\IS RETURNED POINTING TO THE NEXT
CHARACTER BEYOND THIS CHARACTER. ^THE CALLING PROGRAM MUST DECREMENT
^^LOWBFR \\BY 1 IF THE UNKNOWN CHARACTER IS TO BE IDENTIFIED BY
OTHER ROUTINES IN THIS PACKAGE.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED TO RETURN THE NEXT VALUE REPRESENTED
BY THE CONTENTS OF THE TEXT BUFFER IF THIS IS BEING EVALUATED AS AN
INTEGER.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^NEWVAL#=#\\RETURNED CONTAINING THE NEXT INTEGER VALUE EVALUATED BY
THIS ROUTINE (THE VALUE OF ^^KONTRL \\BEING LESS THAN OR EQUAL TO
ZERO). ^THE CONTENTS OF THIS ARGUMENT SHOULD NOT BE CHANGED BY THE
CALLING PROGRAM.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING 2 ARGUMENTS ARE USED, TOGETHER WITH ^^KIND \\AND
^^NEWVAL, \\BY THE CURRENT CALL TO THIS ROUTINE TO SPECIFY THE
CHARACTERISTICS OF THE CURRENTLY GENERATED INTEGER SERIES TO THE
SUBSEQUENT CALL TO THIS ROUTINE. ^NEITHER OF THESE ARGUMENTS SHOULD
BE CHANGED BY THE CALLING PROGRAM, AND THEIR RETURNED VALUES CAN
PROBABLY OTHERWISE BE IGNORED BY THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^INCVAL#=#\\RETURNED CONTAINING THE INCREMENT IF AN INTEGER SERIES
WAS SPECIFIED IN SLASH OR COLON NOTATION. ^^INCVAL \\IS USED BY THE
SUBSEQUENT CALL TO THIS ROUTINE EVEN IF THE SERIES IS COMPOSED OF
REAL NUMBERS. ^^INCVAL \\IS RETURNED NONZERO FOR USE AS A SIMPLE
SWITCH BY THE SUBSEQUENT CALL TO THIS ROUTINE IF A REAL NUMBER
SERIES WAS SPECIFIED IN SLASH OR COLON NOTATION. ^^INCVAL \\IS SET
TO ZERO IF A SERIES SPECIFIED IN ASTERISK NOTATION WAS FOUND,
WHETHER OR NOT THE SERIES WAS EVALUATED IN INTEGER OR REAL MODE.
.SKIP
.INDENT -9
^^LMTVAL#=#\\RETURNED CONTAINING THE ENDING VALUE IF AN INTEGER
SERIES WAS SPECIFIED IN SLASH OR COLON NOTATION. ^IF THE INTEGER
SERIES WAS SPECIFIED IN ASTERISK NOTATION, THEN ^^LMTVAL \I\S
\\RETURNED CONTAINING THE NUMBER OF TIMES THAT THIS ROUTINE MUST
RETURN THE SAME VALUE OF ARGUMENT ^^NEWVAL, \\INCLUDING THE CURRENT
RETURN. ^IN OTHER WORDS, THE FIRST TIME A NEW INTEGER VALUE
EXPRESSED IN ASTERISK NOTATION IS RETURNED, ^^LMTVAL \\IS EQUAL TO
THE NUMBER LEFT OF THE ASTERISK, NOT TO ONE LESS THAN THE NUMBER
LEFT OF THE ASTERISK.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED TO RETURN THE NEXT VALUE REPRESENTED
BY THE CONTENTS OF THE TEXT BUFFER IF THIS IS BEING EVALUATED AS A
REAL NUMBER.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^VALNEW#=#\\RETURNED CONTAINING THE NEXT REAL VALUE EVALUATED BY
THIS ROUTINE (THE VALUE OF ^^KONTRL \\BEING GREATER THAN ZERO). ^THE
CONTENTS OF THIS ARGUMENT SHOULD NOT BE CHANGED BY THE CALLING
PROGRAM.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING 2 ARGUMENTS ARE USED, TOGETHER WITH ^^KIND \\AND
^^VALNEW (\\AND ^^INCVAL, \\SEE ABOVE), BY THE CURRENT CALL TO THIS
ROUTINE TO SPECIFY THE CHARACTERISTICS OF THE CURRENTLY GENERATED
REAL NUMBER SERIES TO THE SUBSEQUENT CALL TO THIS ROUTINE. ^NEITHER
OF THESE ARGUMENTS SHOULD BE CHANGED BY THE CALLING PROGRAM, AND
THEIR RETURNED VALUES CAN PROBABLY OTHERWISE BE IGNORED BY THE
CALLING PROGRAM.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^VALINC#=#\\RETURNED CONTAINING THE INCREMENT IF A REAL NUMBER
SERIES WAS SPECIFIED IN SLASH OR COLON NOTATION.
.SKIP
.INDENT -9
^^VALLMT#=#\\RETURNED CONTAINING THE ENDING VALUE IF A REAL NUMBER
SERIES WAS SPECIFIED IN SLASH OR COLON NOTATION. ^IF THE REAL NUMBER
SERIES WAS SPECIFIED IN ASTERISK NOTATION, THEN ^^VALLMT \I\S
\\RETURNED CONTAINING THE NUMBER OF TIMES THAT THIS ROUTINE MUST
RETURN THE SAME VALUE OF ARGUMENT ^^VALNEW, \\INCLUDING THE CURRENT
RETURN. ^IN OTHER WORDS, THE FIRST TIME A NEW REAL NUMBER VALUE
EXPRESSED IN ASTERISK NOTATION IS RETURNED, ^^VALLMT \\IS EQUAL TO
THE NUMBER FOUND LEFT OF THE ASTERISK, NOT TO ONE LESS THAN THE
NUMBER LEFT OF THE ASTERISK.
.PAGE
.LEFT MARGIN 0
.FILL
.CENTER
^DEMONSTRATION ^PROGRAM TO ^INTERACTIVELY ^TEST ^^DANEXT
.CENTER
------------- ------- -- ------------- ---- ------
.SKIP
T\\HE PROGRAM LISTED ON THE FOLLOWING PAGES ACCEPTS A LINE OF TEXT
FROM THE USER, THEN REPORTS EACH PUNCTUATION MARK, EACH SINGLE
VALUE, AND EACH OF THE VALUES IN THE RANGES INCLUDED IN THE TEXT. ^A
SAMPLE DIALOG BETWEEN THE PROGRAM AND THE USER IS PRESENTED
FOLLOWING THE LISTING OF THE PROGRAM.
.NOFILL
.SKIP 2
^^C     PROGRAM TO DEMONSTRATE DANEXT ROUTINE
C
      DATA ITTY,JTTY,MAXBFR/5,5,58/
      DIMENSION IBUFFR(58),JBUFFR(20)
      DATA IGREAT/1H>/
      WRITE(JTTY,1)
    1 FORMAT(1X,37HPROGRAM TO DEMONSTRATE DANEXT ROUTINE/
     124H TEST DAINXT (Y OR N) = ,$)
      READ(ITTY,2)IANS
    2 FORMAT(1A1)
      KONTRL=0
      IF(IANS.EQ.1HY)GO TO 7
      WRITE(JTTY,3)
    3 FORMAT(10H KONTRL = ,$)
      READ(ITTY,4)KONTRL
    4 FORMAT(I)
      WRITE(JTTY,5)
    5 FORMAT(10H SLACK  = ,$)
      READ(ITTY,6)SLACK
    6 FORMAT(F)
    7 IRADIX=10
      IF(KONTRL.LT.0)IRADIX=8
      MANY=0
C
C     READ TEXT TYPED BY USER
    8 WRITE(JTTY,9)
    9 FORMAT(1X,1H*,$)
      READ(ITTY,10)IBUFFR
   10 FORMAT(100A1)
      LOWBFR=1
      KIND=0
C
C     GET NEXT NUMBER IN SERIES
   11 INIBFR=LOWBFR
      IF(IANS.NE.1HY)CALL DANEXT(KONTRL,SLACK,IBUFFR,MAXBFR,
     1LOWBFR,MANY,KIND,NEWVAL,INCVAL,LMTVAL,VALNEW,
     2VALINC,VALLMT)
      IF(IANS.EQ.1HY)CALL DAINXT(IBUFFR,MAXBFR,
     1LOWBFR,MANY,KIND,NEWVAL,INCVAL,LMTVAL)
      IF(LOWBFR.LE.INIBFR)GO TO 13
      J=LOWBFR-1
      WRITE(JTTY,12)(IBUFFR(I),I=INIBFR,J),IGREAT
   12 FORMAT(1X,1H<,100A1)
   13 GO TO(14,16,18,20,22,27,22,29,31),KIND
C
C     REPORT RESULT OF CURRENT CALL TO DANEXT
   14 WRITE(JTTY,15)
   15 FORMAT(6H EMPTY)
      GO TO 8
   16 WRITE(JTTY,17)
   17 FORMAT(17H END OF STATEMENT)
      GO TO 11
   18 WRITE(JTTY,19)
   19 FORMAT(10H AMPERSAND)
      GO TO 8
   20 WRITE(JTTY,21)
   21 FORMAT(8H MISSING)
      GO TO 11
   22 KOUNT=0
      IF(KONTRL.GT.0)GO TO 23
      CALL DANUMB(0,NEWVAL,IRADIX,JBUFFR,KOUNT,0,20)
      GO TO 24
   23 CALL DARITE(VALNEW,-1,0,0,0,
     1-3,0,20,-1,8,6,6,
     2-1,0,5,0,0,0,0,
     320,JBUFFR,KOUNT,IERR)
   24 IF(KIND.EQ.5)WRITE(JTTY,25)(JBUFFR(I),I=1,KOUNT)
   25 FORMAT(7H VALUE ,20A1)
      IF(KIND.EQ.7)WRITE(JTTY,26)(JBUFFR(I),I=1,KOUNT)
   26 FORMAT(21H ZERO DUPLICATION OF ,20A1)
      GO TO 11
   27 WRITE(JTTY,28)
   28 FORMAT(32H ASTERISK NOT FOLLOWED BY NUMBER)
      GO TO 11
   29 WRITE(JTTY,30)
   30 FORMAT(15H TOO MANY ITEMS)
      GO TO 11
   31 WRITE(JTTY,32)
   32 FORMAT(27H SEPARATOR OTHER THAN COMMA)
      GO TO 11
      END
.PAGE
T\\YPICAL ^DIALOG ^BETWEEN ^^DANEXT D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
^^PROGRAM TO DEMONSTRATE DANEXT ROUTINE
TEST DAINXT (Y OR N) = N
KONTRL = 4
SLACK  = 0.01
*1.23K 0.012M 1.067E-8!TEST SIMPLE NUMBERS
<1.23K>
VALUE 1230
< 0.012M>
VALUE 12000
< 1.067E-8>
VALUE 1.067E-8
<!TEST SIMPLE NUMBERS                 >
EMPTY
*1E6/2E5/2E6,3*,,2*0.04618,,;0.0245/0.002/0.03
<1E6/2E5/2E6>
VALUE 1E6
VALUE 1.2E6
VALUE 1.4E6
VALUE 1.6E6
VALUE 1.8E6
VALUE 2E6
<,3*>
ASTERISK NOT FOLLOWED BY NUMBER
ASTERISK NOT FOLLOWED BY NUMBER
ASTERISK NOT FOLLOWED BY NUMBER
<,>
MISSING
<,2*0.04618>
VALUE .04618
VALUE .04618
<,>
MISSING
<,>
MISSING
<;>
END OF STATEMENT
<0.0245/0.002/0.03>
VALUE .0245
VALUE .0265
VALUE .0285
<             >
EMPTY
*  4*1352.01   ,   ,   2/5   ;   ,  -17/2/-25  _&WITH SPACES
<  4*1352.01>
VALUE 1352.01
VALUE 1352.01
VALUE 1352.01
VALUE 1352.01
<   ,   >
MISSING
<,   2/5>
VALUE 2
VALUE 3
VALUE 4
VALUE 5
<   ;>
END OF STATEMENT
<   >
MISSING
<,  -17/2/-25>
VALUE -17
VALUE -19
VALUE -21
VALUE -23
VALUE -25
<  _&WITH SPACES>
AMPERSAND
*0/0.667/2      _&TESTING SLACK
<0/0.667/2>
VALUE 0
VALUE .667
VALUE 1.334
VALUE 2.001
<      _&TESTING SLACK                             >
AMPERSAND
.SUBTITLE ^^DANUMB, I\\NTEGER ^NUMBER ^^FORTRAN O\\UTPUT ^ROUTINE
.PAGE
.LEFT MARGIN 0
.NOFILL
^^DDDDDDD      AAA    NNN   NNN UUU   UUU MMM    MMM BBBBBBBBB
DDD   DDD  AAA AAA  NNNN  NNN UUU   UUU MMMM  MMMM BBB   BBB
DDD   DDD AAA   AAA NNN N NNN UUU   UUU MMM MM MMM BBBBBBB
DDD   DDD AAAAAAAAA NNN  NNNN UUU   UUU MMM    MMM BBB   BBB
DDDDDDD   AAA   AAA NNN   NNN UUUUUUUUU MMM    MMM BBBBBBBBB
.SKIP 3
.FILL
.CENTER
DANUMB, I\\NTEGER ^NUMBER ^^FORTRAN O\\UTPUT ^ROUTINE
.CENTER
------##------- ------ ------- ------ -------
.SKIP
^^DANUMB \\REPRESENTS AN INTEGER VALUE SO THAT IT CAN BE WRITTEN
WITH A ^^FORTRAN \\FORMAT STATEMENT CONTAINING A MULTIPLE OF AN ^A1
ALPHAMERIC SPECIFICATION. ^^DANUMB \\IS MUCH SHORTER THAN THE FREE
FORMAT FLOATING POINT OUTPUT ROUTINE ^^DARITE, \\BOTH BECAUSE FEWER
OPTIONS ARE PROVIDED BY ^^DANUMB \\AND BECAUSE INTEGER NUMBERS ARE
EASIER TO REPRESENT.
.SKIP
^^DANUMB \\CAN REPRESENT ANY INTEGER WHICH CAN BE CALCULATED BY A
COMPUTER WHICH USES TWO'S COMPLEMENT NOTATION, INCLUDING THE LARGEST
NEGATIVE NUMBER WHICH CONSISTS OF THE SIGN BIT ON AND ALL OTHER BITS
OFF AND FOR WHICH THE ABSOLUTE VALUE CANNOT BE STORED. ^IF ^^DANUMB
\\IS USED TO GENERATE ^^FORTRAN \\SOURCE CODE, AS FOR EXAMPLE WHEN
USED BY THE INTEGER DATA STATEMENT GENERATOR, IT IS POSSIBLE THAT
THE ^^FORTRAN \\COMPILER WILL NOT ACCEPT THIS LARGEST NEGATIVE
NUMBER SINCE THE COMPILER MAY EVALUATE A NEGATIVE NUMBER BY NEGATING
ITS ABSOLUTE VALUE. ^SIMILARLY, ON COMPUTERS WHICH TAKE THE SIGN BIT
ON AND ALL OTHER BITS OFF TO MEAN NEGATIVE ZERO, ^^DANUMB \\WILL
PRODUCE THE REPRESENTATION OF POSITIVE ZERO FOR THE VALUE NEGATIVE
ZERO.
.SKIP
^^DANUMB \\HAS NO OUTPUT ARGUMENT USED TO SIGNAL AN ERROR CONDITION.
^INSTEAD, THE CHARACTER COUNT ^^KOUNT \\IS RETURNED UNCHANGED IF THE
REPRESENTATION OF THE NUMBER WILL NOT FIT INTO THE BUFFER PROVIDED.
.PAGE
.CENTER
^THE ^^DANUMB A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DANUMB \I\S
.SKIP
.NOFILL
      SUBROUTINE DANUMB(KONTRL,NUMBER,IRADIX,LETTER,
     1KOUNT,LFTCOL,MAX)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION LETTER(MAX)
.FILL
.SKIP
T\\HE FOLLOWING ARE INPUT ARGUMENTS LEFT UNCHANGED
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KONTRL#=#0, \\LEFT JUSTIFY THE REPRESENTATION OF THE NUMBER.
.SKIP
^IF ^^KOUNT \\IS LESS THAN ^^LFTCOL, \\THEN THE OUTPUT BUFFER
STARTING AT ^^LETTER(KOUNT+1) \\AND EXTENDING THROUGH
^^LETTER(LFTCOL) \\WILL BE FILLED WITH SPACES.
.SKIP
^IF ^^KOUNT \\IS LESS THAN OR EQUAL TO ^^LFTCOL, \\THEN THE LEFTMOST
CHARACTER, WHICH WILL BE EITHER A MINUS SIGN OR THE LEFTMOST DIGIT
OF THE REPRESENTATION OF THE NUMBER, WILL BE PLACED IN
^^LETTER(LFTCOL+1).
.SKIP
I\F KOUNT \\IS GREATER THAN ^^LFTCOL \\MEANING THAT CHARACTERS ARE
ALREADY IN USE TO THE RIGHT OF ^^LFTCOL, \\THEN A SPACE WILL BE
PLACED IN ^^LETTER(KOUNT+1), \\AND THE LEFTMOST DIGIT OF THE
REPRESENTATION OF THE NUMBER WILL BE PLACED IN ^^LETTER(KOUNT+2).
.SKIP
I\\F THE REPRESENTATION OF THE NUMBER WILL FIT INTO THE OUTPUT
BUFFER, THEN THE CHARACTER COUNT ^^KOUNT \\WILL BE LEFT POINTING TO
THE LOCATION OF THE RIGHTMOST DIGIT OF THE REPRESENTATION OF THE
NUMBER. ^IF THE REPRESENTATION OF THE NUMBER WOULD EXTEND TO THE
RIGHT OF ^^LETTER(MAX), \\THEN THE CHARACTER COUNT ^^KOUNT \I\S
\\RETURNED UNCHANGED.
.SKIP
.INDENT -2
=#1, RIGHT JUSTIFY THE REPRESENTATION OF THE NUMBER SO THAT THE
RIGHTMOST DIGIT IS PLACED IN ^^LETTER(LFTCOL).
.SKIP
I\\F THE REPRESENTATION OF THE NUMBER REQUIRES LESS THAN
^^LFTCOL-KOUNT \\CHARACTERS, THEN FILL THE OUTPUT BUFFER WITH SPACES
STARTING AT ^^LETTER(KOUNT+1) \\AND EXTENDING UP TO THE LEFTMOST
CHARACTER OF THE REPRESENTATION OF THE NUMBER.
.SKIP
^IF THE REPRESENTATION OF THE NUMBER WILL FIT INTO THE OUTPUT
BUFFER, THEN THE CHARACTER COUNT ^^KOUNT \\WILL BE RETURNED EQUAL TO
^^LFTCOL. I\F LFTCOL \\IS GREATER THAN THE DIMENSION OF THE BUFFER,
OR IF THE NUMBER IS TOO LARGE TO BE REPRESENTED STARTING AT
^^LETTER(KOUNT+1) \\AND ENDING AT ^^LETTER(LFTCOL), \\THEN THE
CHARACTER COUNT ^^KOUNT \\IS RETURNED UNCHANGED.
.SKIP
.INDENT -9
^^NUMBER#=#\\THE INTEGER VALUE TO BE REPRESENTED.
.SKIP
.INDENT -9
^^IRADIX#=#\\THE RADIX WITH WHICH THE VALUE IS TO BE REPRESENTED.
^^IRADIX \\CAN VARY FROM 2 THROUGH 10, BUT ^^IRADIX \\VALUES 2 FOR
BINARY, 8 FOR OCTAL, AND 10 FOR DECIMAL REPRESENTATIONS ARE THE MOST
REASONABLE. ^IT MUST BE REMEMBERED THAT FOR NEGATIVE VALUES OF THE
ARGUMENT ^^NUMBER, \\IT IS THE VALUE OF THE ARGUMENT ^^NUMBER
\\WHICH IS REPRESENTED, NOT THE PARTICULAR SEQUENCE OF BITS BY WHICH
THE COMPUTER STORES THIS ARGUMENT. ^THUS THE VALUE DECIMAL -8 WOULD
BE REPRESENTED AS -10 FOR ^^IRADIX=8 \\AND AS -1000 FOR ^^IRADIX=2
\\EVEN IF THE COMPUTER USES TWO'S COMPLEMENT NOTATION TO STORE
NEGATIVE VALUES.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS AN ARRAY TO WHICH THE REPRESENTATION OF
THE VALUE IS APPENDED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LETTER#=#\\THE OUTPUT BUFFER INTO WHICH ^^DANUMB \\WILL PLACE THE
REPRESENTATION OF THE NUMBER AND WHICH CAN BE WRITTEN BY A MULTIPLE
OF AN ^A1 FORMAT BY THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED FOR BOTH INPUT TO, AND OUTPUT FROM
THIS ROUTINE.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KOUNT##=#\\IS INPUT CONTAINING THE NUMBER OF CHARACTERS ALREADY IN
USE IN THE OUTPUT BUFFER ^^LETTER \\ARRAY.
.SKIP
^IF THE REPRESENTATION OF THE VALUE WILL FIT INTO THE LETTER ARRAY,
THEN ^^KOUNT \\WILL BE RETURNED CONTAINING THE LOCATION WITHIN THE
^^LETTER \\ARRAY OF THE RIGHTMOST CHARACTER OF THE REPRESENTATION OF
THE VALUE. ^IF THE REPRESENTATION OF THE VALUE WILL NOT FIT INTO THE
^^LETTER \\ARRAY, THEN ^^KOUNT \\IS RETURNED UNCHANGED.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARE INPUT ARGUMENTS WHICH DESCRIBE THE SIZE OF THE
OUTPUT TEXT BUFFER. ^THESE ARGUMENTS ARE RETURNED UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LFTCOL#=#\\NUMBER OF CHARACTERS IN THE BUFFER WHICH ARE TO BE TO
THE LEFT OF THE REPRESENTATION OF THE NUMBER IF ^^KONTRL \\EQUALS 0.
.INDENT -2
=#POSITION IN THE BUFFER AT WHICH IS TO BE PLACED THE RIGHT DIGIT OF
THE REPRESENTATION OF THE NUMBER IF ^^KONTRL \\EQUALS 1.
.SKIP
.INDENT -9
^^MAX####=#\\THE DIMENSION OF THE OUTPUT BUFFER ^^LETTER \\ARRAY.
^THE CHARACTER COUNT ^^KOUNT \\WILL BE RETURNED UNCHANGED IF THE
REPRESENTATION OF THE VALUE WOULD EXTEND BEYOND ^^LETTER(MAX).
.SKIP 3
.LEFT MARGIN 0
.CENTER
A\N E\\XAMPLE OF THE USE OF ^^DANUMB
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE FOLLOWING SAMPLE PROGRAM DEMONSTRATES THE MANNER IN WHICH
^^DANUMB \\IS CALLED.
.SKIP
.NOFILL
.LEFT MARGIN 4
      ^^DIMENSION NUMBER(5),LETTER(50)
      DATA NUMBER/-123456,-123,0,123,123456/
C
C     PRODUCE MARGIN
      NMB=0
      KOUNT=0
    1 NMB=NMB+1
      IF(NMB.GT.9)NMB=0
      J=KOUNT
      CALL DANUMB(0,NMB,10,LETTER,KOUNT,KOUNT,50)
      IF(J.LT.KOUNT)GO TO 1
      TYPE 2,LETTER
    2 FORMAT(1X,50A1)
C
C     PRODUCE LEFT JUSTIFIED OUTPUT
      KOUNT=0
      DO 3 I=1,5
      J=KOUNT
      CALL DANUMB(0,NUMBER(I),10,LETTER,KOUNT,0,50)
      IF(J.GE.KOUNT)GO TO 4
    3 CONTINUE
    4 IF(KOUNT.GT.0)TYPE 2,(LETTER(I),I=1,KOUNT)
C
C     PRODUCE OUTPUT RIGHT JUSTIFIED IN WIDTH 10 FIELDS
      KOUNT=0
      DO 5 I=1,5
      LFTCOL=KOUNT+10
      CALL DANUMB(1,NUMBER(I),10,LETTER,KOUNT,LFTCOL,50)
    5 CONTINUE
      TYPE 2,(LETTER(I),I=1,KOUNT)
      STOP
      END
.FILL
.SKIP
.LEFT MARGIN 0
T\\HE OUTPUT GENERATED BY THE ABOVE PROGRAM IS SHOWN BELOW.
.LEFT MARGIN 4
.SKIP
.NOFILL
 12345678901234567890123456789012345678901234567890
 -123456 -123 0 123 123456
    -123456      -123         0       123    123456
.LEFT MARGIN 0
.FILL
.SUBTITLE ^^DAPAIR, R\\ETURNS AN ^INDEX AND AN ^ASSOCIATED ^VALUE
.PAGE
.LEFT MARGIN 0
.NOFILL
^^DDDDD           AAA   PPPPPP        AAA   IIIIII   RRRRRR
DD   DD        AAAA   PP    PP     AAAA     II     RR    RR
DD    DD      AA AA   PP    PP    AA AA     II     RR    RR
DD    DD     AA  AA   PPPPPP     AA  AA     II     RRRRRR
DD    DD    AAAAAAA   PP        AAAAAAA     II     RR  RR
DD   DD    AA    AA   PP       AA    AA     II     RR   RR
DDDDD     AA     AA   PP      AA     AA   IIIIII   RR    RR
.SKIP 2
.FILL
.CENTER
DAPAIR, R\\ETURNS AN ^INDEX AND AN ^ASSOCIATED ^VALUE
.CENTER
------##------- -- ----- --- -- ---------- -----
.SKIP
^^DAPAIR \\RETURNS TO THE CALLING PROGRAM A PAIR OF VALUES
REPRESENTED BY THE CHARACTERS IN AN INPUT BUFFER READ BY THE CALLING
PROGRAM WITH A MULTIPLE OF AN ^A1 FORMAT. ^THE PAIR OF VALUES IS
ASSUMED TO CONSIST OF AN INDEX (OR A SUBSCRIPT), WHICH IS
REPRESENTED FIRST IN THE INPUT BUFFER, AND OF A VALUE TO BE
ASSOCIATED WITH THIS INDEX. ^IF SUBSEQUENT CALLS TO THIS ROUTINE ARE
TO ASSIGN A SEQUENCE OF VALUES WITH A CONSTANT INCREMENT TO EITHER
THE INDEX OR THE ASSOCIATED VALUE, THEN THE REPRESENTATION OF A
SINGLE INDEX OR OF A SINGLE RANGE OF INDEXES IS FOLLOWED BY THE
REPRESENTATIONS OF THE SEVERAL ASSOCIATED VALUES AND/OR OF THE
SEVERAL RANGES OF ASSOCIATED VALUES. ^IF BOTH NUMBERS ARE SPECIFIED
AS MEMBERS OF RANGES, THEN THE FIRST CALL TO THIS ROUTINE RETURNS
THE FIRST VALUE OF THE FIRST RANGE AS THE INDEX AND THE FIRST VALUE
OF THE SECOND RANGE AS THE ASSOCIATED VALUE, THE SECOND CALL TO THIS
ROUTINE RETURNS THE SECOND VALUE OF THE FIRST RANGE AS THE INDEX AND
THE SECOND VALUE OF THE SECOND RANGE AS THE ASSOCIATED VALUE, AND SO
ON. ^IF THE RANGE OF INDEXES IS EXHAUSTED PRIOR TO THE GENERATION OF
THE FINAL MEMBER OF THE RANGE OF ASSOCIATED VALUES, THEN THE FINAL
VALUE OF THE INDEX IS RETURNED UNCHANGED WITH THE SUBSEQUENT
ASSOCIATED VALUES, BUT THE CALLING PROGRAM IS INFORMED OF THIS
CONDITION AND CAN ADJUST THE INDEX AS NECESSARY. ^ONCE BOTH THE
RANGE OF INDEXES AND THE CURRENT RANGE OF ASSOCIATED VALUES HAVE
BEEN EXHAUSTED, THEN THE FOLLOWING REPRESENTATION OF A SINGLE NUMBER
OR OF A RANGE OF NUMBERS CAN SPECIFY THE INDEXES OF A SUBSEQUENT
PAIR, OR CAN SPECIFY ADDITIONAL VALUES TO BE ASSOCIATED WITH THE
SAME FINAL INDEX.
.SKIP
^SPACES AND/OR TABS ARE ALLOWED BETWEEN THE REPRESENTATIONS OF
NUMBERS AND/OR OF NUMBER RANGES. ^THE CALLING PROGRAM CAN PROHIBIT
THE APPEARANCE OF PRINTING CHARACTERS BETWEEN THE REPRESENTATIONS OF
THE INDEX AND ITS ASSOCIATED VALUE, OR BETWEEN THE REPRESENTATIONS
OF SUBSEQUENT ASSOCIATED VALUES, IN WHICH CASE A COMMA INDICATES
THAT THE FOLLOWING NUMBER IS TO BE TAKEN AS A NEW INDEX, OR ELSE THE
CALLING PROGRAM CAN ALLOW COMMAS BETWEEN THE INDEX AND THE
ASSOCIATED VALUE OR BETWEEN SUBSEQUENT ASSOCIATED VALUES, IN WHICH
CASE 2 ADJACENT COMMAS INDICATE A MISSING ASSOCIATED VALUE.
.SKIP
^THE RANGES OF VALUES TO BE ASSIGNED TO THE INDEXES OR TO THE
ASSOCIATED VALUES CAN BE SPECIFIED IN EITHER SLASH OR COLON OR
ASTERISK NOTATIONS. ^IN ASTERISK NOTATION, A VALUE TO BE REPEATED A
GIVEN NUMBER OF TIMES IS PRECEDED BY THE NUMBER OF TIMES AND AN
ASTERISK. ^IN SLASH OR COLON NOTATION (THE 2 CHARACTERS ARE
EQUIVALENT), A VALUE WHICH IS TO START AT A SPECIFIED INITIAL VALUE,
THEN BE VARIED UNTIL IT REACHES A FINAL BOUND IS EXPRESSED AS THE
INITIAL VALUE, THE INCREMENT BY WHICH THE VALUE IS TO BE VARIED, AND
THE FINAL BOUND SEPARATED BY SLASHES OR BY COLONS. ^IF EITHER THE
INITIAL VALUE OR THE FINAL BOUND IS MISSING IN SLASH OR COLON
NOTATION, THEN THE MISSING VALUE IS ASSUMED TO BE ZERO. ^IF THE
INCREMENT IS NOT INCLUDED IN SLASH OR COLON NOTATION, THEN THE
INCREMENT IS ASSUMED TO BE 1 AND ONLY A SINGLE SLASH OR A SINGLE
COLON IS NEEDED TO SEPARATE THE INITIAL VALUE AND THE FINAL BOUND.
^FOR EXAMPLE, THE TEXT
.SKIP
.NOFILL
.INDENT 5
1/3 4 5/7 8/10 4*11
.SKIP
.FILL
WOULD SPECIFY THE 4 PAIRS 1 AND 4, 2 AND 5, 3 AND 6, AND AN
UNCHANGED 3 AND 7. ^DEPENDING UPON HOW THIS ROUTINE IS CALLED, THE
NEXT PAIRS RETURNED COULD BE 3 AND 8, 3 AND 9, 3 AND 10, AND THEN 4
APPEARANCES OF 3 AND 11. ^THE ROUTINE COULD INSTEAD INFORM THE
CALLING PROGRAM THAT A NEW INDEX WAS FOUND BUT NOT EVALUATED, THEN
SUBSEQUENT CALLS WOULD RETURN THE PAIRS 8 AND 11, 9 AND 11, 10 AND
11, AND A FINAL UNCHANGED 10 AND 11. ^A SEMICOLON (OR A COMMA IF NOT
ALLOWED BETWEEN ADJACENT ASSOCIATED VALUES) APPEARING BETWEEN THE 7
AND 8 WOULD FORCE THE LATTER INTERPRETATION, SINCE THE APPEARANCE OF
A SEMICOLON (OR OF A COMMA IF NOT ALLOWED BETWEEN ADJACENT
ASSOCIATED VALUES) CAUSES THE FOLLOWING NUMBER TO BE INTERPRETED AS
THE INDEX OF A SUBSEQUENT PAIR.
.SKIP
^AN EXCLAMATION POINT AND ANYTHING TO ITS RIGHT ARE TAKEN TO BE A
COMMENT AND ARE OTHERWISE IGNORED. ^AN AMPERSAND AND ANYTHING TO ITS
RIGHT ARE ALSO IGNORED, BUT THE TEXT BEING INTERPRETED IS ASSUMED TO
CONTINUE WITH THAT SUPPLIED TO THE SUBSEQUENT CALL OF THIS ROUTINE.
^ADDITIONAL RANGES OF ASSOCIATED VALUES CAN APPEAR IN THE TEXT NEXT
READ INTO THE INPUT BUFFER AFTER AN AMPERSAND HAS BEEN FOUND, BUT
THE SPECIFICATION OF A SINGLE RANGE CANNOT BE CONTINUED IN THIS
MANNER ACROSS A LINE BOUNDARY. ^FOR EXAMPLE, THE PAIR SPECIFICATION
SHOWN ABOVE COULD INSTEAD HAVE BEEN GIVEN AS
.SKIP
.NOFILL
.INDENT 5
1/3 4 5/7_&^^THIS IS THE FIRST LINE
.INDENT 5
8/10 4*11!THIS IS THE SECOND LINE
.FILL
.SKIP
T\\WO VERSIONS OF THE ROUTINE ARE SUPPLIED. ^^DAPAIR \\REQUIRES THE
ROUTINES ^^DANEXT \\AND ^^DASPAN \\FOR THE EVALUATION OF RANGE
SPECIFICATIONS. ^^DAIPAR \\CANNOT EVALUATE RANGES, BUT MIGHT BE
SUFFICIENT IF THE INDEX VARIES IN A PREDETERMINED MANNER, AND IF
RANGES ARE NOT NEEDED FOR THE SPECIFICATION OF THE ASSOCIATED VALUES.
.PAGE
.CENTER
^THE ^^DAPAIR \\AND ^^DAIPAR A\\RGUMENT ^LISTS
.CENTER
--- ------ --- ------ -------- -----
.SKIP
^THE ARGUMENT LISTS OF ROUTINES ^^DAPAIR \\AND ^^DAIPAR \\ARE
.SKIP
.NOFILL
      ^^SUBROUTINE DAPAIR(SLACK ,KNDBGN,KNDEND,KONECT,IBUFFR,
     1    MAXBFR,LOWBFR,KIND  ,NEWBGN,NEWEND,BGNNEW,ENDNEW,
     2    IWHERE,INCBGN,LMTBGN,BGNINC,BGNLMT,INCEND,LMTEND,
     3    ENDINC,ENDLMT)
.SKIP
\\AND
.SKIP
      ^^SUBROUTINE DAIPAR(       KNDBGN,KNDEND,KONECT,IBUFFR,
     1    MAXBFR,LOWBFR,KIND  ,NEWBGN,NEWEND,BGNNEW,ENDNEW)
.SKIP
\\BOTH WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE ARGUMENT LISTS OF THESE ROUTINES ARE IDENTICAL WITH THE
EXCEPTION THAT THE FIRST ARGUMENT AND THE LAST 9 ARGUMENTS OF
^^DAPAIR \\DO NOT APPEAR IN THE ^^DAIPAR \\ARGUMENT LIST. ^IN
ADDITION, THE ARGUMENT ^^KIND \\WILL NOT BE ASSIGNED ITS 3 HIGHEST
POSSIBLE VALUES BY ^^DAIPAR. T\\HESE MISSING ARGUMENTS AND THE
MISSING VALUES OF ^^KIND \\ARE ALL USED IN THE EVALUATION OF VALUE
RANGES AND SO ARE NOT NEEDED BY ^^DAIPAR.
.SKIP
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT ONLY, AND ARE RETURNED
UNCHANGED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^SLACK##=#\\THE FRACTION OF THE INCREMENT OF A REAL NUMBER (NOT
INTEGER) RANGE EXPRESSED IN SLASH OR COLON NOTATION, BY WHICH THE
RETURNED VALUE CAN EXCEED THE FINAL BOUND AND STILL BE CONSIDERED TO
BE WITHIN THE RANGE. ^^SLACK \\IS NECESSARY BECAUSE OF THE
IMPRECISION OF CALCULATIONS INVOLVING FRACTIONAL REAL NUMBERS. ^FOR
EXAMPLE, IF THE USER WISHED TO HAVE THE INCREMENT BE 0.666.._. WITH
AN INITIAL VALUE OF 3.0 AND A FINAL BOUND OF 5.0, THEN THE USER
MIGHT TYPE 3/.667/5 AND EXPECT THAT THE NUMBERS 3.000, 3.667, 4.333,
AND 5.000 WOULD BE INCLUDED WITHIN THE RANGE, WHILE, ACTUALLY, THE
NUMBER NEAR 5.00 WOULD BE CALCULATED TO BE 5.001 AND WOULD THEREFORE
BE OUTSIDE THE RANGE. ^ALTHOUGH ^^SLACK \\CAN BE SET TO ZERO, A
VALUE OF ABOUT 0.01 IS RECOMMENDED. ^IN THE ABOVE EXAMPLE,
^^SLACK=0.01 \\WOULD CAUSE THE ACTUAL FINAL BOUND TO BE 5.00667 SO
THAT THE NUMBER CALCULATED NEAR THE FINAL BOUND WOULD BE WITHIN THE
RANGE. ^^SLACK \\IS IGNORED IF NUMBERS IN THE RANGE ARE RETURNED AS
INTEGERS.
.SKIP
.INDENT -9
^^KNDBGN#=#\\SPECIFIES WHETHER THE INDEX IS RETURNED AS THE INTEGER
ARGUMENT ^^NEWBGN \\OR AS THE REAL ARGUMENT ^^BGNNEW. T\\HE NUMBER
CAN BE TYPED WITH A DECIMAL POINT AND/OR AN EXPONENT REGARDLESS OF
THE VALUE OF ^^KNDBGN.
.INDENT -2
=#-1, \\THE INDEX IS CALCULATED AS AN OCTAL INTEGER AND IS RETURNED
AS THE ARGUMENT ^^NEWBGN. H\\OWEVER, THE NUMBER FOLLOWING THE LETTER
^E OF AN EXPONENT IS EVALUATED IN DECIMAL.
.INDENT -2
=#0, THE INDEX IS CALCULATED AS A DECIMAL INTEGER AND IS RETURNED AS
THE ARGUMENT ^^NEWBGN.
.INDENT -2
=#1 \\OR GREATER, THE INDEX IS RETURNED AS THE REAL ARGUMENT
^^BGNNEW. I\\F POSSIBLE, THE REAL NUMBER WILL BE ACCUMULATED AS AN
INTEGER, THEN BE CONVERTED TO REAL AND SHIFTED AS NECESSARY.
^^KNDBGN \\IS THE MAXIMUM NUMBER OF DIGITS IN THE INTEGER.
.SKIP
.INDENT -9
^^KNDEND#=#\\SPECIFIES WHETHER THE ASSOCIATED VALUE IS RETURNED AS
THE INTEGER ARGUMENT ^^NEWEND \\OR AS THE REAL ARGUMENT ^^ENDNEW.
T\\HE NUMBER CAN BE TYPED WITH A DECIMAL POINT AND/OR AN EXPONENT
REGARDLESS OF THE VALUE OF ^^KNDEND.
.INDENT -2
=#-1, \\THE ASSOCIATED VALUE IS CALCULATED AS AN OCTAL INTEGER AND
IS RETURNED AS THE ARGUMENT ^^NEWEND. H\\OWEVER, THE NUMBER
FOLLOWING THE LETTER ^E OF AN EXPONENT IS EVALUATED IN DECIMAL.
.INDENT -2
=#0, THE ASSOCIATED VALUE IS CALCULATED AS A DECIMAL INTEGER AND IS
RETURNED AS THE ARGUMENT ^^NEWEND.
.INDENT -2
=#1 \\OR GREATER, THE ASSOCIATED VALUE IS RETURNED AS THE REAL
ARGUMENT ^^ENDNEW. I\\F POSSIBLE, THE REAL NUMBER WILL BE
ACCUMULATED AS AN INTEGER, THEN BE CONVERTED TO REAL AND SHIFTED AS
NECESSARY. ^^KNDEND \\IS THE MAXIMUM NUMBER OF DIGITS IN THE INTEGER.
.SKIP
.INDENT -9
^^KONECT#=#\\SPECIFIES THE MANNER OF INTERPRETATION OF A FOLLOWING
NUMBER WHEN THE RANGE OF INDEXES AND THE RANGE OF ASSOCIATED VALUES
HAVE BOTH BEEN EXHAUSTED. ^^KONECT \\ALSO SPECIFIES WHETHER COMMAS
ARE TO INDICATE THAT THE FOLLOWING NUMBER, IF ANY, IS TO BE THE
INDEX OF A SUBSEQUENT PAIR, OR WHETHER COMMAS ARE ALLOWED BETWEEN
SUBSEQUENT VALUES ASSOCIATED WITH THE SAME INDEX OR RANGE OF
INDEXES. ^REGARDLESS OF THE VALUE OF ^^KONECT, \\ALL COMMAS
APPEARING TO THE LEFT OF AN INDEX ARE IGNORED.
.INDENT -2
=#-1, 0 OR 1, COMMAS CANNOT APPEAR BETWEEN THE SPECIFICATION OF AN
INDEX AND OF ITS ASSOCIATED VALUE AND CANNOT APPEAR BETWEEN THE
REPRESENTATIONS OF SUBSEQUENT ASSOCIATED VALUES. ^IF A COMMA IS
FOUND, THEN THE FOLLOWING NUMBER, IF ANY, IS TAKEN TO BE THE INDEX
OF A SUBSEQUENT PAIR OF NUMBERS.
.INDENT -2
=#-1, WHEN THE RANGE OF INDEXES AND THE RANGE OF ASSOCIATED VALUES
HAVE BOTH BEEN EXHAUSTED, A FOLLOWING REPRESENTATION OF A NUMBER OR
OF A RANGE OF NUMBERS ON THE SAME LINE IS TAKEN TO SPECIFY
ADDITIONAL ASSOCIATED VALUES.
.SKIP
^IF AN END OF LINE IS FOUND BEFORE THE RANGE OF INDEXES HAS BEEN
EXHAUSTED, THEN THE CALLING PROGRAM CAN REQUEST (BY SETTING ^^KIND=4
\\TO SIMULATE THE FINDING OF AN AMPERSAND) THAT THE EVALUATION OF
ASSOCIATED VALUES IS TO BE CONTINUED BY THE NEXT CALL TO THIS
ROUTINE IN THE NEW TEXT READ INTO THE INPUT BUFFER. ^IF AN END OF
LINE IS FOUND BEFORE THE RANGE OF INDEXES HAS BEEN EXHAUSTED, BUT
THE CALLING PROGRAM LEAVES ^^KIND \\UNCHANGED BEFORE AGAIN CALLING
THIS ROUTINE, THEN THE REMAINING INDEX VALUES WILL BE RETURNED
WITHOUT ASSOCIATED VALUES, FOLLOWING WHICH THE FIRST NUMBER IN THE
NEW CONTENTS OF THE TEXT BUFFER WILL BE INTERPRETED AS THE INDEX OF
A NEW PAIR.
.SKIP
^IF AN AMPERSAND IS FOUND TO THE RIGHT OF AN INDEX SPECIFICATION,
REGARDLESS OF WHETHER THE RANGE OF INDEXES HAS BEEN EXHAUSTED, THEN
THE EVALUATION OF ASSOCIATED VALUES WILL BE CONTINUED BY THE NEXT
CALL TO THIS ROUTINE IN THE NEW TEXT READ INTO THE INPUT BUFFER. ^IF
AN AMPERSAND IS FOUND PRIOR TO THE EXHAUSTION OF THE RANGE OF
INDEXES, BUT THE NEXT LINE READ INTO THE INPUT BUFFER IS TO START A
NEW PAIR, THEN ^^KIND \\SHOULD BE SET TO 6 BY THE CALLING PROGRAM
CAUSING THE REMAINING INDEXES TO BE GENERATED FIRST BUT MARKED AS
HAVING MISSING ASSOCIATED VALUES. ^IF THE AMPERSAND IS FOUND AFTER
THE EXHAUSTION OF THE RANGE OF INDEXES, BUT THE NEXT LINE READ INTO
THE INPUT BUFFER IS TO START A NEW PAIR, THEN ^^KIND \\SHOULD BE SET
TO ONE.
.SKIP
.INDENT -2
=#0, WHEN THE RANGE OF INDEXES AND THE RANGE OF ASSOCIATED VALUES
HAVE BOTH BEEN EXHAUSTED, A FOLLOWING REPRESENTATION OF A NUMBER OR
OF A RANGE OF NUMBERS ON THE SAME LINE CAUSES THIS ROUTINE TO REPORT
A MISSING COMMA, AND THE SUBSEQUENT CALL TO THIS ROUTINE THEN BEGINS
THE EVALUATION OF THIS FOLLOWING NUMBER AS AN INDEX OR RANGE OF
INDEXES OF A SUBSEQUENT PAIR.
.SKIP
^IF AN END OF LINE IS FOUND BEFORE THE RANGE OF INDEXES HAS BEEN
EXHAUSTED, THEN THE CALLING PROGRAM CAN REQUEST (BY SETTING ^^KIND=4
\\TO SIMULATE THE FINDING OF AN AMPERSAND) THAT THE EVALUATION OF
ASSOCIATED VALUES IS TO BE CONTINUED BY THE NEXT CALL TO THIS
ROUTINE IN THE NEW TEXT READ INTO THE INPUT BUFFER. ^IF AN END OF
LINE IS FOUND BEFORE THE RANGE OF INDEXES HAS BEEN EXHAUSTED, BUT
THE CALLING PROGRAM LEAVES ^^KIND \\UNCHANGED BEFORE AGAIN CALLING
THIS ROUTINE, THEN THE REMAINING INDEX VALUES WILL BE RETURNED
WITHOUT ASSOCIATED VALUES, FOLLOWING WHICH THE FIRST NUMBER IN THE
NEW CONTENTS OF THE TEXT BUFFER WILL BE INTERPRETED AS THE INDEX OF
A SUBSEQUENT PAIR.
.SKIP
^IF AN AMPERSAND IS FOUND PRIOR TO THE EXHAUSTION OF THE RANGE OF
INDEXES, THEN THE EVALUATION OF ASSOCIATED VALUES WILL BE CONTINUED
BY THE NEXT CALL TO THIS ROUTINE IN THE NEW TEXT READ INTO THE INPUT
BUFFER UNLESS THE CALLING PROGRAM SETS ^^KIND \\TO 6 PRIOR TO THE
SUBSEQUENT CALL TO THIS ROUTINE, CAUSING THE REMAINING INDEXES TO BE
GENERATED BUT MARKED AS HAVING MISSING ASSOCIATED VALUES. ^IF AN
AMPERSAND IS FOUND AFTER THE RANGE OF INDEXES AND THE RANGE OF
ASSOCIATED VALUES HAVE BOTH BEEN EXHAUSTED, THEN THE FIRST NUMBER
EVALUATED BY THE SUBSEQUENT CALL TO THIS ROUTINE IN THE NEW TEXT
READ INTO THE INPUT BUFFER IS ASSUMED TO BE THE INDEX OF A NEW PAIR
OF VALUES.
.SKIP
=#1, WHEN THE RANGE OF INDEXES AND THE RANGE OF ASSOCIATED VALUES
HAVE BOTH BEEN EXHAUSTED, A FOLLOWING REPRESENTATION OF A NUMBER OR
OF A RANGE OF NUMBERS ON THE SAME LINE IS TAKEN TO SPECIFY
ADDITIONAL ASSOCIATED VALUES.
.SKIP
^IF EITHER AN AMPERSAND OR AN END OF LINE IS FOUND BEFORE THE RANGE
OF INDEXES HAS BEEN EXHAUSTED, THEN THE REMAINING INDEX VALUES WILL
BE RETURNED WITHOUT ASSOCIATED VALUES, FOLLOWING WHICH THE CALLING
PROGRAM WILL BE INFORMED THAT THE END OF LINE OR AMPERSAND HAS BEEN
REACHED.
.SKIP
.INDENT -2
=#2, 3 OR 4, SAME AS WHEN ^^KONECT=-1, 0 \\OR 1 RESPECTIVELY, EXCEPT
THAT COMMAS CAN APPEAR (BUT ARE NOT REQUIRED) BETWEEN THE
REPRESENTATIONS OF THE INDEX AND THE FIRST ASSOCIATED VALUE AND
BETWEEN THE REPRESENTATIONS OF SUBSEQUENT ASSOCIATED VALUES. ^AN
EXTRA COMMA INDICATES A MISSING ASSOCIATED VALUE. ^IF ^^KONECT=3,
\\AND IF THE RANGE OF INDEXES AND THE RANGE OF ASSOCIATED VALUES
HAVE BOTH BEEN EXHAUSTED, THEN ^^KIND \\WILL BE RETURNED SET TO 10
TO INDICATE A MISSING SEMICOLON IF A FOLLOWING NUMBER IS FOUND
WHETHER OR NOT THIS FOLLOWING NUMBER IS PRECEDED BY A COMMA, AND THE
SUBSEQUENT CALL TO THIS ROUTINE WILL BEGIN THE EVALUATION OF THE
FOLLOWING NUMBER AS AN INDEX OR RANGE OF INDEXES OF A SUBSEQUENT
PAIR. ^UNLIKE COMMAS, SEMICOLONS ARE ALWAYS REPORTED TO THE CALLING
PROGRAM REGARDLESS OF THE VALUE OF ^^KONECT.
.SKIP
.INDENT -9
IBUFFR#=#\\INPUT BUFFER ARRAY CONTAINING CHARACTERS TYPED BY THE
USER, READ BY A MULTIPLE OF AN ^A1 FORMAT, WHICH IS TO BE SEARCHED
FOR NUMBER SPECIFICATIONS. ^^IBUFFR \\THEN CONTAINS ONE CHARACTER
PER COMPUTER STORAGE LOCATION.
.SKIP
.INDENT -9
^^MAXBFR#=#\\MAXIMUM SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATIONS TO
BE SEARCHED.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED BOTH FOR INPUT TO THIS ROUTINE,
AND FOR OUTPUT TO THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LOWBFR#=#\\INPUT CONTAINING THE SUBSCRIPT WITHIN THE ^^IBUFFR
\\ARRAY OF THE FIRST (LEFTMOST) CHARACTER WHICH CAN BE SCANNED FOR A
NUMBER SPECIFICATION. ^^LOWBFR \\IS RETURNED POINTING TO THE NEXT
CHARACTER WHICH WOULD BE INTERPRETED BY THE SUBSEQUENT CALL TO THIS
ROUTINE IF THIS SUBSEQUENT CALL NEEDS TO EVALUATE FURTHER NUMBER
SPECIFICATIONS. ^^LOWBFR \\IS RETURNED UNCHANGED IF THIS ROUTINE
MERELY GENERATES THE NEXT ASSOCIATED VALUE WITHIN A PREVIOUSLY
DETERMINED RANGE. ^IF THERE ARE NO PRINTING CHARACTERS AT OR TO THE
RIGHT OF ^^IBUFFR(LOWBFR), \\BUT THE INTERPRETATION OF ADDITIONAL
CHARACTERS IS ATTEMPTED, THEN ^^LOWBFR \\WILL BE RETURNED CONTAINING
^^MAXBFR+1. LOWBFR \\MUST BE RESET BY THE CALLING PROGRAM TO POINT
TO THE FIRST CHARACTER IN THE ^^IBUFFR \\ARRAY EACH TIME A NEW LINE
OF TEXT IS READ.
.SKIP
.INDENT -9
^^KIND###=#\\INPUT CONTAINING -1, AN ERROR WAS DETECTED BY THE
CALLING PROGRAM (RATHER THAN BY THIS ROUTINE) IN THE RESULTS
RETURNED BY THE PREVIOUS CALL TO THIS ROUTINE AND ANY ADDITIONAL
NUMBERS THROUGH THE NEXT APPEARANCE OF A COMMA (UNLESS ^^KONECT \I\S
\\GREATER THAN 1) OR A SEMICOLON OR AN AMPERSAND OR AN UNKNOWN
CHARACTER OR THE END OF LINE ARE TO BE IGNORED. ^THE NEXT NUMBER TO
THE RIGHT OF THE COMMA OR ON THE LINE FOLLOWING THE AMPERSAND OR END
OF LINE IS TO BE INTERPRETED AS THE INDEX OF THE NEXT PAIR. ^AN
UNKNOWN CHARACTER OR A SEMICOLON IS REPORTED TO THE CALLING PROGRAM
IF IT IS FOUND INSTEAD.
.INDENT -2
=#INPUT CONTAINING 0, THIS ROUTINE HAS NOT YET BEEN CALLED DURING
THE EXECUTION OF THE CURRENT LOGICAL SECTION OF THE CALLING PROGRAM.
^THIS ROUTINE IS TO BEGIN EVALUATION OF THE CONTENTS OF THE INPUT
TEXT BUFFER, NOT CONTINUE THE GENERATION OF RANGES EVALUATED BY
PREVIOUS CALLS TO THIS ROUTINE. ^^LOWBFR \\SHOULD POINT TO THE FIRST
CHARACTER IN THE ^^IBUFFR \\ARRAY TO BE INTERPRETED.
.INDENT -2
=#INPUT GREATER THAN ZERO, THE VALUE OF ^^KIND \\INDICATES THE
CONDITION RETURNED BY THE PREVIOUS CALL TO THIS ROUTINE AND IN MOST
CASES HAS NOT BEEN MODIFIED BY THE CALLING PROGRAM. ^^KIND \\BEING
RETURNED WITH ONE OF THE VALUES 7, 8, 9, 10 (IF ^^KONECT \\IS 2 OR
4), 13 AND 14 INDICATES THAT A PAIR OF VALUES IS BEING RETURNED,
ALTHOUGH EITHER OR BOTH MEMBERS OF THE PAIR COULD BE MISSING. ^THE
OTHER VALUES OF ^^KIND \\INDICATE SPECIAL CONDITIONS FOR WHICH A
PAIR OF NUMBERS IS NOT RETURNED.
.INDENT -2
=#1, NOTHING, EXCEPT PERHAPS LEADING COMMAS OR ELSE A COMMENT
INDICATED BY A LEADING EXCLAMATION POINT, WAS FOUND AT OR TO THE
RIGHT OF ^^IBUFFR(LOWBFR). T\\HE CALLING PROGRAM SHOULD READ A NEW
LINE OF TEXT INTO ^^IBUFFR.
.INDENT -2
=#2, \\A SEMICOLON WAS FOUND AS THE FIRST PRINTING CHARACTER AT OR
TO THE RIGHT OF ^^IBUFFR(LOWBFR). I\\F THE RANGE OF INDEXES HAS NOT
BEEN EXHAUSTED WHEN THE SEMICOLON IS FOUND, THEN THE REMAINING
MEMBERS OF THE RANGE ARE REPORTED TO THE CALLING PROGRAM BEFORE THE
SEMICOLON IS REPORTED. ^IT IS ASSUMED THAT THE CALLING PROGRAM WILL
TREAT THE SEMICOLON AS MARKING THE END OF A LOGICAL GROUP OF PAIR
SPECIFICATIONS IF ^^KONECT \\IS NOT GREATER THAN 1, OR THE END OF A
SINGLE PAIR SPECIFICATION IF ^^KONECT \\IS GREATER THAN 1.
.INDENT -2
=#3, AN AMPERSAND WAS FOUND WHILE SEARCHING FOR THE NEXT RANGE OF
INDEXES. ^^LOWBFR \\IS RETURNED POINTING BEYOND THE END OF THE
BUFFER. ^THE CALLING PROGRAM SHOULD READ A NEW LINE OF TEXT INTO THE
INPUT BUFFER BEFORE AGAIN CALLING THIS ROUTINE. ^THIS VALUE OF
^^KIND \\IS NOT RETURNED IF AN AMPERSAND IS FOUND WHILE SEARCHING
FOR A RANGE OF ASSOCIATED VALUES.
.INDENT -2
=#4, THE RANGE OF INDEXES WAS NOT EXHAUSTED, BUT AN AMPERSAND WAS
FOUND INSTEAD OF A RANGE OF ASSOCIATED VALUES. ^THE CALLING PROGRAM
SHOULD READ A NEW LINE OF TEXT INTO THE BUFFER BEFORE AGAIN CALLING
THIS ROUTINE. ^THE SUBSEQUENT CALL TO THIS ROUTINE WILL CONTINUE THE
EVALUATION OF ASSOCIATED RANGES IN THE NEW CONTENTS OF THE BUFFER.
^IF A SEMICOLON (OR A COMMA IF ^^KONECT \\IS NOT GREATER THAN 1) IS
FOUND AT THE START OF THE NEW CONTENTS OF THE BUFFER, THEN THE
REMAINING INDEX VALUES WILL BE RETURNED TO THE CALLING PROGRAM BUT
THE CALLING PROGRAM WILL BE INFORMED THAT THE ASSOCIATED VALUES ARE
MISSING. ^IF THE SUBSEQUENT CALL TO THIS ROUTINE IS INSTEAD TO BEGIN
THE EVALUATION OF A NEW SET OF LEADING INDEXES AND ASSOCIATED
VALUES, THEN THE CALLING PROGRAM SHOULD SET ^^KIND \\TO 6 TO
SIMULATE THE LACK OF AN AMPERSAND, CAUSING THE REMAINING INDEXES TO
BE GENERATED, BUT MARKED AS HAVING MISSING ASSOCIATED VALUES. ^IF
THE REMAINING INDEXES ARE NOT WANTED, THEN ^^KIND \\SHOULD BE SET TO
ONE.
.INDENT -2
=#5, THE RANGE OF INDEXES WAS EXHAUSTED, BUT AN AMPERSAND WAS FOUND
INSTEAD OF A RANGE OF ASSOCIATED VALUES. ^THE CALLING PROGRAM SHOULD
READ A NEW LINE OF TEXT INTO THE BUFFER BEFORE AGAIN CALLING THIS
ROUTINE. ^THE SUBSEQUENT CALL TO THIS ROUTINE WILL CONTINUE THE
EVALUATION OF ASSOCIATED RANGES IN THE NEW CONTENTS OF THE BUFFER.
^SINCE THE RANGE OF INDEXES HAS BEEN EXHAUSTED, NO ADDITIONAL
MISSING VALUES WILL BE REPORTED IF A SEMICOLON (OR A COMMA IF
^^KONECT \\IS NOT GREATER THAN 1) IS FOUND AT THE START OF THE NEW
CONTENTS OF THE BUFFER. ^IF THE SUBSEQUENT CALL TO THIS ROUTINE IS
ALWAYS TO BEGIN THE EVALUATION OF A NEW SET OF LEADING INDEXES AND
ASSOCIATED VALUES, THEN THE CALLING PROGRAM SHOULD SET ^^KIND \T\O
\\ONE.
.INDENT -2
=#6, AN END OF LINE WAS FOUND BUT THE RANGE OF INDEXES WAS NOT
EXHAUSTED. ^IF ^^KIND \\IS SENT UNCHANGED TO THE SUBSEQUENT CALL OF
THIS ROUTINE, THEN THE REMAINING INDEXES WILL BE RETURNED TO THE
CALLING PROGRAM, BUT THE CALLING PROGRAM WILL BE INFORMED THAT THE
ASSOCIATED VALUES ARE MISSING. ^IF THE SUBSEQUENT CALL TO THIS
ROUTINE IS INSTEAD TO CONTINUE THE EVALUATION OF ASSOCIATED RANGES
IN THE NEW CONTENTS OF THE BUFFER READ BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS AGAIN CALLED, THEN ^^KIND \\SHOULD BE SET TO 4 TO
SIMULATE THE APPEARANCE OF AN AMPERSAND AT THE END OF THE PRECEDING
LINE. ^IF THE REMAINING INDEXES ARE NOT WANTED, THEN ^^KIND \\SHOULD
BE SET TO ONE.
.INDENT -2
=#7, BOTH AN INDEX AND AN ASSOCIATED VALUE ARE BEING RETURNED TO THE
CALLING PROGRAM.
.INDENT -2
=#8, AN INDEX IS BEING RETURNED TO THE CALLING PROGRAM, BUT THE
ASSOCIATED VALUE IS MISSING. ^^NEWEND \\AND ^^ENDNEW \\ARE RETURNED
UNDEFINED.
.INDENT -2
=#9, AN ASSOCIATED VALUE IS BEING RETURNED TO THE CALLING PROGRAM,
BUT THE RANGE OF INDEXES HAS BEEN EXHAUSTED. ^^NEWBGN \O\R BGNNEW,
\\WHICHEVER IS APPROPRIATE, IS RETURNED UNCHANGED (BUT CAN BE
MODIFIED AS DESIRED BY THE CALLING PROGRAM).
.INDENT -2
=#10, THE RANGES OF BOTH THE INDEXES AND THE ASSOCIATED VALUES HAVE
BEEN EXHAUSTED. ^THIS VALUE IS NEVER RETURNED IF ^^KONECT=-1 \O\R 1.
.SKIP
I\F KONECT \\HAS EITHER OF THE VALUES 2 OR 4, THEN THE RANGES OF
BOTH THE INDEXES AND THE ASSOCIATED VALUES HAVE BEEN EXHAUSTED, BUT
AN EXTRA COMMA WAS FOUND INDICATING A MISSING ASSOCIATED VALUE.
^^NEWBGN \O\R BGNNEW, \\WHICHEVER IS APPROPRIATE, IS RETURNED
UNCHANGED (BUT CAN BE MODIFIED AS DESIRED BY THE CALLING PROGRAM).
.SKIP
^IF ^^KONECT=0, \\THEN THE RANGES OF BOTH THE INDEXES AND ASSOCIATED
VALUES HAVE BEEN EXHAUSTED, BUT A FOLLOWING NUMBER WAS FOUND WHICH
WAS NOT PRECEDED BY A COMMA. ^^KIND \\SHOULD BE SET TO -1 BY THE
CALLING PROGRAM BEFORE THIS ROUTINE IS CALLED NEXT IF THE LACK OF A
COMMA INDICATES A SERIOUS ENOUGH ERROR THAT ALL NUMBERS SHOULD BE
IGNORED UNTIL THE NEXT COMMA IS FOUND. ^IF ^^KONECT=3, \\THEN THE
RANGES OF BOTH THE INDEXES AND ASSOCIATED VALUES HAVE BEEN
EXHAUSTED, BUT A FOLLOWING NUMBER WAS FOUND WHICH WAS NOT PRECEDED
BY A SEMICOLON, BUT WHICH MAY OR MAY NOT HAVE BEEN PRECEDED BY ONE
OR MORE COMMAS. ^^KIND \\SHOULD BE SET TO -1 BY THE CALLING PROGRAM
BEFORE THIS ROUTINE IS CALLED NEXT IF THE LACK OF A SEMICOLON
INDICATES A SERIOUS ENOUGH ERROR THAT ALL NUMBERS SHOULD BE IGNORED
UNTIL THE NEXT SEMICOLON IS FOUND. ^IF ^^KONECT \\IS 0 OR 3, THEN
^^LOWBFR \\IS RETURNED POINTING TO THE FIRST CHARACTER OF THE NUMBER
SPECIFICATION, AND THE NUMBER WILL BE EVALUATED AS AN INDEX IF THIS
ROUTINE IS CALLED AGAIN WITHOUT ^^KIND \\HAVING BEEN CHANGED.
.INDENT -2
=#11, AN UNKNOWN CHARACTER WAS FOUND. ^IF THE RANGE OF INDEXES HAS
NOT BEEN EXHAUSTED WHEN THE UNKNOWN CHARACTER IS FOUND, THEN THE
REMAINING MEMBERS OF THE RANGE ARE REPORTED TO THE CALLING PROGRAM
BEFORE THE UNKNOWN CHARACTER IS REPORTED. ^^LOWBFR \\IS RETURNED
POINTING TO THE NEXT CHARACTER TO THE RIGHT OF THE UNKNOWN
CHARACTER. ^IF THIS ROUTINE IS CALLED WITHOUT CHANGING THE VALUE OF
^^KIND, \\THEN THE NUMBER TO THE RIGHT OF THE UNKNOWN CHARACTER WILL
BE INTERPRETED AS THE INDEX OF THE NEXT PAIR.
.INDENT -2
=#12, AN ERROR WAS FOUND WITHIN A RANGE SPECIFICATION. ^THE FINDING
OF SUCH AN ERROR TERMINATES THE GENERATION OF THE RANGE OF INDEXES.
^^IWHERE \\IS RETURNED POINTING TO THE CHARACTER AT THE START OF THE
SPECIFICATION CONTAINING THE ERROR. ^^LOWBFR \\IS RETURNED POINTING
TO THE CHARACTER TO THE RIGHT OF THE SPECIFICATION CONTAINING THE
ERROR. ^IF THIS ROUTINE IS CALLED WITHOUT CHANGING THE VALUE OF
^^KIND, \\THEN THE NUMBER TO THE RIGHT OF THE UNKNOWN CHARACTER WILL
BE INTERPRETED AS THE INDEX OF THE NEXT PAIR.
.INDENT -2
=#13, AN INDEX AND THE ASSOCIATED VALUE ZERO ARE BEING RETURNED TO
THE CALLING PROGRAM. ^THE ZERO WAS INDICATED BY THE LACK OF A NUMBER
TO THE RIGHT OF AN ASTERISK. ^A MISSING NUMBER TO THE RIGHT OF AN
ASTERISK IN THE SPECIFICATION OF A RANGE OF INDEXES IS NOT ALLOWED
AND WOULD RETURN ^^KIND \\CONTAINING THE VALUE 12.
.INDENT -2
=#14, SAME AS ^^KIND=13 \\EXCEPT THAT THE RANGE OF INDEXES WAS
EXHAUSTED. ^^NEWBGN \O\R BGNNEW, \\WHICHEVER IS APPROPRIATE, IS
RETURNED UNCHANGED (BUT CAN BE MODIFIED AS DESIRED BY THE CALLING
PROGRAM).
.SKIP
.INDENT -9
^^NEWBGN#=#\\RETURNED CONTAINING THE NEXT VALUE OF AN INTEGER INDEX
IF ^^KIND \\IS RETURNED CONTAINING ONE OF THE VALUES 7, 8 OR 13 AND
IF ^^KNDBGN \\IS LESS THAN OR EQUAL TO ZERO. ^^NEWBGN \\SHOULD NOT
BE CHANGED BY THE CALLING PROGRAM UNLESS ^^KIND \\IS RETURNED
CONTAINING ONE OF THE VALUES 9, 10 OR 14 INDICATING THAT THE RANGE
OF INDEXES HAS BEEN EXHAUSTED.
.SKIP
.INDENT -9
^^NEWEND#=#\\RETURNED CONTAINING THE NEXT ASSOCIATED INTEGER VALUE
IF ^^KIND \\IS RETURNED WITH ONE OF THE VALUES 7, 9, 13 OR 14 AND IF
^^KNDEND \\IS LESS THAN OR EQUAL TO ZERO. ^^NEWEND \\CAN BE RETURNED
CHANGED BY THIS ROUTINE EVEN IF AN ASSOCIATED VALUE IS NOT FOUND BUT
THEN MUST NOT BE CHANGED BY THE CALLING PROGRAM. ^IF THE RANGE OF
ASSOCIATED VALUES HAS BEEN EXHAUSTED, OR IF THE ASSOCIATED VALUE IS
INDICATED BY AN EXTRA COMMA TO BE MISSING, THEN ^^NEWEND \\DOES NOT
CONTAIN AN ASSOCIATED INTEGER VALUE BUT INSTEAD INDICATES TO THE
SUBSEQUENT CALL TO THIS ROUTINE THE REASON WHY A VALUE COULD NOT BE
RETURNED.
.SKIP
.INDENT -9
^^BGNNEW#=#\\RETURNED CONTAINING THE NEXT VALUE OF A REAL INDEX IF
^^KIND \\IS RETURNED CONTAINING ONE OF THE VALUES 7, 8 OR 13 AND IF
^^KNDBGN \\IS GREATER THAN ZERO. ^^BGNNEW \\SHOULD NOT BE CHANGED BY
THE CALLING PROGRAM UNLESS ^^KIND \\IS RETURNED CONTAINING ONE OF
THE VALUES 9, 10 OR 14 INDICATING THAT THE RANGE OF INDEXES HAS BEEN
EXHAUSTED.
.SKIP
.INDENT -9
^^ENDNEW#=#\\RETURNED CONTAINING THE NEXT ASSOCIATED REAL VALUE IF
^^KIND \\IS RETURNED WITH ONE OF THE VALUES 7, 9, 13 OR 14 AND IF
^^KNDEND \\IS GREATER THAN ZERO. ^^ENDNEW \\SHOULD NOT BE CHANGED BY
THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED FOR OUTPUT ONLY, AND IS NOT INCLUDED
IN THE ^^DAIPAR \\ARGUMENT LIST.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IWHERE#=#\\RETURNED POINTING TO THE LEFT CHARACTER OF A RANGE
NOTATION WHICH WAS FOUND TO CONTAIN AN ERROR SUCH AS TOO MANY
ASTERISKS, TOO MANY SLASHES, TOO MANY COLONS, OR THE ABSENCE OF A
NUMBER TO THE RIGHT OF AN ASTERISK IN THE SPECIFICATION OF A RANGE
OF LEADING INDEXES.
.SKIP
.LEFT MARGIN 0
^THE REMAINING ^^DAPAIR \\ARGUMENTS ARE USED ONLY DURING THE
GENERATION OF VALUES WITHIN RANGES AND SHOULD BE SENT TO THE
SUBSEQUENT ^^DAPAIR \\CALL UNCHANGED. ^THESE ARGUMENTS SHOULD BE
STATED BY NAME IN THE CALL STATEMENTS AND SHOULD BE IGNORED BY THE
CALLING PROGRAM EXCEPT INSOFAR AS IS NECESSARY TO TRANSMIT THEIR
VALUES TO THE SUBSEQUENT CALL TO THIS ROUTINE.
.SKIP 2
.TEST PAGE 5
.LEFT MARGIN 0
.FILL
.CENTER
^VALUES ^RETURNED FOR ^TYPICAL ^RANGE ^SPECIFICATION ^COMBINATIONS
.CENTER
------ -------- --- ------- ----- ------------- ------------
.SKIP
^SHOWN ON THE FOLLOWING PAGES ARE RESULTS RETURNED BY ^^DAPAIR
\\DURING THE EVALUATION OF SEVERAL TYPICAL LINES OF INPUT TEXT. ^THE
LINE OF TEXT IS SHOWN FIRST, FOLLOWED BY A DESCRIPTION OF THE
RESULTS OBTAINED WITH ^^KONECT \\VALUES OF -1 (LEFT COLUMN), 0
(CENTER COLUMN) AND 1 (RIGHT COLUMN). ^THE RETURNED VALUES OF THE
ARGUMENT NAMED ^^KIND \\ARE INDICATED BY THE FOLLOWING DESCRIPTIONS
IN WHICH THE DIGITS 1 AND 2 REPRESENT THE RETURNED INDEX AND
RETURNED ASSOCIATED VALUE RESPECTIVELY, AND IN WHICH _# REPRESENTS
ANY NUMBER. ^THE INDEX IS ENCLOSED IN PARENTHESES IF THE INDEX RANGE
HAS BEEN EXHAUSTED BUT ASSOCIATED VALUES ARE STILL BEING FOUND.
.SKIP
.NOFILL
.TEST PAGE 6
^^KIND=1, \\EMPTY         ^^KIND= 7, 1 \\AND 2
    =2, ;                 = 8, 1 AND MISSING _#
    =3, _&                 = 9, (1) AND 2
    =4, _& BUT _# NEEDED    =10, UNEXPECTED _# (^^KONECT=0,3)
    =5, _& \\BUT _# EXPECTED  =10, (1) AND MISSING _#(^^KONECT=2,4)
    =6, \\EMPTY BUT _# NEEDED
.SKIP
.FILL
^IN THE EXAMPLES SHOWN ON THE FOLLOWING PAGES, IT IS ASSUMED THAT
^^KIND \\WILL BE CHANGED BY THE CALLING PROGRAM TO HAVE THE VALUE 4
WHENEVER IT IS RETURNED SET TO 6 BY THIS ROUTINE. ^THE INITIAL
VALUES RETURNED DURING THE EVALUATION OF A SUBSEQUENT LINE WHEN
^^KIND \\IS INPUT SET TO 4 ARE INDICATED BY "_# NEXT LINE" RATHER
THAN BY MERELY A _#.
.SKIP
.NOFILL
.TEST PAGE 7
.NOFILL
     ^^KONECT=-1           KONECT=0            KONECT=1
.SKIP
.TEST PAGE 2
!
     \\EMPTY               EMPTY               EMPTY
.SKIP
.TEST PAGE 2
_&
     _&                   _&                   _&
.SKIP
.TEST PAGE 4
,
     EMPTY               EMPTY               EMPTY
.SKIP
.TEST PAGE 3
,_&
     _&                   _&                   _&
.SKIP
.TEST PAGE 3
1
     EMPTY BUT _# NEEDED  EMPTY BUT _# NEEDED  1 AND MISSING _#
     1 AND _# NEXT LINE   1 AND _# NEXT LINE   EMPTY
.SKIP
.TEST PAGE 4
1!^^FOLLOWED BY A LINE BEGINNING WITH A COMMA
     \\EMPTY BUT _# NEEDED  EMPTY BUT _# NEEDED
     1 AND MISSING _#     1 AND MISSING _#     (SAME AS ABOVE)
     VALUES AFTER COMMA  VALUES AFTER COMMA
.SKIP
.TEST PAGE 3
1_&
     _& BUT _# NEEDED      _& BUT _# NEEDED      1 AND MISSING _#
     1 AND _# NEXT LINE   1 AND _# NEXT LINE   _&
.SKIP
.TEST PAGE 4
1_&^^FOLLOWED BY A LINE BEGINNING WITH A COMMA
     _& \\BUT _# NEEDED      _& BUT _# NEEDED
     1 AND MISSING _#     1 AND MISSING _#     (SAME AS ABOVE)
     VALUES AFTER COMMA  VALUES AFTER COMMA
.SKIP
.TEST PAGE 4
1,
     1 AND MISSING _#     1 AND MISSING _#     1 AND MISSING _#
     EMPTY               EMPTY               EMPTY
.SKIP
.TEST PAGE 3
1,_&
     1 AND MISSING _#     1 AND MISSING _#     1 AND MISSING _#
     _&                   _&                   _&
.SKIP
.TEST PAGE 3
1 2
     1 AND 2             1 AND 2             1 AND 2
     EMPTY               EMPTY               EMPTY
.SKIP
.TEST PAGE 4
1 2_&
     1 AND 2             1 AND 2             1 AND 2
     _& BUT _# EXPECTED    _&                   _&
     (1) AND _# NEXT LINE
.SKIP
.TEST PAGE 4
1 2_&^^FOLLOWED BY A LINE BEGINNING WITH A COMMA
     1 \\AND 2
     _& BUT _# EXPECTED    (SAME AS ABOVE)     (SAME AS ABOVE)
     VALUES AFTER COMMA
.SKIP
.TEST PAGE 4
1 2,
     1 AND 2             1 AND 2             1 AND 2
     EMPTY               EMPTY               EMPTY
.SKIP
.TEST PAGE 3
1 2,_&
     1 AND 2             1 AND 2             1 AND 2
     _&                   _&                   _&
.SKIP
.TEST PAGE 5
1 2 3
     1 AND 2             1 AND 2             1 AND 2
     (1) AND 3           UNEXPECTED _#        (1) AND 3
     EMPTY               EMPTY BUT _# NEEDED  EMPTY
                         3 AND _# NEXT LINE
.SKIP
.TEST PAGE 6
1 2 3!^^FOLLOWED BY A LINE BEGINNING WITH A COMMA
                         1 \\AND 2
     (SAME AS ABOVE)     UNEXPECTED _#        (SAME AS ABOVE)
                         EMPTY BUT _# NEEDED
                         3 AND MISSING _#
                         VALUES AFTER COMMA
.TEST PAGE 5
1 2 3_&
     1 AND 2             1 AND 2             1 AND 2
     (1) AND 3           UNEXPECTED _#        (1) AND 3
     _& BUT _# EXPECTED    _& BUT _# NEEDED      _&
     (1) AND _# NEXT LINE 3 AND _# NEXT LINE
.SKIP
.TEST PAGE 6
1 2 3_&^^FOLLOWED BY A LINE BEGINNING WITH A COMMA
     1 \\AND 2             1 AND 2
     (1) AND 3           UNEXPECTED _#        (SAME AS ABOVE)
     _& BUT _# EXPECTED    _& BUT _# NEEDED
     VALUES AFTER COMMA  3 AND MISSING _#
                         VALUES AFTER COMMA
.TEST PAGE 5
1 4/6
     1 AND 4             1 AND 4             1 AND 4
     (1) AND 5           (1) AND 5           (1) AND 5
     (1) AND 6           (1) AND 6           (1) AND 6
     EMPTY               EMPTY               EMPTY
.SKIP
.TEST PAGE 6
1 4/6_&
     1 AND 4             1 AND 4             1 AND 4
     (1) AND 5           (1) AND 5           (1) AND 5
     (1) AND 6           (1) AND 6           (1) AND 6
     _& BUT _# EXPECTED    _&                   _&
     (1) AND _# NEXT LINE
.SKIP
.TEST PAGE 6
1 4/6_&^^FOLLOWED BY A LINE BEGINNING WITH A COMMA
     1 \\AND 4
     (1)AND 5            (SAME AS ABOVE)     (SAME AS ABOVE)
     (1) AND 6
     _& BUT _# EXPECTED
     VALUES AFTER COMMA
.SKIP
.TEST PAGE 9
1 4/6 7/9
     1 AND 4             1 AND 4             1 AND 4
     (1) AND 5           (1) AND 5           (1) AND 5
     (1) AND 6           (1) AND 6           (1) AND 6
     (1) AND 7           UNEXPECTED _#        (1) AND 7
     (1) AND 8           EMPTY BUT _# NEEDED  (1) AND 8
     (1) AND 9           7 AND _# NEXT LINE   (1) AND 9
     EMPTY               8 AND _# NEXT LINE   EMPTY
                         9 AND _# NEXT LINE
.SKIP
.TEST PAGE 10
1 4/6 7/9!^^FOLLOWED BY A LINE BEGINNING WITH A COMMA
                         1 \\AND 4
     (SAME AS ABOVE)     (1) AND 5           (SAME AS ABOVE)
                         (1) AND 6
                         UNEXPECTED _#
                         EMPTY BUT _# NEEDED
                         7 AND MISSING _#
                         8 AND MISSING _#
                         9 AND MISSING _#
                         VALUES AFTER COMMA
.TEST PAGE 10
1 4/6 7/9_&
     1 AND 4             1 AND 4             1 AND 4
     (1) AND 5           (1) AND 5           (1) AND 5
     (1) AND 6           (1) AND 6           (1) AND 6
     (1) AND 7           UNEXPECTED _#        (1) AND 7
     (1) AND 8           _& BUT _# NEEDED      (1) AND 8
     (1) AND 9           7 AND _# NEXT LINE   (1) AND 9
     _& BUT _# EXPECTED    8 AND _# NEXT LINE   _&
     (1) AND _# NEXT LINE 9 AND _# NEXT LINE
.SKIP
.TEST PAGE 5
1 4/6 7/9_&^^FOLLOWED BY A LINE BEGINNING WITH A COMMA
     1 \\AND 4             1 AND 4
     (1) AND 5           (1) AND 5           (SAME AS ABOVE)
     (1) AND 6           (1) AND 6
     (1) AND 7           UNEXPECTED _#
     (1) AND 8           _& BUT _# NEEDED
     (1) AND 9           7 AND MISSING _#
     _& BUT _# EXPECTED    8 AND MISSING _#
     VALUES AFTER COMMA  9 AND MISSING _#
                         VALUES AFTER COMMA
.TEST PAGE 5
1/3 4
     1 AND 4             1 AND 4             1 AND 4
     EMPTY BUT _# NEEDED  EMPTY BUT _# NEEDED  2 AND MISSING _#
     2 AND _# NEXT LINE   2 AND _# NEXT LINE   3 AND MISSING _#
     3 AND _# NEXT LINE   3 AND _# NEXT LINE   EMPTY
.SKIP
.TEST PAGE 6
1/3 4!^^FOLLOWED BY A LINE BEGINNING WITH A COMMA
     1 \\AND 4             1 AND 4
     EMPTY BUT _# NEEDED  EMPTY BUT _# NEEDED  (SAME AS ABOVE)
     2 AND MISSING _#     2 AND MISSING _#
     3 AND MISSING _#     3 AND MISSING _#
     VALUES AFTER COMMA  VALUES AFTER COMMA
.SKIP
.TEST PAGE 5
1/3 4_&
     1 AND 4             1 AND 4             1 AND 4
     _& BUT _# NEEDED      _& BUT _# NEEDED      2 AND MISSING _#
     2 AND _# NEXT LINE   2 AND _# NEXT LINE   3 AND MISSING _#
     3 AND _# NEXT LINE   3 AND _# NEXT LINE   _&
.SKIP
.TEST PAGE 6
1/3 4_&^^FOLLOWED BY A LINE BEGINNING WITH A COMMA
     1 \\AND 4             1 AND 4
     _& BUT _# NEEDED      _& BUT _# NEEDED      (SAME AS ABOVE)
     2 AND MISSING _#     2 AND MISSING _#
     3 AND MISSING _#     3 AND MISSING _#
     VALUES AFTER COMMA  VALUES AFTER COMMA
.SKIP
.TEST PAGE 5
1/3 4/6  !  OR   1/3 4 5 6   OR   1/3 4/5 6   OR   1/3 4 5/6
     1 AND 4             1 AND 4             1 AND 4
     2 AND 5             2 AND 5             2 AND 5
     3 AND 6             3 AND 6             3 AND 6
     EMPTY               EMPTY               EMPTY
.SKIP
.TEST PAGE 8
1/3 4 7/9 10 13
     1 AND 4             1 AND 4             1 AND 4
     2 AND 7             2 AND 7             2 AND 7
     3 AND 8             3 AND 8             3 AND 8
     (3) AND 9           (3) AND 9           (3) AND 9
     (3) AND 10          UNEXPECTED _#        (3) AND 10
     (3) AND 13          10 AND 13           (3) AND 13
     EMPTY               EMPTY               EMPTY
.SKIP
.FILL
^EACH OF THE EXAMPLES SHOWN ABOVE WHICH DOES NOT INCLUDE COMMAS
WOULD BE INTERPRETED THE SAME FOR ^^KONECT \\VALUES 2, 3 AND 4 AS
FOR -1, 0 AND 1 RESPECTIVELY. ^THE REST OF THE EXAMPLES WOULD ALSO
BE INTERPRETED THE SAME FOR ^^KONECT \\VALUES OF 2, 3 AND 4 AS FOR
-1, 0 AND 1 RESPECTIVELY IF THE COMMAS ARE REPLACED BY SEMICOLONS.
^THE EXAMPLES SHOWN BELOW ILLUSTRATE THE RESULTS OBTAINED USING THE
HIGHER ^^KONECT \\VALUES WHEN COMMAS APPEAR TO THE RIGHT OF THE
INDEX. ^COMMAS APPEARING TO THE LEFT OF THE INDEX ARE IGNORED FOR
ALL ^^KONECT \\VALUES.
.SKIP
.TEST PAGE 7
.NOFILL
   ^^KONECT=2            KONECT=3            KONECT=4
.SKIP
.TEST PAGE 5
1/3 4 5 6!  OR  1/3,4,5,6
   1 \\AND 4             1 AND 4             1 AND 4
   2 AND 5             2 AND 5             2 AND 5
   3 AND 6             3 AND 6             3 AND 6
   EMPTY               EMPTY               EMPTY
.SKIP
.TEST PAGE 5
1/3,,5 6!  ^O^R  1/3,,5,6
   1 AND MISSING _#     1 AND MISSING _#     1 AND MISSING _#
   2 AND 5             2 AND 5             2 AND 5
   3 AND 6             3 AND 6             3 AND 6
   EMPTY               EMPTY               EMPTY
.SKIP
.TEST PAGE 5
1/3 4,,6!  ^O^R  1/3,4,,6
   1 AND 4             1 AND 4             1 AND 4
   2 AND MISSING _#     2 AND MISSING _#     2 AND MISSING _#
   3 AND 6             3 AND 6             3 AND 6
   EMPTY               EMPTY               EMPTY
.SKIP
.TEST PAGE 6
1/3 4;!  ^^OR  1/3,4;  OR 1/3 4,;  OR  1/3,4,;  OR  1/3 4,,;
   1 \\AND 4             1 AND 4             1 AND 4
   2 AND MISSING _#     2 AND MISSING _#     2 AND MISSING _#
   3 AND MISSING _#     3 AND MISSING _#     3 AND MISSING _#
   ;                   ;                   ;
   EMPTY               EMPTY               EMPTY
.SKIP
.TEST PAGE 5
1;1,4;1,4,5;,,1,4,,;,,1,4,,6,,8!^^WITH NUMBER ON NEXT LINE
   1 \\AND MISSING _#     1 AND MISSING _#     1 AND MISSING _#
   ;                   ;                   ;
   1 AND 4             1 AND 4             1 AND 4
   ;                   ;                   ;
   1 AND 4             1 AND 4             1 AND 4
   (1) AND 5           UNEXPECTED _#        (1) AND 5
   ;                   5 AND MISSING _#     ;
   1 AND 4             ;                   1 AND 4
   (1) AND MISSING _#   1 AND 4             (1) AND MISSING _#
   (1) AND MISSING _#   ;                   (1) AND MISSING _#
   ;                   1 AND 4             ;
   1 AND 4             UNEXPECTED _#        1 AND 4
   (1) AND MISSING _#   6 AND MISSING _#     (1) AND MISSING _#
   (1) AND 6           UNEXPECTED _#        (1) AND 6
   (1) AND MISSING _#   EMPTY BUT _# NEEDED  (1) AND MISSING _#
   (1) AND 8           8 AND _# NEXT LINE   (1) AND 8
   EMPTY                                   EMPTY
.SKIP
.TEST PAGE 5
1/3 4!^^FOLLOWED BY LINE WITH OPTIONAL COMMA AND 2 NUMBERS
   1 \\AND 4             1 AND 4             1 AND 4
   EMPTY BUT _# NEEDED  EMPTY BUT _# NEEDED  2 AND MISSING _#
   2 AND _# NEXT LINE   2 AND _# NEXT LINE   3 AND MISSING _#
   3 AND _# NEXT LINE   3 AND _# NEXT LINE   EMPTY
.SKIP
.TEST PAGE 3
1/3 4,!^^FOLLOWED BY LINE BEGINNING WITH 2 NUMBERS
   (\\SAME AS ABOVE)     (SAME AS ABOVE)     (SAME AS ABOVE)
.SKIP
.TEST PAGE 5
1/3 4,!^^FOLLOWED BY LINE BEGINNING WITH COMMA THEN NUMBER
   1 \\AND 4             1 AND 4             1 AND 4
   EMPTY BUT _# NEEDED  EMPTY BUT _# NEEDED  2 AND MISSING _#
   2 AND MISSING _#     2 AND MISSING _#     3 AND MISSING _#
   3 AND _# NEXT LINE   3 AND _# NEXT LINE    EMPTY
.SKIP 2
.FILL
.LEFT MARGIN 0
.RIGHT MARGIN 60
.CENTER
^AN ^EXAMPLE OF THE ^USE OF ^^DAPAIR
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE PROGRAM LISTED ON THE FOLLOWING PAGES REPORTS THE RESULTS
RETURNED DURING THE PROCESSING OF A LINE OF TEXT FOR 3 VALUES OF
^^KONECT. P\\ROCESSING OF THE LINE OF TEXT IS DISCONTINUED FOR THE
PARTICULAR VALUE OF ^^KONECT \\WHEN THE ROUTINE RETURNS EITHER AN
AMPERSAND OR AN END OF LINE INDICATION. ^IF AN END OF LINE IS FOUND
WHEN AN ASSOCIATED VALUE IS NEEDED, THEN AN AMPERSAND IS SIMULATED.
^THE USER IS ASKED TO SUPPLY A NEW LINE OF TEXT WHEN PROCESSING OF
THE PREVIOUS LINE OF TEXT HAS BEEN COMPLETED FOR ALL 3 VALUES OF
^^KONECT. A\\N ASTERISK IS USED TO PROMPT THE USER TO TYPE THE LINE
OF TEXT IF AN EMPTY INDICATION HAS BEEN RETURNED FOR ALL 3 VALUES OF
^^KONECT. A\\N AMPERSAND IS USED TO PROMPT THE USER IF THE ROUTINE
HAS INDICATED THE NEED FOR A CONTINUATION LINE, IN WHICH CASE
PROCESSING CONTINUES ONLY FOR THE VALUES OF ^^KONECT \\WHICH
REQUESTED THE CONTINUATION. ^THE TABLE OF RETURNED VALUES ON THE
PRECEDING PAGES IS A SLIGHTLY EDITED DIALOG BETWEEN THE USER AND
THIS PROGRAM.
.SKIP
.NOFILL
      ^^DIMENSION IBUFFR(72),JBUFFR(72),IFDONE(3)
C     ARRAYS USED TO GENERATE TEXT DESCRIPTIONS
      DIMENSION  LGND1 ( 5),LGND4 (14),LGND5 (16),
     1LGND6 (18),LGND7 ( 5),LGND8 ( 9),LGND10(12),
     2LGND11( 7),LGND12( 5),LGND13(6)
      DATA LGND1 /1HE,1HM,1HP,1HT,1HY/
      DATA LGND4 /1H_&,1H ,1HB,1HU,1HT,1H ,1H_#,1H ,1HN,1HE,
     11HE,1HD,1HE,1HD/
      DATA LGND5 /1H_&,1H ,1HB,1HU,1HT,1H ,1H_#,1H ,1HE,1HX,
     11HP,1HE,1HC,1HT,1HE,1HD/
      DATA LGND6 /1HE,1HM,1HP,1HT,1HY,1H ,1HB,1HU,1HT,1H ,
     11H_#,1H ,1HN,1HE,1HE,1HD,1HE,1HD/
      DATA LGND7 /1H ,1HA,1HN,1HD,1H /
      DATA LGND8 /1HM,1HI,1HS,1HS,1HI,1HN,1HG,1H ,1H_#/
      DATA LGND10/1HU,1HN,1HE,1HX,1HP,1HE,1HC,1HT,1HE,1HD,
     11H ,1H_#/
      DATA LGND11/1HU,1HN,1HK,1HN,1HO,1HW,1HN/
      DATA LGND12/1HE,1HR,1HR,1HO,1HR/
      DATA LGND13/1HN,1HU,1HL,1HL,1H ,1H_#/
C     ARRAYS USED TO KEEP 3 COLUMNS SEPARATED
      DIMENSION LOWBFR(3),KIND  (3),NEWBGN(3),
     1NEWEND(3),BGNNEW(3),ENDNEW(3),IWHERE(3),
     2INCBGN(3),LMTBGN(3),BGNINC(3),BGNLMT(3),
     3INCEND(3),LMTEND(3),ENDINC(3),ENDLMT(3)
      DATA ITTY,JTTY,SLACK,MAXBFR/5,5,0.01,72/
      DATA ILEFT,IRIGHT,IAND,IEND,IBLANK/
     11H(,1H),1H_&,1H;,1H /
C
      WRITE(JTTY,1)
    1 FORMAT(22H TEST DAIPAR (Y OR N) ,$)
      READ(ITTY,2)IANSWR
    2 FORMAT(1A1)
      IF(IANSWR.NE.1HY)WRITE(JTTY,3)
    3 FORMAT(22H DAPAIR WILL BE CALLED)
      WRITE(JTTY,4)
    4 FORMAT(41H COMMAS BETWEEN INDEX AND VALUE (Y OR N) ,$)
      READ(ITTY,2)JANSWR
      IBEGIN=-2
      IF(JANSWR.EQ.1HY)IBEGIN=1
      IF(JANSWR.NE.1HY)WRITE(JTTY,5)
    5 FORMAT(28H COMMAS WILL TERMINATE PAIRS)
      WRITE(JTTY,6)
    6 FORMAT(15H KNDBGN,KNDEND ,$)
      READ(ITTY,7)KNDBGN,KNDEND
    7 FORMAT(3I)
C
C     REQUEST NEXT LINE OF TEXT TO BE EVALUATED
    8 DO 9 KNCT=1,3
      KIND(KNCT)=0
    9 IFDONE(KNCT)=0
      WRITE(JTTY,10)
   10 FORMAT(2H *,$)
      GO TO 13
   11 WRITE(JTTY,12)
   12 FORMAT(2H _&,$)
   13 DO 14 KNCT=1,3
      LOWBFR(KNCT)=1
   14 IF(IFDONE(KNCT).GT.0)IFDONE(KNCT)=0
      READ(ITTY,15)IBUFFR
   15 FORMAT(72A1)
C
C     PROCESS CONTENTS OF BUFFER FOR ALL 3 VALUES OF KONECT
   16 INDEX=0
      LIMIT=0
      DO 47 KNCT=1,3
      KONECT=KNCT+IBEGIN
      LIMIT=LIMIT+20
      IF(IFDONE(KNCT).NE.0)GO TO 46
      IF(IANSWR.NE.1HY)
     1CALL DAPAIR  (SLACK ,KNDBGN,KNDEND,KONECT,IBUFFR,
     2MAXBFR      ,LOWBFR(KNCT),KIND  (KNCT),NEWBGN(KNCT),
     3NEWEND(KNCT),BGNNEW(KNCT),ENDNEW(KNCT),IWHERE(KNCT),
     4INCBGN(KNCT),LMTBGN(KNCT),BGNINC(KNCT),BGNLMT(KNCT),
     5INCEND(KNCT),LMTEND(KNCT),ENDINC(KNCT),ENDLMT(KNCT))
      IF(IANSWR.EQ.1HY)
     1CALL DAIPAR  (       KNDBGN,KNDEND,KONECT,IBUFFR,
     2MAXBFR      ,LOWBFR(KNCT),KIND  (KNCT),NEWBGN(KNCT),
     3NEWEND(KNCT),BGNNEW(KNCT),ENDNEW(KNCT))
      GO TO(18,20,21,22,24,26,29,29,28,17,39,41,29,28),
     1KIND(KNCT)
   17 IF(KONECT.EQ.2)GO TO 28
      IF(KONECT.EQ.4)GO TO 28
      GO TO 37
C
C     BUFFER IS EMPTY
   18 DO 19 I=1,5
      INDEX=INDEX+1
   19 JBUFFR(INDEX)=LGND1(I)
      GO TO 43
C
C     SEMICOLON
   20 INDEX=INDEX+1
      JBUFFR(INDEX)=IEND
      GO TO 45
C
C     AMPERSAND INSTEAD OF LEADING NUMBER
   21 INDEX=INDEX+1
      JBUFFR(INDEX)=IAND
      GO TO 44
C
C     AMPERSAND WHEN ASSOCIATED NUMBER NEEDED
   22 DO 23 I=1,14
      INDEX=INDEX+1
   23 JBUFFR(INDEX)=LGND4(I)
      GO TO 44
C
C     AMPERSAND WHEN ASSOCIATED NUMBER EXPECTED
   24 DO 25 I=1,16
      INDEX=INDEX+1
   25 JBUFFR(INDEX)=LGND5(I)
      GO TO 44
C
C     END OF LINE WHEN ASSOCIATED NUMBER NEEDED
   26 DO 27 I=1,18
      INDEX=INDEX+1
   27 JBUFFR(INDEX)=LGND6(I)
      KIND(KNCT)=4
      GO TO 44
C
C     REPRESENT LEADING NUMBER
   28 INDEX=INDEX+1
      JBUFFR(INDEX)=ILEFT
   29 CALL DASHOW(KNDBGN,0,4,4,4,
     13,NEWBGN(KNCT),BGNNEW(KNCT),MAXBFR,INDEX,JBUFFR,IERR)
      IF(KIND(KNCT).EQ.9)GO TO 30
      IF(KIND(KNCT).EQ.10)GO TO 30
      IF(KIND(KNCT).NE.15)GO TO 31
   30 INDEX=INDEX+1
      JBUFFR(INDEX)=IRIGHT
C
C     INSERT ' AND ' BETWEEN LEADING AND TRAILING NUMBERS
   31 DO 32 I=1,5
      INDEX=INDEX+1
   32 JBUFFR(INDEX)=LGND7(I)
      IF(KIND(KNCT).EQ.8)GO TO 33
      IF(KIND(KNCT).EQ.10)GO TO 33
      IF(KIND(KNCT).GE.13)GO TO 35
C
C     REPRESENT TRAILING NUMBER
      CALL DASHOW(KNDEND,0,4,4,4,
     13,NEWEND(KNCT),ENDNEW(KNCT),MAXBFR,INDEX,JBUFFR,IERR)
      GO TO 45
C
C     REPRESENT MISSING NUMBER
   33 DO 34 I=1,9
      INDEX=INDEX+1
   34 JBUFFR(INDEX)=LGND8(I)
      GO TO 45
C
C     REPRESENT NULL NUMBER
   35 DO 36 I=1,6
      INDEX=INDEX+1
   36 JBUFFR(INDEX)=LGND13(I)
      GO TO 45
C
C     NUMBER WHEN COMMA EXPECTED
   37 DO 38 I=1,12
      INDEX=INDEX+1
   38 JBUFFR(INDEX)=LGND10(I)
      GO TO 45
C
C     UNKNOWN CHARACTER
   39 DO 40 I=1,7
      INDEX=INDEX+1
   40 JBUFFR(INDEX)=LGND11(I)
      KIND(KNCT)=-1
      GO TO 45
C
C     RANGE NOTATION ERROR
   41 DO 42 I=1,5
      INDEX=INDEX+1
   42 JBUFFR(INDEX)=LGND12(I)
      KIND(KNCT)=-1
      GO TO 45
C
C     MARK THAT PROCESSING DONE FOR THIS VALUE OF KONECT
   43 IFDONE(KNCT)=-1
      GO TO 45
   44 IFDONE(KNCT)=1
C
C     FILL REST OF COLUMN WITH SPACES
   45 MAXPRT=INDEX
   46 IF(INDEX.GE.LIMIT)GO TO 47
      INDEX=INDEX+1
      JBUFFR(INDEX)=IBLANK
      GO TO 46
   47 CONTINUE
C
C     REPORT RESULTS FOR ALL 3 VALUES OF KONECT
      WRITE(JTTY,48)(JBUFFR(I),I=1,MAXPRT)
   48 FORMAT(2X,100A1)
C
C     DETERMINE IF PROCESSING DONE FOR ALL VALUES OF KONECT
      DO 49 KNCT=1,3
      IF(IFDONE(KNCT).EQ.0)GO TO 16
   49 CONTINUE
C
C     DETERMINE IF SERIES IS TO CONTINUE ON FOLLOWING LINE
      DO 50 KNCT=1,3
      IF(IFDONE(KNCT).GT.0)GO TO 11
   50 CONTINUE
      GO TO 8
      END
.SKIP 2
T\\YPICAL ^DIALOG ^BETWEEN ^^DAPAIR D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
^^TEST DAIPAR (Y OR N) N
DAPAIR WILL BE CALLED
COMMAS BETWEEN INDEX AND VALUE (Y OR N) N
COMMAS WILL TERMINATE PAIRS
KNDBGN,KNDEND 0 0
*1/3 4;5/7 8!END OF LINE WHEN VALUE NEEDED
 1 AND 4             1 AND 4             1 AND 4
 2 AND MISSING _#     2 AND MISSING _#     2 AND MISSING _#
 3 AND MISSING _#     3 AND MISSING _#     3 AND MISSING _#
 ;                   ;                   ;
 5 AND 8             5 AND 8             5 AND 8
 EMPTY BUT _# NEEDED  EMPTY BUT _# NEEDED  6 AND MISSING _#
                                         7 AND MISSING _#
                                         EMPTY
_&9/11 12 13
 6 AND 9             6 AND 9
 7 AND 10            7 AND 10
 (7) AND 11          (7) AND 11
 (7) AND 12          UNEXPECTED _#
 (7) AND 13          12 AND 13
 EMPTY               EMPTY
*1/3 4!TEST OF FOLLOWING COMMA
 1 AND 4             1 AND 4             1 AND 4
 EMPTY BUT _# NEEDED  EMPTY BUT _# NEEDED  2 AND MISSING _#
                                         3 AND MISSING _#
                                         EMPTY
_&,5 6
 2 AND MISSING _#     2 AND MISSING _#
 3 AND MISSING _#     3 AND MISSING _#
 5 AND 6             5 AND 6
 EMPTY               EMPTY
.SUBTITLE ^^DAPATH, R\\OUTINE TO ^REPRESENT ^INTEGER ^SEQUENCE OF ^FORM 1.2.3
.PAGE
.LEFT MARGIN 0
.NOFILL
^^DDDDD          AAA   PPPPPP        AAA   TTTTTTTT   HH    HH
DD   DD       AAAA   PP    PP     AAAA      TT      HH    HH
DD    DD     AA AA   PP    PP    AA AA      TT      HH    HH
DD    DD    AA  AA   PPPPPP     AA  AA      TT      HHHHHHHH
DD    DD   AAAAAAA   PP        AAAAAAA      TT      HH    HH
DD   DD   AA    AA   PP       AA    AA      TT      HH    HH
DDDDD    AA     AA   PP      AA     AA      TT      HH    HH
.FILL
.SKIP 3
.CENTER
DAPATH, R\\OUTINE TO ^REPRESENT ^INTEGER ^SEQUENCE OF ^FORM 1.2.3
.CENTER
------##------- -- --------- ------- -------- -- ---- -----
.SKIP
^^DAPATH \\REPRESENTS A SEQUENCE OF UNSIGNED INTEGERS SO THAT THEY
CAN BE WRITTEN WITH A ^^FORTRAN \\FORMAT STATEMENT CONTAINING A
MULTIPLE ^A1 ALPHAMERIC SPECIFICATION. ^VALUES WITHIN THE SEQUENCE
WHICH ARE EQUAL TO OR GREATER THAN ZERO ARE REPRESENTED DIRECTLY AND
ARE SEPARATED BY PERIODS. ^VALUES LESS THAN ZERO ARE NOT
REPRESENTED, BUT THE SAME SEPARATING PERIODS ARE INSERTED INTO THE
OUTPUT TEXT BUFFER AS IF THE VALUES WERE REPRESENTED. ^NO PRINTING
CHARACTERS ARE INSERTED INTO THE OUTPUT TEXT BUFFER IF THE SEQUENCE
CONSISTS OF A SINGLE NEGATIVE VALUE. ^FOR EXAMPLE, THE SEQUENCE
.SKIP
.INDENT 5
100, 200, -1, 400
.SKIP
WOULD INSERT THE FOLLOWING INTO THE OUTPUT TEXT BUFFER
.SKIP
.INDENT 5
1^^H1,1H0,1H0,1H.,1H2,1H0,1H0,1H.,1H.,1H4,1H0,1H0
.SKIP
\\WHICH WHEN WRITTEN WITH A 12^A1 FORMAT (WHERE THE NUMBER TO THE
LEFT OF THE ^A1 CAN BE GREATER THAN 12) WOULD PRODUCE
.SKIP
.INDENT 5
100.200..400
.SKIP 2
.CENTER
^THE ^^DAPATH A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DAPATH \I\S
.SKIP
.NOFILL
      SUBROUTINE DAPATH(LOWVLU,KNTVLU,IVALUE,JSTIFY,IFILL ,
     1    IWIDTH,LFTCOL,MAXBFR,IBUFFR,KOUNT ,IERR  )
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR),IVALUE(KNTVLU)
.SKIP
.FILL
.TEST PAGE 2
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT ONLY, AND ARE RETURNED
UNCHANGED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LOWVLU#=#\\SUBSCRIPT OF THE ^^IVALUE \\ARRAY LOCATION WHICH
CONTAINS THE FIRST VALUE WHICH IS TO BE REPRESENTED. ^IF ^^LOWVLU
\\IS GREATER THAN ^^KNTVLU, \\OR ELSE IF ^^LOWVLU \\EQUALS ^^KNTVLU
\\AND ^^IVALUE(LOWVLU) \\IS LESS THAN ZERO, THEN NO PRINTING
CHARACTERS WILL BE INSERTED INTO THE ^^IBUFFR \\ARRAY. ^IF
^^IVALUE(LOWVLU) \\IS LESS THAN ZERO AND ^^KNTVLU \\IS GREATER THAN
^^LOWVLU, \\THEN THE FIRST PRINTING CHARACTER RETURNED IN THE
^^IBUFFR \\ARRAY WILL BE A PERIOD.
.SKIP
.INDENT -9
^^KNTVLU#=#\\SUBSCRIPT OF THE ^^IVALUE \\ARRAY LOCATION WHICH
CONTAINS THE FINAL VALUE WHICH IS TO BE REPRESENTED. ^IF
^^IVALUE(KNTVLU) \\IS LESS THAN ZERO AND ^^KNTVLU \\IS GREATER THAN
^^LOWVLU, \\THEN THE FINAL PRINTING CHARACTER RETURNED IN THE
^^IBUFFR \\ARRAY WILL BE A PERIOD.
.SKIP
.INDENT -9
^^IVALUE#=#\\ARRAY CONTAINING IN LOCATIONS ^^IVALUE(LOWVLU)
\\THROUGH AND INCLUDING ^^IVALUE(KNTVLU) \\THE INTEGER SEQUENCE
WHICH IS TO BE REPRESENTED. ^VALUES EQUAL TO OR GREATER THAN ZERO
ARE REPRESENTED DIRECTLY AND ARE SEPARATED BY PERIODS. ^VALUES LESS
THAN ZERO ARE NOT REPRESENTED, BUT THE SAME SEPARATING PERIODS
APPEAR AS IF THE VALUES WERE REPRESENTED.
.SKIP
.INDENT -9
^^JSTIFY#=#-1, \\LEFT JUSTIFY THE REPRESENTATION OF THE INTEGER
SEQUENCE IN THE FIELD CONSISTING OF ^^IBUFFR(LFTCOL+1) \\THROUGH
^^IBUFFR(LFTCOL+IWIDTH) (\\OR THROUGH ^^IBUFFR(MAXBFR) \I\F MAXBFR
\\IS LESS THAN ^^LFTCOL+IWIDTH).
.INDENT -2
=#0, \\CENTER THE REPRESENTATION OF THE INTEGER SEQUENCE IN THE
FIELD CONSISTING OF ^^IBUFFR(LFTCOL+1) \\THROUGH
^^IBUFFR(LFTCOL+IWIDTH) (\\OR THROUGH ^^IBUFFR(MAXBFR) \I\F MAXBFR
\\IS LESS THAN ^^LFTCOL+IWIDTH). IBUFFR \\ARRAY LOCATIONS WHICH ARE
TO THE LEFT OF THE REPRESENTATION OF THE INTEGER SEQUENCE ARE FILLED
WITH SPACES.
.INDENT -2
=#1, RIGHT JUSTIFY THE REPRESENTATION OF THE INTEGER SEQUENCE IN THE
FIELD CONSISTING OF ^^IBUFFR(LFTCOL+1) \\THROUGH
^^IBUFFR(LFTCOL+IWIDTH) (\\OR THROUGH ^^IBUFFR(MAXBFR) \I\F MAXBFR
\\IS LESS THAN ^^LFTCOL+IWIDTH). IBUFFR \\ARRAY LOCATIONS WHICH ARE
TO THE LEFT OF THE REPRESENTATION OF THE INTEGER SEQUENCE ARE FILLED
WITH SPACES.
.SKIP
.INDENT -9
^^IFILL##=#0, \\DO NOT FILL THE PORTION OF THE FIELD WHICH IS TO THE
RIGHT OF THE REPRESENTATION OF THE INTEGER SEQUENCE WITH SPACES.
^THE VALUE OF ^^IFILL \\HAS NO EFFECT ON THE PRINTING CHARACTERS IN
THE REPRESENTATION OF THE INTEGER SEQUENCE. ^^KOUNT \\WILL BE
RETURNED POINTING TO THE RIGHTMOST PRINTING CHARACTER IN THE
REPRESENTATION OF THE INTEGER SEQUENCE.
.INDENT -2
=#1, FILL WITH SPACES THE PORTION OF THE FIELD WHICH IS TO THE RIGHT
OF THE REPRESENTATION OF THE INTEGER SEQUENCE AND EXTENDING THROUGH
^^IBUFFR(LFTCOL+IWIDTH) (\\OR THROUGH ^^IBUFFR(MAXBFR) \I\F MAXBFR
\\IS LESS THAN ^^LFTCOL+IWIDTH). KOUNT \\WILL BE RETURNED SET EQUAL
TO ^^LFTCOL+IWIDTH \O\R MAXBFR, \\WHICHEVER IS THE SMALLER.
.SKIP
.INDENT -9
^^IWIDTH#=#\\WIDTH, STATED AS THE NUMBER OF COLUMNS OR OF ^^IBUFFR
\\ARRAY LOCATIONS, OF THE FIELD IN WHICH THE INTEGER SEQUENCE IS TO
BE REPRESENTED. ^THE RIGHTMOST ^^IBUFFR \\ARRAY LOCATION IN THE
FIELD HAS THE SUBSCRIPT ^^LFTCOL+IWIDTH \\OR ELSE ^^MAXBFR,
\\WHICHEVER IS THE SMALLER.
.SKIP
.INDENT -9
^^LFTCOL#=#\\SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION WHICH IS TO
THE IMMEDIATE LEFT OF THE LEFTMOST ^^IBUFFR \\ARRAY LOCATION INTO
WHICH EITHER A SPACE OR A CHARACTER OF THE REPRESENTATION OF THE
INTEGER SEQUENCE CAN BE PLACED.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE RIGHTMOST ^^IBUFFR \\ARRAY LOCATION
INTO WHICH COULD BE PLACED A SPACE OR A CHARACTER OF THE
REPRESENTATION OF THE INTEGER SEQUENCE IF ^^IWIDTH \\IS LARGE ENOUGH.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS RETURNED BY THIS ROUTINE CONTAINING THE
REPRESENTATION OF THE INTEGER SEQUENCE.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^IBUFFR#=#\\ARRAY IN WHICH THE REPRESENTATION OF THE INTEGER
SEQUENCE IS RETURNED, 1 CHARACTER PER ARRAY LOCATION AS THOUGH READ
BY A MULTIPLE OF AN ^A1 FORMAT.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR OUTPUT FROM THIS ROUTINE.
^THEIR INPUT VALUES ARE IGNORED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KOUNT##=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE RIGHTMOST
^^IBUFFR \\ARRAY LOCATION INTO WHICH A CHARACTER HAS BEEN PLACED BY
THIS ROUTINE.
.SKIP
.INDENT -9
^^IERR###=#-1 \\RETURNED IF THE REPRESENTATION OF THE ENTIRE INTEGER
SEQUENCE WOULD NOT FIT INTO THE FIELD INDICATED BY ^^LFTCOL \\AND BY
EITHER ^^IWIDTH \O\R MAXBFR, \\WHICHEVER INDICATES THE SMALLER
FIELD. ^IF THE REPRESENTATION WOULD NOT FIT AND ^^MAXBFR \I\S
\\GREATER THAN OR EQUAL TO ^^LFTCOL+IWIDTH, \\THEN
^^IBUFFR(LFTCOL+1) \\THROUGH AND INCLUDING ^^IBUFFR(LFTCOL+IWIDTH)
\\ARE RETURNED CONTAINING ASTERISKS, AND ^^KOUNT \\IS RETURNED SET
EQUAL TO ^^LFTCOL+IWIDTH. I\\F THE REPRESENTATION WOULD NOT FIT AND
^^MAXBFR \\IS LESS THAN ^^LFTCOL+IWIDTH, \\THEN THE ASTERISKS EXTEND
THROUGH ^^IBUFFR(MAXBFR) \\AND ^^KOUNT \\IS RETURNED SET EQUAL TO
^^MAXBFR.
.INDENT -2
=#0 \\RETURNED IF THE ENTIRE INTEGER SEQUENCE COULD BE REPRESENTED
IN THE FIELD.
.PAGE
.LEFT MARGIN 0
.FILL
.CENTER
^^DAPATH D\\EMONSTRATION ^PROGRAM, AND ^DIALOG ^BETWEEN ^IT AND ^USER
.CENTER
------ ------------- -------##--- ------ ------- -- --- ----
.SKIP
.NOFILL
      ^^DIMENSION IBUFFR(60),IVALUE(20)
      DATA ISLASH/1H//
      DATA ITTY,JTTY,IWIDTH/5,5,18/
C
C     GET NEXT INTEGER SEQUENCE TO BE REPRESENTED
    1 WRITE(ITTY,2)
    2 FORMAT(2H *,$)
      READ(JTTY,3)IBUFFR
    3 FORMAT(60A1)
      LOWBFR=1
      KNTVLU=0
      CALL DATEAM(0,0,1,20,60,
     1IBUFFR,LOWBFR,KNTVLU,KIND,IVALUE,IVALUE)
C
C     REPRESENT THE INTEGER SEQUENCE
      DO 4 I=1,60
    4 IBUFFR(I)=ISLASH
      LFTCOL=1
      DO 5 KOLUMN=1,3
      JSTIFY=KOLUMN-2
      CALL DAPATH(1,KNTVLU,IVALUE,JSTIFY,1,
     1IWIDTH,LFTCOL,60,IBUFFR,KOUNT,IERR)
      LFTCOL=KOUNT+1
    5 CONTINUE
      WRITE(ITTY,6)(IBUFFR(I),I=1,LFTCOL)
    6 FORMAT(1X,60A1)
      GO TO 1
      END
.SKIP
.FILL
T\\HE PROGRAM PROMPTS THE USER WITH AN ASTERISK, THEN READS A SERIES
OF UP TO 20 NUMBERS. ^THE LEFT JUSTIFIED, CENTERED AND RIGHT
JUSTIFIED REPRESENTATIONS OF THE SERIES ARE THEN REPORTED TO THE USER.
.SKIP
.NOFILL
*0
/0                 /        0         /                 0/
*-1
/                  /                  /                  /
*0 2
/0.2               /       0.2        /               0.2/
*-1 -1
/.                 /        .         /                 ./
*0 2 4
/0.2.4             /      0.2.4       /             0.2.4/
*-1 2 -1
/.2.               /       .2.        /               .2./
*0 2 4 8 16 32 64
/0.2.4.8.16.32.64  / 0.2.4.8.16.32.64 /  0.2.4.8.16.32.64/
*-1 2 4 -1 16 32 -1
/.2.4..16.32.      /   .2.4..16.32.   /      .2.4..16.32./
.SUBTITLE ^^DAPICK, R\\OUTINE TO ^INTERPRET ^ARRAY ^NAME AND ^SUBSCRIPT ^RANGES
.PAGE
.NOFILL
.LEFT MARGIN 0
^^DDDDD           AAA   PPPPPP     IIIIII     CCCCC   KK   KK
DD   DD        AAAA   PP    PP     II     CC        KK  KK
DD    DD      AA AA   PP    PP     II    CC         KK KK
DD    DD     AA  AA   PPPPPP       II    CC         KKKKK
DD    DD    AAAAAAA   PP           II    CC         KKK KK
DD   DD    AA    AA   PP           II     CC        KK   KK
DDDDD     AA     AA   PP         IIIIII     CCCCC   KK    KK
.FILL
.SKIP 3
.CENTER
DAPICK, R\\OUTINE TO ^INTERPRET ^ARRAY ^NAME AND ^SUBSCRIPT ^RANGES
.CENTER
------##------- -- --------- ----- ---- --- --------- ------
.SKIP
^^DAPICK \\IS USED ALONG WITH SEVERAL OTHER ROUTINES IN THE ^^FASP
\\PACKAGE FOR THE PURPOSE OF SPECIFYING BY NAME, EXAMINING AND
MODIFYING THE VALUES OF MULTIPLY SUBSCRIPTED ARRAYS EQUIVALENCED
WITH OR OTHERWISE LOADED INTO A SINGLY SUBSCRIPTED BUFFER. ^THE
INTERACTION BETWEEN THESE ROUTINES IS DESCRIBED AT THE START OF THE
^^DALOAD \\DOCUMENTATION. ^THE SAMPLE PROGRAM AT THE END OF THE
^^DALOAD \\DOCUMENTATION ILLUSTRATES THE USE OF MOST OF THESE
ROUTINES.
.SKIP
^^DAPICK \\IDENTIFIES THE ARRAY NAME AND SUBSCRIPT RANGES TYPED BY
THE USER AND READ BY THE CALLING PROGRAM WITH A MULTIPLE OF AN ^A1
FORMAT. ^SPACES AND/OR TAB CHARACTERS CAN APPEAR ANYWHERE IN THE
TEXT INTERPRETED BY ^^DAPICK, \\BUT ARE IGNORED. ^THE PRINTING
CHARACTERS IN THE BUFFER ARRAY ARE MATCHED AGAINST THE WORDS IN THE
DICTIONARY CONSTRUCTED BY THE ^^DALOAD \\ROUTINE. ^THE ARRAY NAME
TYPED BY THE USER MUST MATCH A NAME IN THE DICTIONARY EXACTLY.
^ABBREVIATIONS ARE NOT RECOGNIZED. ^THE MATCH MUST INCLUDE ALL
PRINTING CHARACTERS TYPED BY THE USER THROUGH THE END OF THE BUFFER
OR UP TO BUT NOT INCLUDING A LEFT PARENTHESIS, EQUAL SIGN,
SEMICOLON, EXCLAMATION POINT OR AMPERSAND. ^ANY OTHER UNMATCHED
PRINTING CHARACTERS WILL CAUSE THE COMPARISON TO FAIL.
.SKIP
^NUMBERS INDICATING SUBSCRIPT RANGES FOLLOW THE ARRAY NAME AND ARE
ENCLOSED BETWEEN LEFT AND RIGHT PARENTHESES. ^THE SUBSCRIPT RANGE
SPECIFICATIONS ARE SEPARATED BY COMMAS AND CONSIST OF THE STARTING
VALUE, A SLASH CHARACTER OR A COLON (THE 2 CHARACTERS ARE
EQUIVALENT), AND THE ENDING VALUE. ^THE STARTING VALUE OF A RANGE
CAN BE LESS THAN, EQUAL TO, OR GREATER THAN THE ENDING VALUE. ^THE
NUMBERS INDICATING THE SUBSCRIPT RANGES CAN BE SIGNED, BUT CANNOT
CONTAIN AN EXPONENT, NEITHER THE ^E OF SCIENTIFIC NOTATION NOR ^K
NOR ^M BEING ACCEPTED. ^IF A SLASH OR A COLON IS PRESENT BUT EITHER
NUMBER IS MISSING, THEN THE MISSING NUMBER IS ASSUMED TO BE THE
CORRESPONDING LIMIT FOR THE SUBSCRIPT AS SPECIFIED BY THE
DICTIONARY. ^IF A SINGLE NUMBER APPEARS WITHOUT A SLASH AND WITHOUT
A COLON, THEN THE RANGE IS ASSUMED TO CONSIST ONLY OF THE INDICATED
NUMBER. ^IF NOTHING OR JUST A SLASH OR JUST A COLON APPEARS BETWEEN
THE PARENTHESES AND/OR COMMAS, THEN THE RANGE IS ASSUMED TO EXTEND
ACROSS ALL POSSIBLE VALUES OF THE SUBSCRIPT AS SPECIFIED BY THE
DICTIONARY. ^FOR EXAMPLE, IF THE INPUT BUFFER CONTAINS THE TEXT
.SKIP
.INDENT 5
^R2^A(2/,,3,12/14)
.SKIP
AND IF THE DICTIONARY INDICATES THAT ^R2^A IS DIMENSIONED
(3,4,3,18), THEN ^^DAPICK \\WOULD SPECIFY THAT
.SKIP
.LEFT MARGIN 5
.INDENT -3
A.#THE FIRST SUBSCRIPT SHOULD BE VARIED FROM 2 THROUGH THE UPPER
LIMIT OF 3
.SKIP
.INDENT -3
B.#THE SECOND SUBSCRIPT SHOULD BE VARIED FROM THE LOWER LIMIT OF 1
THROUGH THE UPPER LIMIT OF 4
.SKIP
.INDENT -3
C.#THE THIRD SUBSCRIPT SHOULD HAVE THE SINGLE VALUE 3
.SKIP
.INDENT -3
D.#THE FOURTH SUBSCRIPT SHOULD BE VARIED FROM 12 THROUGH 14.
.SKIP
.LEFT MARGIN 0
^AFTER BEING EVALUATED, THE SUBSCRIPT RANGES ARE COMPARED WITH THE
LIMITS STORED IN THE DICTIONARY. ^IF THE DICTIONARY INDICATES THAT
THE NAME IS NOT SUBSCRIPTED OR THAT IT CAN TAKE ONLY THE SINGLE
SUBSCRIPT 1, THEN IN EITHER OF THESE CASES THE COMPLETE LACK OF ANY
PARENTHETICAL SUBSCRIPT NOTATION, OR ELSE THE SINGLE SUBSCRIPT 1
TYPED BY THE USER, WILL BE ACCEPTED.
.SKIP
^IF AN EQUAL SIGN IS FOUND TO THE RIGHT OF THE ARRAY NAME OR TO THE
RIGHT OF THE ARRAY NAME AND OF ITS SUBSCRIPTS, THEN THE LOCATION OF
THE FIRST CHARACTER TO THE RIGHT OF THE EQUAL SIGN IS ALSO
IDENTIFIED TO THE CALLING PROGRAM.
.SKIP
^SEMICOLONS PRECEDING THE ARRAY NAME ARE IGNORED, EXCEPT THAT AT
LEAST ONE SEMICOLON CAN BE REQUIRED TO PRECEDE AN ADDITIONAL ARRAY
NAME IN A LINE OF TEXT IN WHICH A PREVIOUS CALL TO THIS ROUTINE HAS
ALREADY FOUND AND PROCESSED ONE OR MORE OTHER ARRAY NAMES.
.SKIP
^IF AN EXCLAMATION POINT OR AN AMPERSAND IS FOUND ANYWHERE IN THE
TEXT TYPED BY THE USER, THEN THE EXCLAMATION OR AMPERSAND AND ALL
CHARACTERS TO ITS RIGHT ARE TAKEN TO BE A COMMENT AND ARE OTHERWISE
IGNORED.
.PAGE
.CENTER
^THE ^^DAPICK A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DAPICK IS
.SKIP
.NOFILL
      SUBROUTINE DAPICK(MAXBFR,IBUFFR,LTRLOW,LTRUSD,LTRSTR,
     1    NUMLOW,NUMUSD,NUMSTR,MAXSUB,LOWBFR,KIND  ,LRGLTR,
     2    LRGNUM,LRGKNT,INITAL,KOUNT ,LTRINI,NUMINI,KNTSUB,
     3    INISUB,LMTSUB)
.SKIP
.FILL
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
.NOFILL
      ^^DIMENSION IBUFFR(MAXBFR),LTRSTR(LTRUSD),
     1NUMSTR(NUMUSD),INISUB(MAXSUB),LMTSUB(MAXSUB)
.FILL
.SKIP
T\\HE FOLLOWING ARE INPUT ARGUMENTS LEFT UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^MAXBFR#=#\\MAXIMUM SUBSCRIPT OF THE LOCATIONS IN THE ^^IBUFFR
\\ARRAY CONTAINING CHARACTERS READ BY THE THE CALLING PROGRAM AND
WHICH ARE TO BE INTERPRETED BY THIS ROUTINE.
.SKIP
.INDENT -9
^^IBUFFR#=#\\INPUT BUFFER ARRAY CONTAINING CHARACTERS TYPED BY THE
USER AND READ BY A MULTIPLE OF AN ^A1 FORMAT, WHICH ARE TO BE
SEARCHED FOR ARRAY NAMES AND SUBSCRIPT VALUES. ^^IBUFFR \\THEN
CONTAINS 1 CHARACTER PER COMPUTER STORAGE LOCATION.
.SKIP
.INDENT -9
^^LTRLOW#=#\\LOWEST SUBSCRIPT OF THE LOCATIONS IN THE ^^LTRSTR
\\ARRAY CONTAINING THE CHARACTERS OF THE NAMES IN THE DICTIONARY AS
ORIGINALLY READ BY ^^DALOAD \\USING A MULTIPLE OF AN ^A1 FORMAT.
^^LTRSTR(LTRLOW) \\CONTAINS EITHER THE FIRST LETTER OF THE NAME OF
THE FIRST LOGICAL GROUP OF NAMES IN THE DICTIONARY OR ELSE (IF THE
FIRST GROUP ITSELF ISN'T NAMED) THE FIRST LETTER OF THE FIRST NAME
WITHIN THE FIRST LOGICAL GROUP IN THE DICTIONARY.
.SKIP
.INDENT -9
^^LTRUSD#=#\\HIGHEST SUBSCRIPT OF THE LOCATIONS IN THE ^^LTRSTR
\\ARRAY CONTAINING THE CHARACTERS OF THE NAMES IN THE DICTIONARY AS
ORIGINALLY READ BY ^^DALOAD \\USING A MULTIPLE OF AN ^A1 FORMAT.
^^LTRSTR(LTRUSD) \\CONTAINS THE LAST CHARACTER OF THE LAST NAME IN
THE DICTIONARY.
.SKIP
.INDENT -9
^^LTRSTR#=#\\ARRAY CONTAINING THE CHARACTERS FORMING THE NAMES IN
THE DICTIONARY, 1 CHARACTER PER ARRAY LOCATION AS ORIGINALLY READ BY
^^DALOAD \\USING A MULTIPLE OF AN ^A1 FORMAT.
.SKIP
.INDENT -9
^^NUMLOW#=#\\LOWEST SUBSCRIPT OF THE LOCATIONS IN THE ^^NUMSTR
\\ARRAY CONTAINING THE NUMERIC INFORMATION CORRESPONDING TO THE
NAMES STORED IN THE ^^LTRSTR \\ARRAY. ^^NUMSTR(NUMLOW) \\MUST
CONTAIN THE START OF THE DESCRIPTION OF A LOGICAL GROUP OF NAMES,
NOT THE START OF THE DESCRIPTION OF AN INDIVIDUAL NAME.
.SKIP
.INDENT -9
^^NUMUSD#=#\\HIGHEST SUBSCRIPT OF THE LOCATIONS IN THE ^^NUMSTR
\\ARRAY CONTAINING THE NUMERIC INFORMATION CORRESPONDING TO THE
NAMES STORED IN THE ^^LTRSTR \\ARRAY.
.SKIP
.INDENT -9
^^NUMSTR#=#\\ARRAY CONTAINING THE NUMERIC INFORMATION CORRESPONDING
TO THE NAMES STORED IN THE ^^LTRSTR \\ARRAY. ^THE CONSTRUCTION OF
THE ^^NUMSTR \\ARRAY IS DESCRIBED IN DETAIL IN THE ^^DALOAD
\\DOCUMENTATION. ^FOR EACH NAME IN THE DICTIONARY, THE ^^NUMSTR
\\ARRAY CONTAINS
.SKIP
.LEFT MARGIN 14
.INDENT -3
A.#THE NUMBER OF CHARACTERS IN THE NAME
.SKIP
.INDENT -3
B.#AN INDICATION OF THE ASSOCIATED DATA TYPE
.SKIP
.INDENT -3
C.#THE NUMBER OF SUBSCRIPT RANGES
.SKIP
.INDENT -3
D.#PAIRS OF STARTING AND ENDING VALUES OF THESE RANGES.
.SKIP
.LEFT MARGIN 9
^IF THE NUMBER OF CHARACTERS IS INSTEAD ZERO OR NEGATIVE, THEN ITS
ABSOLUTE VALUE IS THE NUMBER OF CHARACTERS IN THE NAME OF A LOGICAL
GROUP OF NAMES, AND THE NEXT LOCATION, RATHER THAN INDICATING THE
DATA TYPE, CONTAINS THE NUMBER OF LOCATIONS WITHIN A SINGLY
SUBSCRIPTED BUFFER WHICH WOULD BE NEEDED TO STORE THE VALUES OF THE
MULTIPLY SUBSCRIPTED ARRAYS WHICH ARE WITHIN THE LOGICAL GROUP AND
EQUIVALENCED WITH OR OTHERWISE LOADED INTO SUCH A SINGLY SUBSCRIPTED
BUFFER.
.SKIP
.INDENT -9
^^MAXSUB#=#\\HIGHEST SUBSCRIPT OF THE LOCATIONS IN THE ^^INISUB
\\AND ^^LMTSUB \\ARRAYS WHICH CAN BE USED BY THIS ROUTINE TO STORE
THE SUBSCRIPT RANGES TYPED BY THE USER. ^THE START OF THE FIRST
RANGE IS STORED IN ^^INISUB(1) \\AND THE END OF THE FIRST RANGE IN
^^LMTSUB(1). I\\F THE ARRAY NAMES STORED IN THE DICTIONARY ARE
ACTUALLY THE NAMES OF ^^FORTRAN \\LANGUAGE ARRAYS, THEN THE
^^FORTRAN \\LIMIT OF 7 SUBSCRIPTS WOULD APPLY, SUGGESTING THAT
^^MAXSUB \\SHOULD BE 7 AND THAT BOTH ^^INISUB \\AND ^^LMTSUB
\\SHOULD BE DIMENSIONED TO AT LEAST 7. ^IF MORE THAN ^^MAXSUB
\\SUBSCRIPT RANGES ARE TYPED BY THE USER, THEN THE EXCESS RANGES TO
THE RIGHT OF THOSE ACCEPTED ARE IGNORED (THAT IS, ^^KNTSUB \\IS NOT
INCREMENTED, THE VALUES OF THE BOUNDS ARE NOT STORED IN THE ^^INISUB
\\AND ^^LMTSUB \\ARRAYS AND THE APPEARANCE OF THE EXCESS RANGES IS
NOT TAKEN TO BE AN ERROR), EXCEPT FOR SUCH INTERPRETATION AS IS
NECESSARY TO DETERMINE THE LOCATION WITHIN THE BUFFER OF THE CLOSING
PARENTHESIS.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED BOTH FOR INPUT TO THE ^^DAPICK
\\ROUTINE, AND FOR OUTPUT TO THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LOWBFR#=#\\INPUT CONTAINING THE SUBSCRIPT WITHIN THE ^^IBUFFR
\\ARRAY OF THE FIRST (LEFTMOST) CHARACTER WHICH CAN BE SCANNED FOR
AN ARRAY NAME. ^IF THE CHARACTERS IN THE BUFFER DO NOT MATCH A NAME
IN THE DICTIONARY, THEN ^^LOWBFR \\WILL BE RETURNED POINTING TO THE
LEFTMOST PRINTING CHARACTER WHICH IS NOT A SEMICOLON NOR AN
EXCLAMATION POINT NOR AN AMPERSAND AND WHICH IS NOT TO THE RIGHT OF
AN EXCLAMATION POINT AND WHICH IS NOT TO THE RIGHT OF AN AMPERSAND,
OR ELSE WILL BE RETURNED CONTAINING ^^MAXBFR+1 \\IF NO SUCH PRINTING
CHARACTERS ARE FOUND IN THE BUFFER. ^IF THE TEXT IN THE BUFFER DOES
MATCH A WORD IN THE DICTIONARY, THEN ^^LOWBFR \\WILL BE RETURNED
POINTING TO THE FIRST CHARACTER TO THE RIGHT OF THE NAME, OR TO THE
FIRST CHARACTER TO THE RIGHT OF THE SUBSCRIPT RANGE IF PRESENT, OR
TO THE FIRST CHARACTER TO THE RIGHT OF THE EQUAL SIGN EITHER
FOLLOWING THE SUBSCRIPT RANGE OR FOLLOWING THE NAME DIRECTLY. ^IF A
MATCH IS FOUND, THEN ^^LOWBFR \\IS RETURNED CONTAINING THE LOCATION
OF THE FIRST CHARACTER OF THE TEXT IN THE ^^IBUFFR \\ARRAY WHICH
SHOULD BE INTERPRETED BY THE ^^DAVARY \\ROUTINE TO OBTAIN THE
NUMERIC VALUES, IF ANY, TYPED BY THE USER TO THE RIGHT OF THE EQUAL
SIGN.
.SKIP
.INDENT -9
^^KIND###=#\\INPUT TO THIS ROUTINE DESCRIBING THE PREVIOUS
PROCESSING, IF ANY, OF THE LINE OF TEXT TYPED BY THE USER AND
CONTAINED IN THE INPUT BUFFER ARRAY ^^IBUFFR. KIND \\IS RETURNED TO
THE CALLING PROGRAM DESCRIBING THE TYPE OF INFORMATION FOUND IN THE
BUFFER.
.SKIP
.LEFT MARGIN 7
^^KIND \\IS INPUT TO THIS ROUTINE WITH ITS VALUE SPECIFYING THE
FOLLOWING INFORMATION.
.LEFT MARGIN 9
.SKIP
.INDENT -2
=#-1 INPUT, NONE OF THE CHARACTERS CURRENTLY IN THE ^^IBUFFR \\ARRAY
HAVE BEEN PROCESSED BY PREVIOUS CALLS TO ^^DAPICK \O\R DAVARY. A\N
\\INITIAL SEMICOLON IS NOT REQUIRED SINCE THE CURRENT CALL TO
^^DAPICK \\WILL EVALUATE THE FIRST CHARACTER TYPED BY THE USER.
^^KIND \\WILL BE RETURNED CONTAINING THE VALUE 3 IF THE INPUT BUFFER
IS EMPTY OR MERELY CONTAINS SEMICOLONS AND/OR A COMMENT INDICATED BY
A LEADING EXCLAMATION POINT.
.INDENT -2
=#0 INPUT, A SEMICOLON WAS TYPED BY THE USER WHEN THE USER WAS ASKED
TO DEFINE THE NEW VALUE OF THE PREVIOUSLY SELECTED ARRAY. ^^DAVARY
\\RETURNED CONTROL TO ^^DAPICK \\TO CONTINUE PROCESSING OF THE
CONTENTS OF THE ^^IBUFFR \\ARRAY AFTER HAVING FIRST ADVANCED
^^LOWBFR \\BEYOND THE LOCATION OF THE SEMICOLON. ^IF THE REMAINDER
OF THE BUFFER IS EMPTY OR CONTAINS MERELY SEMICOLONS AND/OR A
COMMENT INDICATED BY A LEADING EXCLAMATION POINT OR BY A LEADING
AMPERSAND, THEN ^^KIND \\WILL BE RETURNED WITH THE VALUE 4.
.INDENT -2
=#1 (OR GREATER) INPUT, THE SUBSCRIPTS OF THE PREVIOUSLY SPECIFIED
SIMULATED ARRAY WERE VARIED THROUGH THE ENTIRE RANGE SELECTED BY THE
USER. ^^DAROLL (\O\R DALOOP) \\HAS THEN RETURNED CONTROL BACK TO
^^DAPICK \\TO CONTINUE PROCESSING OF THE REMAINING CHARACTERS IN THE
INPUT BUFFER. ^IF THE REMAINDER OF THE BUFFER IS EMPTY OR CONTAINS
MERELY SEMICOLONS AND/OR A COMMENT INDICATED BY A LEADING
EXCLAMATION POINT OR BY A LEADING AMPERSAND, THEN ^^KIND \\WILL BE
RETURNED WITH THE VALUE 4. ^IF AN NEW ARRAY SPECIFICATION APPEARS IN
THE BUFFER, IT MUST FOLLOW (APPEAR TO THE RIGHT OF) AT LEAST ONE
SEMICOLON. ^^KIND \\IS RETURNED CONTAINING THE VALUE 8 IF THE FIRST
PRINTING CHARACTER AT OR TO THE RIGHT OF ^^LOWBFR \\IS NOT A
SEMICOLON NOR AN EXCLAMATION POINT NOR AN AMPERSAND.
.SKIP
.LEFT MARGIN 7
^^KIND \\IS RETURNED BY THIS ROUTINE WITH ITS VALUE SPECIFYING THE
FOLLOWING INFORMATION.
.LEFT MARGIN 9
.SKIP
.INDENT -2
=#1 RETURNED, THE TEXT TYPED BY THE USER MATCHED A NAME IN THE
DICTIONARY, BUT NO EQUAL SIGN FOLLOWED THE NAME OR SUBSCRIPT RANGES
IN THE ^^IBUFFR \\ARRAY. ^^LOWBFR \\IS RETURNED POINTING TO THE
FIRST CHARACTER TO THE RIGHT OF THE RIGHT PARENTHESIS OR IF
SUBSCRIPTS WERE NOT INDICATED TO THE FIRST CHARACTER (WHICH WOULD
HAVE TO BE A SPACE, A TAB, A SEMICOLON, AN EXCLAMATION POINT, AN
AMPERSAND OR ELSE BE BEYOND THE END OF THE BUFFER) TO THE RIGHT OF
THE NAME.
.INDENT -2
=#2 RETURNED, THE TEXT TYPED BY THE USER MATCHED A NAME IN THE
DICTIONARY, AND AN EQUAL SIGN FOLLOWS THE NAME OR THE SUBSCRIPT
RANGES. ^^LOWBFR \\IS RETURNED POINTING TO THE FIRST CHARACTER TO
THE RIGHT OF THE EQUAL SIGN.
.INDENT -2
=#3 RETURNED, THE INPUT BUFFER CONTAINED NO PRINTING CHARACTERS
OTHER THAN SEMICOLONS AND/OR THE CHARACTERS OF A COMMENT INDICATED
BY A LEADING EXCLAMATION POINT, AND ^^KIND \\WAS INPUT CONTAINING -1
INDICATING THAT THIS ROUTINE HAS NOT PREVIOUSLY BEEN CALLED TO
PROCESS ANY OF THE CHARACTERS CURRENTLY IN THE BUFFER. ^^LOWBFR \I\S
\\RETURNED POINTING TO THE NEXT CHARACTER BEYOND THE END OF THE
BUFFER.
.INDENT -2
=#4 RETURNED, SAME AS WHEN ^^KIND \\IS RETURNED CONTAINING 3, EXCEPT
THAT ^^KIND \\WAS INPUT GREATER THAN OR EQUAL TO ZERO. ^THE
CHARACTERS, IF ANY, EVALUATED BY THIS CALL TO ^^DAPICK \\WERE THOSE
REMAINING UNPROCESSED AFTER THE PREVIOUS RETURN FROM ^^DAVARY, \\AND
WERE NOT WITHIN AN UNPROCESSED BUFFER JUST READ BY THE CALLING
PROGRAM. ^^KIND \\IS ALSO RETURNED CONTAINING 4, REGARDLESS OF THE
INPUT VALUE OF ^^KIND, \\IF THE INPUT BUFFER CONTAINED THE
CHARACTERS OF A COMMENT INDICATED BY A LEADING AMPERSAND, BUT
CONTAINED NO PRINTING CHARACTERS OTHER THAN POSSIBLE SEMICOLONS TO
THE LEFT OF THE AMPERSAND.
.SKIP
^RETURNED VALUES OF 3 AND 4 FOR ^^KIND \\CAN BE TREATED BY THE
CALLING PROGRAM AS IDENTICAL. ^IF THESE VALUES ARE TREATED AS
DIFFERENT, THE SUGGESTED INTERPRETATION IS THAT ^^KIND=3 \\INDICATES
THAT THE USER DID NOT TYPE ANYTHING ON THE LINE, WHILE ^^KIND=4
\\INDICATES THAT THE CONTENTS OF A NON-EMPTY LINE HAVE BEEN
PROCESSED SO THE USER SHOULD BE ASKED TO TYPE A NEW LINE. ^COMMENTS
INDICATED BY EXCLAMATION POINTS AND BY AMPERSANDS ARE HANDLED
DIFFERENTLY BY THIS ROUTINE ONLY WHEN THEY ARE THE LEFTMOST PRINTING
CHARACTERS (EXCEPT PERHAPS FOR SEMICOLONS) IN THE ENTIRE LINE TYPED
BY THE USER. ^IN THIS CASE, A COMMENT INDICATED BY A LEADING
AMPERSAND RETURNS ^^KIND=4 \\SINCE BY TYPING THE AMPERSAND THE USER
HAS INDICATED THAT HE WISHES TO TYPE ANOTHER LINE.
.INDENT -2
=#5 RETURNED, THE TEXT TYPED BY THE USER MATCHED A NAME IN THE
DICTIONARY, BUT WAS FOLLOWED BY AN INCORRECT NUMBER OF SUBSCRIPT
RANGES.
.INDENT -2
=#6 RETURNED, THE TEXT TYPED BY THE USER MATCHED A NAME IN THE
DICTIONARY AND WAS FOLLOWED BY THE CORRECT NUMBER OF SUBSCRIPTS
RANGES, BUT ONE OR MORE OF THE RANGES EXTENDED OUTSIDE OF THE LIMITS
INDICATED FOR THESE RANGES BY THE DICTIONARY.
.INDENT -2
=#7 RETURNED, THE INPUT BUFFER CONTAINED PRINTING CHARACTERS (OTHER
THAN SEMICOLONS AND/OR THE CHARACTERS OF A COMMENT INDICATED BY A
LEADING EXCLAMATION POINT OR BY A LEADING AMPERSAND), BUT NO MATCH
WITH A NAME IN THE DICTIONARY WAS OBTAINED. ^^LOWBFR \\IS RETURNED
POINTING TO THE FIRST (LEFTMOST) PRINTING CHARACTER WHICH IS NOT A
SEMICOLON.
.INDENT -2
=#8 RETURNED, ^^KIND \\WAS INPUT GREATER THAN ZERO, BUT THE FIRST
PRINTING CHARACTER IN THE BUFFER WAS NOT A SEMICOLON NOR AN
EXCLAMATION POINT NOR AN AMPERSAND. ^THE INITIAL SEMICOLON IS
REQUIRED TO INSURE THAT THE USER REALLY MEANT THAT THE TEXT
REMAINING IN THE INPUT BUFFER AFTER THE COMPLETION OF THE PROCESSING
OF THE PREVIOUSLY SELECTED SIMULATED ARRAY IS TO BE ACTED UPON BY
^^DAPICK.
.SKIP
.LEFT MARGIN 0
T\\HE FOLLOWING ARGUMENTS ARE USED ONLY FOR OUTPUT. ^THEIR INPUT
VALUES ARE IGNORED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LRGLTR#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^LTRSTR
\\ARRAY LOCATION WHICH CONTAINS THE FIRST LETTER OF THE NAME
ASSOCIATED WITH THE LOGICAL GROUP OF NAMES IN THE DICTIONARY WHICH
INCLUDES THE NAME WHICH MATCHED THAT TYPED BY THE USER.
.SKIP
.INDENT -9
^^LRGNUM#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE ^^NUMSTR
\\ARRAY LOCATION WHICH CONTAINS THE FIRST OF THE NUMERIC INFORMATION
ASSOCIATED WITH THE LOGICAL GROUP OF NAMES IN THE DICTIONARY WHICH
INCLUDES THE NAME WHICH MATCHED THAT TYPED BY THE USER.
^^NUMSTR(LRGNUM) \\CONTAINS AS ITS ABSOLUTE VALUE THE NUMBER OF
CHARACTERS STARTING AT ^^LTRSTR(LRGLTR) \\WHICH ARE CONTAINED IN THE
NAME, IF ANY, OF THE LOGICAL GROUP OF NAMES. ^^NUMSTR(LRGNUM+1)
\\CONTAINS THE NUMBER OF LOCATIONS WITHIN A SINGLY SUBSCRIPTED
BUFFER WHICH WOULD BE NEEDED TO STORE THE VALUES OF THE MULTIPLY
SUBSCRIPTED ARRAYS WHICH ARE WITHIN THE LOGICAL GROUP AND
EQUIVALENCED WITH OR OTHERWISE LOADED INTO SUCH A SINGLY SUBSCRIPTED
BUFFER.
.SKIP
.INDENT -9
^^LRGKNT#=#\\SEQUENCE NUMBER WITHIN THE DICTIONARY OF THE LOGICAL
GROUP OF NAMES CONTAINING THE NAME MATCHING THAT TYPED BY THE USER.
^IF THE NAME TYPED BY THE USER IS CONTAINED IN THE THIRD LOGICAL
GROUP IN THE DICTIONARY, THEN ^^LRGKNT \\WOULD BE RETURNED
CONTAINING THE VALUE 3.
.SKIP
.INDENT -9
^^INITAL#=#\\RETURNED CONTAINING THE LOCATION OF THE START OF THE
ARRAY SPECIFIED BY THE USER RELATIVE TO THE SINGLY SUBSCRIPTED
BUFFER CONTAINING THE ARRAYS IN THE LOGICAL GROUP AND WITH WHICH THE
SPECIFIED ARRAY IS EQUIVALENCED. ^IF THE LOGICAL GROUPS REPRESENT
THE CONTENTS OF INDIVIDUAL RECORDS IN A FILE, AND IF ARRAYS
^^ABC(10), DEF(10), GHI(10) \\ETC. ARE CONTAINED IN A PARTICULAR
RECORD, AND IF THE USER TYPED THE ARRAY NAME ^^GHI (\\REGARDLESS OF
WHAT SUBSCRIPTS WITHIN THE RANGE 1 THROUGH 10 HE HAPPENED TO TYPE),
THEN ^^INITAL \\WOULD BE RETURNED WITH THE VALUE 10+10+1 OR 21.
.SKIP
.INDENT -9
^^KOUNT##=#\\SEQUENCE NUMBER OF THE NAME SELECTED BY THE USER WITHIN
THE LOGICAL GROUP OF NAMES CONTAINING IT IN THE DICTIONARY. ^THIS
NUMBER DOES NOT INCLUDE THE NAME, IF ANY, OF THE LOGICAL GROUP
ITSELF. ^IF THE USER TYPES THE NAME OF THE THIRD ARRAY DESCRIBED IN
THE LOGICAL GROUP, THEN ^^KOUNT \\IS RETURNED WITH THE VALUE 3.
.SKIP
.INDENT -9
^^LTRINI#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE LOCATION
WITHIN THE ^^LTRSTR \\ARRAY WHICH CONTAINS THE FIRST LETTER OF THE
NAME MATCHING THAT TYPED BY THE USER.
.SKIP
.INDENT -9
^^NUMINI#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE LOCATION
WITHIN THE ^^NUMSTR \\ARRAY WHICH CONTAINS THE START OF THE NUMERIC
INFORMATION DESCRIBING THE NAME MATCHING THAT TYPED BY THE USER.
^^NUMSTR(NUMINI) \\CONTAINS THE NUMBER OF CHARACTERS IN THE NAME,
^^NUMSTR(NUMINI+1) \\THE INDICATION OF THE ASSOCIATED DATA TYPE (-1
FOR OCTAL INTEGER, 0 FOR DECIMAL INTEGER, AND +1 FOR REAL), AND
^^NUMSTR(NUMINI+2) \\THE NUMBER OF SUBSCRIPT RANGES ALLOWED (AND
REQUIRED).
.SKIP
.INDENT -9
^^KNTSUB#=#\\RETURNED CONTAINING THE NUMBER OF SUBSCRIPTS RANGES
FOUND.
.SKIP
.INDENT -9
^^INISUB#=#\\ARRAY RETURNED CONTAINING THE STARTING VALUES OF THE
SUBSCRIPT RANGES TYPED BY THE USER. ^THE START OF THE FIRST
SUBSCRIPT RANGE TYPED BY THE USER IS RETURNED IN ^^INISUB(1) \\AND
OF THE FINAL IN ^^INISUB(KNTSUB).
.SKIP
.INDENT -9
LMTSUB#=#\\ARRAY RETURNED CONTAINING THE ENDING VALUES OF THE
SUBSCRIPT RANGES TYPED BY THE USER. ^THE END OF THE FIRST SUBSCRIPT
RANGE TYPED BY THE USER IS RETURNED IN ^^LMTSUB(1) \\AND OF THE
FINAL IN ^^LMTSUB(KNTSUB).
.LEFT MARGIN 0
.SKIP 3
.TEST PAGE 6
.LEFT MARGIN 0
.CENTER
A\N E\\XAMPLE OF THE ^USE OF ^^DAPICK
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE SAMPLE PROGRAM LISTED ON THE FOLLOWING PAGES READS A LINE OF
TEXT FROM THE USER'S TERMINAL, THEN COMPARES THE CONTENTS OF THE
LINE WITH A DICTIONARY WHICH IS DEFINED BY ^^DATA \\STATEMENTS AT
THE START OF THE PROGRAM, BUT WHICH COULD HAVE BEEN CONSTRUCTED
INSTEAD BY HAVING ^^DALOAD \\READ THE ^^COMMON \\STATEMENTS LISTED
AS COMMENT CARDS AT THE START OF THE PROGRAM. ^THE PROGRAM
SUMMARIZES THE EVALUATION BEFORE ASKING FOR THE NEXT ARRAY NAME
SPECIFICATION.
.SKIP
^A SAMPLE DIALOG BETWEEN THE PROGRAM AND USER IS PRESENTED FOLLOWING
THE LISTING OF THE PROGRAM.
.SKIP
^TO DEMONSTRATE THAT NEITHER THE INPUT TEXT NOR THE DICTIONARY NEED
TO START AT THE BEGINNING OF THE RESPECTIVE ARRAYS, ALL OF THESE
ARRAYS CONTAIN NONSENSE VALUES AHEAD OF THE VALID INFORMATION.
.PAGE
.NOFILL
^^C     PROGRAM TO DEMONSTRATE DAPICK ROUTINE
C
C     FOLLOWING DATA STATEMENTS SIMULATE DICTIONARY WHICH
C     DALOAD WOULD CONSTRUCT IF IT READ FOLLOWING AS DATA
C
C     COMMON/FIRST/A(10,10),BC(10,10),DEF(10,10)
C     COMMON/SECOND/GHI(10),JKL,MNO(10),PQR(1)
C     COMMON/THIRD/STU(10,10),VW(10,10/1),X(10/1,10/1)
C
      DIMENSION NUMSTR(72),LTRSTR(46),IBUFFR(60),JBUFFR(6),
     1KBUFFR(6),INISUB(7),LMTSUB(7)
C
      DATA NUMSTR/
     1100,100,100,
     2 -5,300,  0,
     3  1,  1,  2,  1, 10,  1, 10,
     4  2,  1,  2,  1, 10,  1, 10,
     5  3,  1,  2,  1, 10,  1, 10,
     6 -6, 22,  0,
     7  3,  1,  1,  1, 10,
     8  3,  0,  0,
     9  3,  0,  1,  1, 10,
     1  3,  1,  1,  1,  1,
     2 -5,300,  0,
     3  3,  1,  2,  1, 10,  1, 10,
     4  2,  1,  2,  1, 10, 10,  1,
     5  1,  1,  2, 10,  1, 10,  1/
C
      DATA LTRSTR/
     11H*,1H*,1H*,1H*,1H*,1H*,
     21HF,1HI,1HR,1HS,1HT,
     31HA,1HB,1HC,1HD,1HE,1HF,
     41HS,1HE,1HC,1HO,1HN,1HD,
     51HG,1HH,1HI,1HJ,1HK,1HL,1HM,1HN,1HO,1HP,1HQ,1HR,
     61HT,1HH,1HI,1HR,1HD,
     71HS,1HT,1HU,1HV,1HW,1HX/
C
      DATA NUMLOW,NUMUSD,LTRLOW,LTRUSD,MAXBFR,MAXSUB,ITTY/
     14,72,7,46,60,7,5/
      DATA ISPACE/1H /
C
C     READ USER TYPED ARRAY SPECIFICATION
    1 WRITE(ITTY,2)
    2 FORMAT(' **********'/' ARRAY NAME:'$)
      LOWBFR=11
      KIND=-1
      READ(ITTY,3)(IBUFFR(I),I=LOWBFR,MAXBFR)
    3 FORMAT(60A1)
C
C     EVALUATE USER SUPPLIED TEXT
    4 LAST=KIND
      CALL  DAPICK  (MAXBFR,IBUFFR,LTRLOW,LTRUSD,LTRSTR,
     1 NUMLOW,NUMUSD,NUMSTR,MAXSUB,LOWBFR,KIND  ,LRGLTR,
     2 LRGNUM,LRGKNT,INITAL,KOUNT ,LTRINI,NUMINI,KNTSUB,
     3 INISUB,LMTSUB)
C
C     DETERMINE UNPROCESSED TEXT IF ANY
      LIMIT=MAXBFR
      GO TO 6
    5 LIMIT=LIMIT-1
    6 IF(LIMIT.LT.LOWBFR)GO TO 7
      IF(IBUFFR(LIMIT).EQ.ISPACE)GO TO 5
C
C     REPORT TYPE OF INFORMATION FOUND
    7 IF((LAST.GT.0).AND.(KIND.NE.4))WRITE(ITTY,8)
    8 FORMAT(' ')
      GO TO(21,9,11,1,13,15,17,19),KIND
    9 WRITE(ITTY,10)
   10 FORMAT(' EQUALS SIGN FOLLOWS NAME')
      GO TO 21
   11 WRITE(ITTY,12)
   12 FORMAT(' EMPTY')
      GO TO 1
   13 WRITE(ITTY,14)
   14 FORMAT(' WRONG NUMBER OF SUBSCRIPTS')
      GO TO 21
   15 WRITE(ITTY,16)
   16 FORMAT(' SUBSCRIPTS OUT OF RANGE')
      GO TO 21
   17 WRITE(ITTY,18)(IBUFFR(I),I=LOWBFR,LIMIT)
   18 FORMAT(' NO MATCH FOUND WITH ',60A1)
      GO TO 1
   19 WRITE(ITTY,20)(IBUFFR(I),I=LOWBFR,LIMIT)
   20 FORMAT(' SEMICOLON REQUIRED BEFORE ',60A1)
      GO TO 1
C
C     REPORT ARRAY NAME, SUBSCRIPTS AND LOCATION IN BUFFER
   21 IF(KNTSUB.GT.0)WRITE(ITTY,22)(INISUB(I),LMTSUB(I),
     1I=1,KNTSUB)
   22 FORMAT(' SUBSCRIPTS FOUND',7(I3,1H/,I3,1H,))
      J=LTRINI+NUMSTR(NUMINI)-1
      K=LRGLTR-NUMSTR(LRGNUM)-1
      DO 23 I=1,6
      JBUFFR(I)=ISPACE
      IF(LTRINI.LE.J)JBUFFR(I)=LTRSTR(LTRINI)
      KBUFFR(I)=ISPACE
      IF(LRGLTR.LE.K)KBUFFR(I)=LTRSTR(LRGLTR)
      LRGLTR=LRGLTR+1
   23 LTRINI=LTRINI+1
      WRITE(ITTY,24)LRGKNT,KBUFFR,INITAL,KOUNT,JBUFFR
   24 FORMAT(' GROUP',I2,' NAMED ',6A1,' LOCATION',I4,
     1' STARTS ARRAY',I2,' NAMED ',6A1)
      GO TO 4
      END
.PAGE
.CENTER
T\\YPICAL ^DIALOG ^BETWEEN ^^DAPICK D\\EMONSTRATION ^PROGRAM AND ^USER
.CENTER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
**********
^^ARRAY NAME:DEF(4,);DEF(,7);DEF(4,7)!A COMMENT
.SKIP
SUBSCRIPTS FOUND  4/  4,  1/ 10,
GROUP 1 NAMED FIRST  LOCATION 201 STARTS ARRAY 3 NAMED DEF
.SKIP
SUBSCRIPTS FOUND  1/ 10,  7/  7,
GROUP 1 NAMED FIRST  LOCATION 201 STARTS ARRAY 3 NAMED DEF
.SKIP
SUBSCRIPTS FOUND  4/  4,  7/  7,
GROUP 1 NAMED FIRST  LOCATION 201 STARTS ARRAY 3 NAMED DEF
**********
ARRAY NAME:DEF(1/2,3/4,5/6,7/8);DEF(4,12)DEF
.SKIP
WRONG NUMBER OF SUBSCRIPTS
SUBSCRIPTS FOUND  1/  2,  3/  4,  5/  6,  7/  8,
GROUP 1 NAMED FIRST  LOCATION 201 STARTS ARRAY 3 NAMED DEF
.SKIP
SUBSCRIPTS OUT OF RANGE
SUBSCRIPTS FOUND  4/  4, 12/ 12,
GROUP 1 NAMED FIRST  LOCATION 201 STARTS ARRAY 3 NAMED DEF
.SKIP
SEMICOLON REQUIRED BEFORE DEF
**********
ARRAY NAME:X(,);X(3/,);X(,/7);X(3/,/7);X(6/9,2/4);X(9/6,4/2)
.SKIP
SUBSCRIPTS FOUND 10/  1, 10/  1,
GROUP 3 NAMED THIRD  LOCATION 201 STARTS ARRAY 3 NAMED X
.SKIP
SUBSCRIPTS FOUND  3/  1, 10/  1,
GROUP 3 NAMED THIRD  LOCATION 201 STARTS ARRAY 3 NAMED X
.SKIP
SUBSCRIPTS FOUND 10/  1, 10/  7,
GROUP 3 NAMED THIRD  LOCATION 201 STARTS ARRAY 3 NAMED X
.SKIP
SUBSCRIPTS FOUND  3/  1, 10/  7,
GROUP 3 NAMED THIRD  LOCATION 201 STARTS ARRAY 3 NAMED X
.SKIP
SUBSCRIPTS FOUND  6/  9,  2/  4,
GROUP 3 NAMED THIRD  LOCATION 201 STARTS ARRAY 3 NAMED X
.SKIP
SUBSCRIPTS FOUND  9/  6,  4/  2,
GROUP 3 NAMED THIRD  LOCATION 201 STARTS ARRAY 3 NAMED X
**********
ARRAY NAME:UNKNOWN
.SKIP
NO MATCH FOUND WITH UNKNOWN
**********
ARRAY NAME: ;;;!SEMICOLONS AND A COMMENT
.SKIP
EMPTY
.PAGE
**********
ARRAY NAME:STU;STU();STU(,);STU(,)=
.SKIP
WRONG NUMBER OF SUBSCRIPTS
GROUP 3 NAMED THIRD  LOCATION   1 STARTS ARRAY 1 NAMED STU
.SKIP
WRONG NUMBER OF SUBSCRIPTS
SUBSCRIPTS FOUND  1/ 10,
GROUP 3 NAMED THIRD  LOCATION   1 STARTS ARRAY 1 NAMED STU
.SKIP
SUBSCRIPTS FOUND  1/ 10,  1/ 10,
GROUP 3 NAMED THIRD  LOCATION   1 STARTS ARRAY 1 NAMED STU
.SKIP
EQUALS SIGN FOLLOWS NAME
SUBSCRIPTS FOUND  1/ 10,  1/ 10,
GROUP 3 NAMED THIRD  LOCATION   1 STARTS ARRAY 1 NAMED STU
**********
ARRAY NAME:JKL;JKL=;JKL(1);JKL(1)=!A COMMENT
.SKIP
SUBSCRIPTS FOUND  1/  1,
GROUP 2 NAMED SECOND LOCATION  11 STARTS ARRAY 2 NAMED JKL
.SKIP
EQUALS SIGN FOLLOWS NAME
SUBSCRIPTS FOUND  1/  1,
GROUP 2 NAMED SECOND LOCATION  11 STARTS ARRAY 2 NAMED JKL
.SKIP
SUBSCRIPTS FOUND  1/  1,
GROUP 2 NAMED SECOND LOCATION  11 STARTS ARRAY 2 NAMED JKL
.SKIP
EQUALS SIGN FOLLOWS NAME
SUBSCRIPTS FOUND  1/  1,
GROUP 2 NAMED SECOND LOCATION  11 STARTS ARRAY 2 NAMED JKL
**********
ARRAY NAME:PQR;PQR=;PQR(1);PQR(1)=PQR
.SKIP
SUBSCRIPTS FOUND  1/  1,
GROUP 2 NAMED SECOND LOCATION  22 STARTS ARRAY 4 NAMED PQR
.SKIP
EQUALS SIGN FOLLOWS NAME
SUBSCRIPTS FOUND  1/  1,
GROUP 2 NAMED SECOND LOCATION  22 STARTS ARRAY 4 NAMED PQR
.SKIP
SUBSCRIPTS FOUND  1/  1,
GROUP 2 NAMED SECOND LOCATION  22 STARTS ARRAY 4 NAMED PQR
.SKIP
EQUALS SIGN FOLLOWS NAME
SUBSCRIPTS FOUND  1/  1,
GROUP 2 NAMED SECOND LOCATION  22 STARTS ARRAY 4 NAMED PQR
.SKIP
SEMICOLON REQUIRED BEFORE PQR
.SUBTITLE ^^DAPLAT, S\\CATTER ^PLOT ^ROUTINE FOR ^PRINTER
.PAGE
.NOFILL
^^DDDDD          AAA  PPPPPP    LL              AAA  TTTTTTTT
DD   DD       AAAA  PP    PP  LL             AAAA     TT
DD    DD     AA AA  PP    PP  LL            AA AA     TT
DD    DD    AA  AA  PPPPPP    LL           AA  AA     TT
DD    DD   AAAAAAA  PP        LL          AAAAAAA     TT
DD   DD   AA    AA  PP        LL         AA    AA     TT
DDDDD    AA     AA  PP        LLLLLLLL  AA     AA     TT
.FILL
.LEFT MARGIN 0
.RIGHT MARGIN 60
.SKIP
.CENTER
DAPLAT, S\\CATTER ^PLOT ^ROUTINE FOR ^PRINTER
.CENTER
------- ------- ---- ------- --- -------
.SKIP
^^DAPLAT \\IS A ^^FORTRAN \\SUBROUTINE WHICH CONSTRUCTS PRINTABLE
PLOTS HAVING PROPORTIONS WHICH ARE SELECTED BY THE CALLING PROGRAM.
^EACH PLOT CAN CONTAIN ONE OR MORE CURVES AND EACH CURVE CAN BE
REPRESENTED BY ITS OWN ALPHABETIC LETTER. ^POINTS ON A CURVE CAN
OPTIONALLY BE CONNECTED EITHER BY ASTERISKS OR BY SOME ALPHABETIC
LETTER WHICH NEED NOT BE THE SAME AS THAT USED TO REPRESENT THE
POINTS THEMSELVES. ^IF PLOTTING POINTS NOT CONNECTED BY LINES, A PIN
MAP CAN BE SIMULATED BY USING THE CLOSEST EMPTY LOCATION IF THE
LOCATION REPRESENTING THE POINT IS ALREADY IN USE.
.SKIP
^THE PLOT CAN BE RULED WITH GRID LINES AT EVENLY SPACED INTERVALS
ACROSS THE WIDTH AND HEIGHT OF THE PLOT. ^NUMBERS PRINTED ALONGSIDE
THE PLOT ARE REPRESENTED WITH 5 SIGNIFICANT DIGITS, BUT WITH
SUPPRESSION OF RIGHTMOST ZEROES BEYOND THE DECIMAL POINT. ^IF THE
NUMBER CANNOT BE PRINTED IN FLOATING POINT FORM, THE NUMBER IS
REPRESENTED IN SCIENTIFIC NOTATION INSTEAD.
.SKIP
^IF TWO OR MORE DIFFERENT ALPHABETIC LETTERS ARE TO APPEAR IN THE
SAME LOCATION IN THE PRINTED PLOT, AN AMPERSAND WILL APPEAR INSTEAD.
^HOWEVER, IF THE LINE SEGMENTS CONNECTING POINTS ARE TO BE FORMED
FROM A DIFFERENT LETTER THAN THE LETTER REPRESENTING THE POINTS
THEMSELVES, THEN BOTH OF THESE LETTERS, WHERE USED FOR PREVIOUS
CURVES OR WHERE USED ELSEWHERE ON THE CURRENT CURVE, ARE NOT CHANGED
TO AMPERSANDS BY COINCIDENCE WITH THE PRESENT CURVE. ^POINTS AND
LINES WHICH ARE FORMED FROM ASTERISKS CAN BE SELECTED EITHER TO BE
SUPERSEDED BY (BE DOMINATED BY) ANY OTHER CHARACTERS, OR ELSE TO
SUPERSEDE (BE DOMINANT OVER) ANY OTHER CHARACTERS. ^THE CHARACTER
SET AND DOMINANCE RULES CAN BE CHANGED BY THE CALLING PROGRAM IF
NECESSARY.
.SKIP
^WHEN LINE SEGMENTS ARE FORMED FROM DIFFERENT LETTERS THAN ARE USED
TO REPRESENT POINTS, AND WHEN THESE LETTERS VARY FROM ONE CURVE TO
THE NEXT, THEN THE ORDER IN WHICH OVERLAPPING CURVES ARE SPECIFIED
CAN CHANGE WHICH LOCATIONS OF THE PLOT CONTAIN AMPERSANDS. ^FOR
EXAMPLE, IF WE SUPERIMPOSE THE HORIZONTAL AND VERTICAL LINE PATTERNS
SHOWN BELOW (ASSUMING THAT THE ASTERISKS ARE DOMINATED BY ALL OTHER
CHARACTERS)
.SKIP
.NOFILL
.TEST PAGE 14
     HORIZONTAL LINE PATTERN         VERTICAL LINE PATTERN
   10 -^^EDDDDDDDDDDDDDDDDDDDE     10 -B---C---D-+-E---*---A
       !                   !         A   B   C   D   *   *
       DCCCCCCCCCCCCCCCCCCCD         A   B   C   D   *   *
       !                   !         A   B   C   D   *   *
       CBBBBBBBBBBBBBBBBBBBC         A   B   C   D   *   *
    5 -+         +         +      5 -A   B   C + D   *   *
       BAAAAAAAAAAAAAAAAAAAB         A   B   C   D   *   *
       !                   !         A   B   C   D   *   *
       A*******************A         A   B   C   D   *   *
       !                   !         A   B   C   D   *   *
    0 -*********************      0 -B---C---D-+-E---*---A
       !         !         !         !         !         !
       0         5        10         0         5        10
.SKIP
.FILL
\\THEN WE GET THE 2 PLOTS SHOWN BELOW DEPENDING UPON WHETHER THE
HORIZONTAL OR VERTICAL LINES ARE SPECIFIED FIRST.
.SKIP
.NOFILL
.TEST PAGE 14
      HORIZONTAL LINES FIRST          VERTICAL LINES FIRST
   10 -_&^^DDD_&DDDDDDDEDDDDDDD_&     10 -_&DDD_&DDDDDDDEDDDDDDD_&
       A   B   C   D   *   *         A   B   C   D   *   *
       _&CCCCCCCCCCC_&CCCCCCCD         _&CCC_&CCCCCCCDCCCCCCCD
       A   B   C   D   *   *         A   B   C   D   *   *
       _&BBBBBBB_&BBB_&BBBBBBBC         _&BBBBBBBCBBB_&BBBBBBBC
    5 -A   B   C + D   *   *      5 -A   B   C + D   *   *
       BAAA_&AAA_&AAA_&AAAAAAAB         BAAABAAA_&AAA_&AAAAAAAB
       A   B   C   D   *   *         A   B   C   D   *   *
       A***B***C***D*******A         A***B***C***D*******A
       A   B   C   D   *   *         A   B   C   D   *   *
    0 -B***C***D***E*******A      0 -B***C***D***E*******A
       !         !         !         !         !         !
       0         5        10         0         5        10
.SKIP
.FILL
T\\HE IMPORTANT DIFFERENCES BETWEEN THE ABOVE 2 PLOTS ARE AT ^X=2,
^Y=8 AND AT ^^X=4, Y=6. T\\HE CHOICE OF WHETHER OR NOT TO PLACE AN
AMPERSAND AT A PARTICULAR LOCATION ALONG THE REPRESENTATION OF A
CURVE MUST BE MADE BY COMPARING THE 2 LETTERS BEING USED FOR THE
CURVE WITH THE LETTER IF ANY ALREADY OCCUPYING THAT LOCATION. ^IN
THE LEFT PLOT ABOVE, THE HORIZONTAL LINE SEGMENT FORMED OF ^B'S WAS
SPECIFIED BEFORE THE VERTICAL LINE OF ^C'S. ^WHEN THE POINT OF
INTERSECTION WAS REACHED, THE ^B ALREADY ON THE PLOT WAS NOT FOUND
TO MATCH EITHER THE ^D'S BEING USED FOR THE CURRENT POINTS OR THE
^C'S BEING USED FOR THE CONNECTING LINE SEGMENTS SO THE ^B WAS
CHANGED TO AN AMPERSAND. ^IN THE RIGHT PLOT ABOVE, THE VERTICAL LINE
OF ^C'S WAS SPECIFIED BEFORE THE HORIZONTAL LINE OF ^B'S. ^WHEN THE
INTERSECTION WAS REACHED, THE ^C ALREADY ON THE PLOT WAS FOUND TO
MATCH ONE OF THE LETTERS ^B AND ^C BEING USED TO REPRESENT THE
CURRENT CURVE. ^SINCE A LINE SEGMENT RATHER THAN A POINT WAS BEING
CONSTRUCTED AT THE INTERSECTION, THE MATCHING CHARACTER ALREADY ON
THE PLOT WAS LEFT UNCHANGED. ^IF A POINT WAS BEING CONSTRUCTED AT
THE INTERSECTION INSTEAD OF A LINE SEGMENT, THEN THE CHARACTER ON
THE PLOT WOULD HAVE BEEN CHANGED TO THE CHARACTER BEING USED TO
REPRESENT THE POINT.
.SKIP 2
.TEST PAGE 5
.CENTER
^THE ^^DAPLAT A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DAPLAT \I\S
.SKIP
.NOFILL
      SUBROUTINE DAPLAT( IPLOT,MAXWID,MAXHIH,LETTER,KONECT,
     1    XPOINT,YPOINT,MINSUB,MAXSUB, XLEFT,YLOWER,XRIGHT,
     2    YUPPER, IGRID, IEDGE,MARGIN,MSHWID,MSHHIH,LTROFF,
     3    LINOFF,LINPRT, IDISK,IRESET,LTRERR,LINERR)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION XPOINT(MAXSUB),YPOINT(MAXSUB)
.FILL
.SKIP 2
.CENTER
A\\RGUMENTS ^USED TO ^INPUT ^VALUES TO ^^DAPLAT
.CENTER
--------- ---- -- ----- ------ -- ------
.SKIP
T\\HE FOLLOWING INPUT ARGUMENTS ARE USED BY EACH CALL TO ^^DAPLAT
\\WHETHER OR NOT A PLOT IS GENERATED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IPLOT##=#-1, \\ADD THE POINTS AND/OR LINES REPRESENTED BY THE
COORDINATES IN THE ^^XPOINT \\AND ^^YPOINT \\ARRAYS TO THE PLOT
STORAGE, THEN RETURN TO THE CALLING PROGRAM WITHOUT GENERATING THE
PLOT. ^ADDITIONAL ^^DAPLAT \\CALLS WILL BE EXECUTED BEFORE THE PLOT
IS TO BE PRINTED.
.INDENT -2
=#0, ADD THE POINTS AND/OR LINES IN THE ^^XPOINT \\AND ^^YPOINT
\\ARRAYS TO THE PLOT STORAGE, THEN GENERATE THE PLOT AND CLEAR THE
PLOT STORAGE AFTER THE PLOT IS GENERATED. ^ADDITIONAL CALLS TO
^^DAPLAT, \\IF ANY, WILL STORE UPON A BLANK PLOT SURFACE.
.INDENT -2
=#1, ADD THE POINTS AND/OR LINES IN THE ^^XPOINT \\AND ^^YPOINT
\\ARRAYS TO THE PLOT STORAGE, THEN GENERATE THE PLOT BUT DO NOT
CLEAR THE PLOT STORAGE AFTER THE PLOT IS GENERATED. ^THE CURRENTLY
STORED PLOT WILL BE ADDED TO BY ADDITIONAL CALLS TO ^^DAPLAT.
.SKIP
.INDENT -9
MAXWID#=#\\WIDTH OF THE PLOT STATED AS THE NUMBER OF COLUMNS OF
CHARACTERS FORMING THE PLOTTING AREA UPON WHICH DATA CAN BE PLOTTED.
^^MAXWID \\IS NORMALLY 1 PLUS A MULTIPLE OF ^^MSHWID. T\H\E
\\RECOMMENDED MAXIMUM VALUE OF ^^MAXWID \I\S 101. I\\T SHOULD BE
NOTED THAT THE PLOT USUALLY HAS AN ADDITIONAL MARGIN OF 12
CHARACTERS ALONG THE LEFT SIDE IN WHICH SCALE NUMBERS AND THE
CARRIAGE CONTROL CHARACTER ARE PRINTED, AND AN ADDITIONAL 4
CHARACTERS CAN APPEAR TO THE RIGHT OF THE PLOT IN THE LOWER-RIGHT
SCALE NUMBER. ^IF THE OUTPUT IS BEING WRITTEN TO A TERMINAL SO THAT
THE CHARACTER IN COLUMN 1 IS INTERPRETED AS A CARRIAGE CONTROL, AND
IF WRAPAROUND AT THE RIGHT MARGIN OF THE PORTION OF THE RIGHTMOST
SCALE NUMBER EXTENDING BEYOND THE RIGHT EDGE OF THE PLOT IS
ACCEPTABLE, THEN ^^MAXWID \\CAN BE SET TO 61 ON TERMINALS WHICH CAN
DISPLAY 72 CHARACTERS PER LINE, AND CAN BE SET TO 121 ON TERMINALS
WHICH CAN DISPLAY 132 CHARACTERS PER LINE. ^THE LARGEST ACCEPTED
VALUE OF ^^MAXWID \\IS 131, WHICH CAN LEAD TO A LOWER SCALE 147
CHARACTERS WIDE WHICH IS TOO LARGE TO OUTPUT ON MOST LINE-PRINTERS.
^IF THE VALUE OF ^^IEDGE \\TURNS OFF BOTH LEFT SCALE NUMBERS AND
LOWER SCALE NUMBERS (THIS OPTION IS DESCRIBED AFTER THE SAMPLE
PROGRAM, NOT IN THE ORDINARY ARGUMENT DESCRIPTIONS) THEN ONLY THE
CARRIAGE CONTROL CHARACTER, EITHER A SPACE OR AN ASTERISK DEPENDING
UPON THE VALUE OF ^^LINPRT, \\WILL APPEAR TO THE LEFT OF THE PLOT
(PROVIDING THAT THE VALUE OF ^^MARGIN \\DOES NOT ALSO REQUEST
ADDITIONAL SPACES) SO THE MAXIMUM WIDTH OF A PRINTED LINE WOULD THEN
BE MERELY ^^MAXWID+MARGIN+1.
.INDENT -2
=#0, \\USE THE LAST NONZERO VALUE SPECIFIED FOR ^^MAXWID \\AS THE
WIDTH OF THE PLOT, OR USE THE VALUE 101 IF A NONZERO VALUE OF
^^MAXWID \\HAS NOT BEEN SPECIFIED.
.SKIP
.INDENT -9
^^MAXHIH#=#\\HEIGHT OF THE PLOT STATED AS THE NUMBER OF LINES
FORMING THE PLOTTING AREA UPON WHICH DATA CAN BE PLOTTED. ^NORMALLY
^^MAXHIH \\WOULD BE 1 PLUS A MULTIPLE OF ^^MSHHIH. T\\HE PLOT HAS AN
ADDITIONAL LOWER MARGIN OF 2 LINES (OR 3 LINES IF THE NUMBERS BELOW
THE LOWER SCALE ARE IN SCIENTIFIC NOTATION).
.INDENT -2
=#0, USE THE LAST NONZERO VALUE SPECIFIED FOR ^^MAXHIH \\AS THE
HEIGHT OF THE PLOT, OR USE THE VALUE 51 IF A NONZERO VALUE OF
^^MAXHIH \\HAS NOT BEEN SPECIFIED.
.SKIP
.INDENT -9
^^LETTER#=#0, \\PLOT THE POINTS HAVING COORDINATES IN THE ^^XPOINT
\\AND ^^YPOINT \\ARRAYS WITH NONDOMINANT ASTERISKS. ^IF ONE (OR
MORE) OF THESE POINTS IS TO APPEAR AT THE SAME LOCATION ON THE PLOT
AS SOME OTHER POINT OR PORTION OF A LINE SEGMENT WHICH IS
REPRESENTED BY AN ALPHABETIC CHARACTER OR BY AN AMPERSAND, THEN THE
OTHER POINT OR PORTION OF A LINE SEGMENT IS SHOWN INSTEAD OF THE
CURRENT POINT.
.INDENT -2
=#WITHIN THE RANGE 1 THROUGH 26, ^^LETTER \\IS THE SERIAL NUMBER
WITHIN THE ALPHABET OF THE LETTER USED TO PLOT THE POINTS HAVING
COORDINATES IN THE ^^XPOINT \\AND ^^YPOINT \\ARRAYS. ^^LETTER=3
\\WOULD CAUSE THE PLOTTED POINTS TO BE REPRESENTED WITH ^C'S.
.INDENT -2
=#27 (OR GREATER), PLOT THE POINTS HAVING COORDINATES IN THE
^^XPOINT \\AND ^^YPOINT \\ARRAYS WITH DOMINANT ASTERISKS. ^IF ONE
(OR MORE) OF THESE POINTS IS TO APPEAR AT THE SAME LOCATION ON THE
PLOT AS SOME OTHER POINT OR PORTION OF A LINE SEGMENT WHICH IS
REPRESENTED BY AN ALPHABETIC CHARACTER OR BY AN AMPERSAND, THEN THE
CURRENT POINT IS SHOWN INSTEAD OF THE OTHER POINT OR PORTION OF A
LINE SEGMENT.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KONECT#=#\\LESS THAN -1, SIMULATE A PIN MAP. ^STORE THE POINTS
HAVING COORDINATES IN THE ^^XPOINT \\AND ^^YPOINT \\ARRAYS FOR
PLOTTING (EITHER BY THE CURRENT CALL TO ^^DAPLAT \I\F IPLOT \I\S
\\GREATER THAN OR EQUAL TO ZERO OR BY A SUBSEQUENT CALL TO ^^DAPLAT
\I\F IPLOT \\IS NOT EQUAL TO ZERO). ^IF ^^LETTER \\IS GREATER THAN
ZERO, AND IF THE LOCATION REPRESENTING THE POINT ALREADY CONTAINS A
PRINTING CHARACTER OTHER THAN A NONDOMINANT ASTERISK (SELECTED
EITHER BY ^^LETTER=0 \\OR BY ^^KONECT=0), \\THEN SEARCH FOR THE
CLOSEST LOCATION WHICH IS EMPTY OR WHICH CONTAINS A NONDOMINANT
ASTERISK. ^IF ^^LETTER \\IS ZERO AND IF THE LOCATION REPRESENTING
THE POINT ALREADY CONTAINS ANY PRINTING CHARACTER, THEN SEARCH FOR
THE CLOSEST LOCATION WHICH CONTAINS A SPACE. ^IF, AFTER HAVING
SEARCHED A NUMBER OF CONCENTRIC BOXES EQUAL TO THE ABSOLUTE VALUE OF
^^KONECT, \\NO AVAILABLE LOCATION HAS YET BEEN FOUND, THEN ABANDON
THE ATTEMPT. ^NOTE THAT IF SEVERAL POINTS COINCIDE, IT IS MUCH MORE
EFFICIENT TO HAVE THEM ADJACENT IN THE ^^XPOINT \\AND ^^YPOINT
\\ARRAYS IF THE PIN MAP OPTION IS USED SINCE THEN THE LOCATIONS
ALREADY FOUND TO BE IN USE DO NOT HAVE TO BE SEARCHED AGAIN FOR EACH
SUBSEQUENT POINT. ^THE FOLLOWING ARE EXAMPLES OF THE SIZES OF PIN
GROUPS POSSIBLE FOR VARIOUS VALUES OF ^^KONECT.
.SKIP
.NOFILL
.LEFT MARGIN 14
.TEST PAGE 11
KONECT=-2  KONECT=-3  KONECT=-4  KONECT=-5
.SKIP
                                 555555555
                       4444444   544444445
             33333     4333334   543333345
   222       32223     4322234   543222345
   212       32123     4321234   543212345
   222       32223     4322234   543222345
             33333     4333334   543333345
                       4444444   544444445
                                 555555555
.FILL
.SKIP
.LEFT MARGIN 9
T\\HE PLOT SHOWN BELOW IS TYPICAL OF A PIN MAP SIMULATION. ^THE 7
APPEARANCES OF THE LETTER ^A WERE PLOTTED FIRST, THEN THE LETTER ^B
WAS REQUESTED TO BE PLOTTED AT THE SAME LOCATIONS AS THE ^A'S, AND
SO ON THROUGH THE LETTER ^^Y. KONECT \\HAD THE VALUE -4 BUT THE
SEARCH PATTERNS DID NOT FILL THE ALLOWED 4 BOXES. ^THE RECTANGLE
DRAWN WITH ASTERISKS WAS PLOTTED IN CURVE MODE WITH BOTH ^^LETTER
\\AND ^^KONECT \\BEING ZERO. ^THE RECTANGLE COULD HAVE BEEN PLOTTED
EITHER BEFORE OR AFTER THE POINTS OF THE PIN MAP SINCE NONDOMINANT
ASTERISKS ARE CONSIDERED TO BE THE SAME AS SPACES WHEN A PIN MAP IS
SIMULATED, AND SINCE NONDOMINANT ASTERISKS CANNOT SUPERSEDE A LETTER
ALREADY IN THE PLOT. ^IN A REAL APPLICATION, SUCH LINES OF ASTERISKS
COULD BE USED TO REPRESENT A GEOGRAPHICAL BOUNDARY OR A NETWORK OF
STREETS AND ROADS.
.SKIP
.TEST PAGE 18
.NOFILL
        15 -+---------+---------+---------+
            !    ^^UTSRQ          TSRQPY    !
            !   *VGFEP**********UGFEOX    !
            !UTSRQHADO          VHADNTSRQ !
            !VGFEPIBCN        RQPIBCMGFEP !
        10 -+WHADOJKLM+       SGFEJKLHADO +
            !XIBCNWXY         THADOWUIBCN !
            !YJKLM            UIBCN VJKLM !
            !   *             VJKLM WXY   !
            !   *             WXY   *     !
         5 -+ UTSRQ   +UTSRQ    +   *     +
            ! VGFEP    VGFEP        *     !
            ! WHADO****WHADO*********     !
            ! XIBCN    XIBCN              !
            ! YJKLM    YJKLM              !
         0 -+---------+---------+---------+
            !         !         !         !
            0        10        20        30
.SKIP
.FILL
M\\ANY OF THE POINTS IN THE 3 PIN GROUPS IN THE UPPER RIGHT CORNER
OF THE ABOVE PLOT HAVE BEEN SHIFTED FURTHER OUT IN THE SEARCH
PATTERNS DUE TO THEIR INTENDED DESTINATIONS BEING ALREADY IN USE.
^THIS CAN BE VERIFIED BY TRACING THE SPIRAL BUT BROKEN PATHS ALONG
WHICH THE LETTERS ^A THROUGH ^Y HAVE BEEN POSITIONED. ^THE 2 PIN
GROUPS IN THE UPPER LEFT CORNER HAVE SIMILARLY SPREAD SLIGHTLY DUE
TO OVERLAP OF THE SEARCH PATTERNS.
.SKIP
^SOME DISTORTION CANNOT BE AVOIDED WHEN A PIN MAP IS SIMULATED BY
^^DAPLAT. T\\HE CONCENTRIC BOXES OF CHARACTERS DO NOT PRINT AS
SQUARES DUE TO THE DIFFERING NUMBERS OF ROWS AND COLUMNS PER INCH.
^ALSO, THE PIN MAP SIMULATION DOES NOT PROVIDE A TRUE WINDOW (THAT
IS, THE PORTION DISPLAYED IS NOT NECESSARILY THE SAME AS IF
DISPLAYED ON A PLOT SHOWING A LARGER AREA) SINCE POINTS WHICH ARE
OUTSIDE THE PLOT ARE NOT REPRESENTED EVEN IF A SEARCH PATTERN
CENTERED AT THEM WOULD SPILL OVER ONTO THE PLOT, WHILE POINTS AT THE
BORDERS MUST BE SHOWN WITHIN THE PLOT SINCE THE SEARCH PATTERN DOES
NOT INCLUDE THE AREA OUTSIDE THE PLOT.
.SKIP
^THE PLOT SHOWN BELOW DEMONSTRATES THESE EDGE DISTORTIONS. ^THIS
PLOT WAS GENERATED BY PLOTTING THE SAME POINTS AS IN THE PIN MAP
SHOWN EARLIER, BUT THE WINDOW SIZE WAS REDUCED TO INCLUDE ONLY THOSE
COORDINATES WHICH WERE ON AND WITHIN THE RECTANGLE OF ASTERISKS IN
THE EARLIER PLOT. ^THE PLOT SIZE WAS REDUCED TO MAINTAIN THE SAME
RATIOS OF DATA COORDINATES TO PRINTED COLUMNS AND LINES. ^THE LEFT
OF THE PIN GROUPS IN THE ORIGINAL UPPER LEFT CORNER DOES NOT APPEAR
IN THE SMALLER PLOT SINCE THE CENTER OF THIS GROUP IS OUTSIDE THE
SMALLER WINDOW. ^THE PIN GROUP IN THE LOWER LEFT CORNER WAS ONLY
PARTIALLY PLOTTED SINCE THE 4 BOX LIMIT WAS REACHED BEFORE ALL OF
THE REQUESTED POINTS COULD BE REPRESENTED. ^THE PIN GROUP IN THE
LOWER CENTER IS BOTH WIDER AND EXTENDS TO HIGHER COORDINATES THAN IN
THE LARGER PLOT, BUT ALL POINTS WERE INCLUDED WITHOUT EXHAUSTING THE
SEARCH PATTERN.
.SKIP
.TEST PAGE 13
.NOFILL
        13 -+^^QGFEP----+----TPGFEO
            !RHADO         UQHADN
            !SIBCN        RQPIBCM
            !TJKLM        SGFEJKL
            !UVWXY        THADORS
         8 -+         +   UIBCN +
            !             VJKLM !
            PONM  YXWVUTS WXY   !
            IHGL   MLKJIR       !
            DCFK   NEDCHQ       !
         3 -ABEJ---OFABGP-------+
            !         !         !
            4        14        24
.FILL
.SKIP
.INDENT -2
=#-1, \\STORE THE INPUT DATA AS UNCONNECTED POINTS. ^STORE THE
POINTS HAVING COORDINATES IN THE ^^XPOINT \\AND ^^YPOINT \\ARRAYS
FOR PLOTTING (EITHER BY THE CURRENT CALL TO ^^DAPLAT \I\F IPLOT \I\S
\\GREATER THAN OR EQUAL TO ZERO OR BY A SUBSEQUENT CALL TO ^^DAPLAT
\I\F IPLOT \\IS NOT EQUAL TO ZERO). ^IF ^^LETTER \\IS GREATER THAN
ZERO, AND IF THERE ALREADY IS A PRINTING CHARACTER OTHER THAN A
NONDOMINANT ASTERISK AT THE LOCATION REPRESENTING THE POINT, THEN
PLACE AN AMPERSAND AT THE LOCATION INSTEAD.
.INDENT -2
=#EQUAL TO OR GREATER THAN ZERO, STORE THE INPUT DATA AS A CURVE.
.INDENT -2
=#0, STORE THE POINTS HAVING COORDINATES IN THE ^^XPOINT \\AND
^^YPOINT \\ARRAYS FOR PLOTTING, AND CONNECT THESE WITH LINES FORMED
OF NONDOMINANT ASTERISKS. ^IF SOME OTHER CHARACTER ALREADY IS IN THE
PLOT, OR IS LATER ADDED TO THE PLOT AT THE LOCATIONS ALONG THE LINE,
THEN THIS OTHER CHARACTER IS SEEN INSTEAD OF THE ASTERISK.
.INDENT -2
=#WITHIN THE RANGE 1 THROUGH 26, ^^KONECT \\IS THE SERIAL NUMBER
WITHIN THE ALPHABET OF THE LETTER USED TO CONNECT THE POINTS HAVING
COORDINATES IN THE ^^XPOINT \\AND ^^YPOINT \\ARRAYS.
.INDENT -2
=#27 (OR GREATER), STORE THE POINTS HAVING COORDINATES IN THE
^^XPOINT \\AND ^^YPOINT \\ARRAYS FOR PLOTTING, AND CONNECT THESE
WITH LINES FORMED OF DOMINANT ASTERISKS. ^IF SOME OTHER CHARACTER
ALREADY IS IN THE PLOT, OR IF A LATER ATTEMPT IS MADE TO ADD SOME
OTHER CHARACTER TO THE PLOT AT THE LOCATIONS ALONG THE LINE, THEN
THE ASTERISK IS SEEN INSTEAD OF THIS OTHER CHARACTER.
.SKIP
.INDENT -9
^^XPOINT#=#\\THE ARRAY OF ABSCISSAE (^X OR HORIZONTAL COORDINATES)
OF THE DATA POINTS TO BE PLOTTED.
.SKIP
.INDENT -9
^^YPOINT#=#\\THE ARRAY OF ORDINATES (^Y OR VERTICAL COORDINATES) OF
THE DATA POINTS TO BE PLOTTED.
.SKIP
.INDENT -9
^^MINSUB#=#\\THE SUBSCRIPT IN THE ^^XPOINT \\AND ^^YPOINT \\ARRAYS
OF THE COORDINATES OF THE FIRST POINT TO BE PLOTTED.
.SKIP
.INDENT -9
^^MAXSUB#=#\\THE SUBSCRIPT IN THE ^^XPOINT \\AND ^^YPOINT \\ARRAYS
OF THE COORDINATES OF THE FINAL POINT TO BE PLOTTED. ^IF IT IS
DESIRED THAT THE CURRENT CALL TO ^^DAPLAT \\GENERATE THE PREVIOUSLY
STORED PLOT BUT NOT ADD POINTS OR LINES TO THIS PLOT, THEN ^^MAXSUB
\\SHOULD BE LESS THAN ^^MINSUB.
.SKIP
.INDENT -9
XLEFT##=#\\THE HORIZONTAL DATA COORDINATE TO BE PLACED IN THE CENTER
OF THE CHARACTER COLUMN AT THE LEFT EDGE OF THE PLOT. ^IF A SCALE
NUMBER IS PRINTED BELOW THE LEFT COLUMN OF THE PLOT, THEN THIS SCALE
NUMBER WILL HAVE A VALUE EQUAL TO THAT OF ^^XLEFT. O\\NLY THE
PORTION OF THE CURVE INSIDE THE WINDOW DEFINED BY ^^XLEFT, YLOWER,
XRIGHT \\AND ^^YUPPER \\WILL BE SHOWN IN THE PLOT. ^POINTS SHOWN ON
THE PLOT MUST HAVE HORIZONTAL COORDINATES IN THE RANGE
^^XLEFT-((XRIGHT-XLEFT)/(2*(MAXWID-1))) \T\O XRIGHT+
((XRIGHT-XLEFT)/(2*(MAXWID-1))). T\\HE VERTICAL COORDINATE RANGE
WOULD BE EXPRESSED SIMILARLY. ^IF A LINE SEGMENT CROSSES THE WINDOW,
THE PORTION OF THE LINE SEGMENT WHICH IS OUTSIDE THE WINDOW WILL NOT
BE REPRESENTED.
.SKIP
^THE DATA COORDINATES CAN EITHER INCREASE OR DECREASE FROM LEFT TO
RIGHT OR FROM BOTTOM TO TOP. ^IN OTHER WORDS, ^^XRIGHT \\CAN BE
EITHER GREATER THAN OR LESS THAN ^^XLEFT, \\AND ^^YUPPER \\CAN BE
EITHER GREATER THAN OR LESS THAN ^^YLOWER. I\\F MULTIPLE CURVES ARE
BEING SUPERIMPOSED ON A SINGLE PLOT, THE CURVES NEED NOT ALL HAVE
THE SAME DATA COORDINATE LIMITS, HOWEVER, THE SCALE NUMBERS SHOWN ON
THE PLOT WILL CORRESPOND TO THE DATA COORDINATE LIMITS OF THE FINAL
CURVE.
.SKIP
.INDENT -9
^^YLOWER#=#\\THE VERTICAL DATA COORDINATE TO BE PLACED IN THE CENTER
OF THE CHARACTER LINE AT THE LOWER EDGE OF THE PLOT. ^IF A SCALE
NUMBER IS PRINTED TO THE LEFT OF THE BOTTOM LINE OF THE PLOT, THEN
THIS SCALE NUMBER WILL HAVE A VALUE EQUAL TO THAT OF ^^YLOWER.
.SKIP
.INDENT -9
XRIGHT#=#\\THE HORIZONTAL DATA COORDINATE TO BE PLACED IN THE CENTER
OF THE CHARACTER COLUMN AT THE RIGHT EDGE OF THE PLOT. ^IF A SCALE
NUMBER IS PRINTED BELOW THE RIGHT COLUMN OF THE PLOT, THEN THIS
SCALE NUMBER WILL HAVE A VALUE EQUAL TO THAT OF ^^XRIGHT.
.SKIP
.INDENT -9
YUPPER#=#\\THE VERTICAL DATA COORDINATE TO BE PLACED IN THE CENTER
OF THE CHARACTER LINE AT THE UPPER EDGE OF THE PLOT. ^IF A SCALE
NUMBER IS PRINTED TO THE LEFT OF THE TOP LINE OF THE PLOT, THEN THIS
SCALE NUMBER WILL HAVE A VALUE EQUAL TO THAT OF ^^YUPPER.
.SKIP 2
.LEFT MARGIN 0
.CENTER
I\\NPUT ^ARGUMENTS ^USED ^ONLY IF A ^PLOT IS ^GENERATED
.CENTER
----- --------- ---- ---- -- - ---- -- ---------
.SKIP
^THE FOLLOWING ARGUMENTS ARE IGNORED UNLESS A PLOT IS GENERATED BY
THE CURRENT CALL TO ^^DAPLAT. H\\OWEVER, THESE ARGUMENTS AND IN
PARTICULAR ^^IDISK \\SHOULD ALWAYS BE GIVEN REASONABLE VALUES SINCE
THE STORED PLOT WILL BE GENERATED AND THE PLOT STORAGE CLEARED IF
THE SIZE OF THE PLOT (AS INDICATED BY ^^MAXWID \\AND ^^MAXHIH) \I\S
\\CHANGED WHILE POINTS AND LINES ARE STILL STORED FROM THE PREVIOUS
CALL TO ^^DAPLAT.
.LEFT MARGIN 9
.SKIP
.INDENT -9
IGRID##=#0, \\IF THE PLOT IS GENERATED, THE PLOT WILL SHOW AN
INTERNAL GRID. ^THIS INTERNAL GRID WILL BE FORMED OF VERTICAL LINES
SPACED EVERY ^^MSHWID \\CHARACTERS ACROSS THE WIDTH OF THE PLOT AND
OF HORIZONTAL LINES SPACED EVERY ^^MSHHIH \\LINES ACROSS THE HEIGHT
OF THE PLOT.
.INDENT -2
=#1, IF THE PLOT IS GENERATED, THE PLOT WILL SHOW THE INTERSECTIONS
OF THE LINES OF AN INTERNAL GRID, BUT WILL NOT SHOW THE GRID LINES
THEMSELVES. ^THE INTERNAL GRID WOULD, IF SHOWN, BE FORMED OF
VERTICAL LINES SPACED EVERY ^^MSHWID \\CHARACTERS ACROSS THE WIDTH
OF THE PLOT AND OF HORIZONTAL LINES SPACED EVERY ^^MSHHIH \\LINES
ACROSS THE HEIGHT OF THE PLOT.
.INDENT -2
=#2, IF THE PLOT IS GENERATED, THE PLOT WILL NOT SHOW AN INTERNAL
GRID. ^HOWEVER, REGARDLESS OF THE VALUE OF ^^IGRID, \\SCALE NUMBERS
WILL BE PRINTED ALONG THE SCALES AT THE INTERVALS INDICATED BY
^^MSHWID \\AND ^^MSHHIH.
.SKIP
.INDENT -9
IEDGE##=#0, \\PLACE NUMBERS BOTH TO THE LEFT OF AND BELOW THE PLOT
TO IDENTIFY THE COORDINATE RANGES.
.INDENT -2
=#1, PLACE NUMBERS TO THE LEFT OF THE PLOT, BUT DO NOT PLACE NUMBERS
BELOW THE PLOT.
.INDENT -2
=#2, PLACE NUMBERS BELOW THE PLOT, BUT NOT TO THE LEFT OF THE PLOT.
^UNLESS PREVENTED BY THE VALUE OF ^^MARGIN, \\THE DISTANCE BETWEEN
THE CARRIAGE CONTROL CHARACTER IN COLUMN 1 AND THE LEFT EDGE OF THE
PLOT WILL BE JUST LARGE ENOUGH TO ALLOW A SCALE NUMBER IMMEDIATELY
BELOW THE LEFT EDGE OF THE PLOT.
.INDENT -2
=#3, DO NOT PLACE NUMBERS EITHER TO THE LEFT OF OR BELOW THE PLOT.
^UNLESS PREVENTED BY THE VALUE OF ^^MARGIN, \\NO CHARACTERS WILL
APPEAR BETWEEN THE CARRIAGE CONTROL CHARACTER IN COLUMN 1 AND THE
LEFT EDGE OF THE PLOT.
.SKIP
.INDENT -9
^^MARGIN#=#\\THE LOWER LIMIT TO THE NUMBER OF CHARACTERS WHICH MUST
APPEAR IN THE OUTPUT BETWEEN THE CARRIAGE CONTROL CHARACTER IN
COLUMN 1 AND THE LEFT EDGE OF THE PLOT. ^^MARGIN \\IS USED TO FORCE
THE PLOT TO REMAIN A FIXED DISTANCE FROM THE CARRIAGE CONTROL
CHARACTER IN COLUMN 1 EVEN IF A NONZERO VALUE OF ^^IEDGE \\HAS
DESELECTED SCALE NUMBERS SO THAT THIS SPACING WOULD NOT BE
NECESSARY. ^^MARGIN \\IS ASSUMED TO BE AT LEAST 11 IF ^^IEDGE \I\S
\\ZERO OR 1.
.SKIP
.INDENT -9
^^MSHWID#=#\\GREATER THAN ZERO BUT NOT GREATER THAN THE WIDTH OF THE
PLOT, USE ^^MSHWID \\AS THE WIDTH OF THE GRID DIVISIONS STATED AS
THE NUMBER OF COLUMNS OF CHARACTERS. ^^MSHWID=10 \\WOULD GIVE
VERTICAL GRID LINES SPACED EVERY 10 CHARACTERS ACROSS THE WIDTH OF
THE PLOT AREA.
.INDENT -2
=#0, USE THE LAST NONZERO VALUE SPECIFIED FOR ^^MSHWID \\AS THE GRID
DIVISION WIDTH, OR USE THE VALUE 10 IF A NONZERO VALUE OF ^^MSHWID
\\HAS NOT BEEN SPECIFIED BY A PREVIOUS CALL TO THIS ROUTINE.
.INDENT -2
=#GREATER THAN THE PLOT WIDTH, DO NOT PLOT ANY VERTICAL GRID LINES
AND DO NOT REPRESENT SCALE NUMBERS BELOW THE PLOT.
.SKIP
^THE EXAMPLES SHOWN BELOW ILLUSTRATE THE COMBINATION OF ^^MAXWID=11
\\WITH VARIOUS VALUES OF ^^MSHWID.
.SKIP
.NOFILL
.TEST PAGE 11
        MSHWID=4                 MSHWID=10
  100 -+---+A--+--         100 -+----A----+
       !   * * !                !   * *   !
       A*********A              A*********A
    0 -+ **+  **             0 -+ **   ** +
       ! * *** *                ! * *** * !
       ! *** ***                ! *** *** !
 -100 -+A*-+---*A-        -100 -+A*-----*A+
       !   !   !                !         !
     -100 -20 60              -100       100
.SKIP
.TEST PAGE 11
        MSHWID=11                MSHWID=12
  100 -+----A-----         100 ------A-----
       !   * *                      * *
       A*********A              A*********A
    0 -+ **   **             0 -  **   **
       ! * *** *                  * *** *
       ! *** ***                  *** ***
 -100 -+A*-----*A-        -100 --A*-----*A-
       !
     -100
.FILL
.SKIP
.INDENT -9
MSHHIH#=#\\GREATER THAN ZERO BUT NOT GREATER THAN THE HEIGHT OF THE
PLOT, USE ^^MSHHIH \\AS THE HEIGHT OF THE GRID DIVISIONS STATED AS
THE NUMBER OF LINES. ^^MSHHIH=5 \\WOULD GIVE HORIZONTAL GRID LINES
SPACED EVERY 5 LINES ACROSS THE HEIGHT OF THE PLOT AREA.
.INDENT -2
=#0, USE THE LAST NONZERO VALUE SPECIFIED FOR ^^MSHHIH \\AS THE GRID
DIVISION HEIGHT, OR USE THE VALUE 5 IF A NONZERO VALUE OF ^^MSHHIH
\\HAS NOT BEEN SPECIFIED BY A PREVIOUS CALL TO THIS ROUTINE.
.INDENT -2
=#GREATER THAN THE PLOT HEIGHT, DO NOT PLOT ANY HORIZONTAL GRID
LINES AND DO NOT REPRESENT SCALE NUMBERS TO THE LEFT OF THE PLOT.
^THIS, UNLIKE DESELECTION OF THE LEFT SCALE NUMBERS BY ^^IEDGE,
\\DOES NOT CHANGE THE HORIZONTAL LOCATION OF THE PLOT.
.SKIP
^THE EXAMPLES SHOWN BELOW ILLUSTRATE THE COMBINATION OF ^^MAXHIH=7
\\WITH VARIOUS VALUES OF ^^MSHHIH.
.SKIP
.NOFILL
.TEST PAGE 11
        MSHHIH=4                 MSHHIH=6
       !    A    !         100 -+----A----+
       !   * *   !              !   * *   !
33.333-A*********A              A*********A
       ! **   ** !              ! **   ** !
       ! * *** * !              ! * *** * !
       ! *** *** !              ! *** *** !
 -100 -+A*--+--*A+        -100 -+A*--+--*A+
       !    !    !              !    !    !
     -100   0   100           -100   0   100
.SKIP
.TEST PAGE 11
        MSHHIH=7                 MSHHIH=8
       !    A    !              !    A    !
       !   * *   !              !   * *   !
       A*********A              A*********A
       ! **   ** !              ! **   ** !
       ! * *** * !              ! * *** * !
       ! *** *** !              ! *** *** !
 -100 -+A*--+--*A+              !A*     *A!
       !    !    !              !    !    !
     -100   0   100           -100   0   100
.FILL
.LEFT MARGIN 9
.SKIP
.LEFT MARGIN 9
.INDENT -9
LTROFF#=#\\NUMBER OF COLUMNS OF CHARACTERS BY WHICH THE LEFTMOST
GRID LINE IS OFFSET FROM THE LEFT BORDER OF THE PLOT. ^^LTROFF \\CAN
BE IN THE RANGE ZERO UP TO BUT NOT INCLUDING ^^MSHWID. I\F LTROFF
\\IS NEGATIVE, THEN IT IS ASSUMED TO HAVE THE VALUE ^^MSHWID+LTROFF
\\INSTEAD. ^IF ^^LTROFF \\IS NONZERO, THEN THE LEFT BORDER OF THE
PLOT WILL BE RULED WITH EXCLAMATION POINTS. ^THE RIGHT BORDER IS
SIMILARLY RULED IF IT DOES NOT BEAR A GRID LINE.
.SKIP
.INDENT -9
^^LINOFF#=#\\NUMBER OF LINES OF CHARACTERS BY WHICH THE LOWEST GRID
LINE IS OFFSET FROM THE LOWER BORDER OF THE PLOT. ^^LINOFF \\CAN BE
IN THE RANGE ZERO UP TO BUT NOT INCLUDING ^^MSHHIH. I\F LINOFF \I\S
\\NEGATIVE, THEN IT IS ASSUMED TO HAVE THE VALUE ^^MSHHIH+LINOFF
\\INSTEAD. ^IF ^^LINOFF \\IS NONZERO, THEN THE LOWER BORDER OF THE
PLOT WILL BE RULED WITH MINUS SIGNS. ^THE UPPER BORDER IS SIMILARLY
MARKED IF IT DOES NOT BEAR A GRID LINE.
.SKIP
.INDENT -9
^^LINPRT#=#-1, \\DO NOT INCLUDE A CARRIAGE CONTROL CHARACTER TO THE
LEFT OF EACH LINE OF THE PLOT. ^SINCE THE MINUS SIGN OF A NEGATIVE
SCALE NUMBER CAN THEN APPEAR IN COLUMN 1, THE RESULTING OUTPUT MUST
NOT BE TREATED AS THOUGH THE LEFT COLUMN CONTAINS CARRIAGE CONTROL
CHARACTERS.
.INDENT -2
=#0, THE PLOT WILL BE VIEWED BY THE USER ON A TERMINAL, EITHER TYPED
DIRECTLY WITH ^^IDISK \\BEING GIVEN THE TERMINAL UNIT NUMBER, OR
TYPED BY THE USER AFTER THIS ROUTINE HAS WRITTEN THE PLOT INTO A
FILE ON THE UNIT THE NUMBER OF WHICH IS CONTAINED IN ^^IDISK. A
\\BLANK OR SPACE WILL BE USED AS CARRIAGE CONTROL CHARACTER TO GIVE
SINGLE SPACING.
.INDENT -2
=#1, THE PLOT WILL BE PRINTED ON THE LINE PRINTER BY THE USER AFTER
THE PROGRAM HAS WRITTEN THE PLOT INTO A FILE. ^AN ASTERISK WILL BE
USED AS CARRIAGE CONTROL CHARACTER TO GIVE SINGLE SPACING WITH
SUPPRESSION OF SKIPPING EXTRA LINES AT THE PAGE BOUNDARIES. ^ON THE
^^PDP-10, \\AN ASTERISK AS THE CARRIAGE CONTROL CHARACTER GIVES
OVERPRINTING ON THE TERMINAL AS OPPOSED TO SINGLE SPACING.
.SKIP
.INDENT -9
^^IDISK##=#\\THE UNIT NUMBER OF THE DEVICE ONTO WHICH THE PLOTS ARE
TO BE WRITTEN. ^THIS ROUTINE WILL ONLY GENERATE THE PLOT. ^IT IS THE
RESPONSIBILITY OF THE CALLING PROGRAM TO OPEN THE OUTPUT FILE AND TO
WRITE THE CAPTIONS, THE FORM FEEDS AND/OR THE SEPARATING LINES.
^^IDISK \\SHOULD ALWAYS BE GIVEN A LEGAL UNIT NUMBER SINCE ^^DAPLAT
\\WILL GENERATE THE STORED PLOT, IF ANY, USING THE NEW VALUE OF
^^IDISK \\BEFORE STORING THE NEW CURVE IF THE NEW PLOT SIZE DIFFERS
FROM THAT USED TO STORE THE PREVIOUS CURVES EVEN IF ^^IPLOT=-1.
.SKIP 2
.LEFT MARGIN 0
.CENTER
A\\RGUMENT ^USED ^INITIALLY FOR ^INPUT, BUT THEN ^RETURNED ^CHANGED
.CENTER
-------- ---- --------- --- -----##--- ---- -------- -------
.SKIP
^THE FOLLOWING ARGUMENT MUST BE DEFINED BY THE CALLING PROGRAM
BEFORE THIS ROUTINE IS FIRST CALLED. ^THIS ARGUMENT IS RETURNED BY
THIS ROUTINE SET TO ZERO, AND THIS ZERO VALUE SHOULD BE SENT
UNCHANGED TO ANY SUBSEQUENT CALLS TO THIS ROUTINE.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IRESET#=#0, \\THE PLOT STORAGE HAS BEEN INITIALIZED BY A PREVIOUS
CALL TO THIS ROUTINE. ^IF ^^IPLOT \\WAS NONZERO DURING THE PREVIOUS
CALL TO THIS ROUTINE, THEN THE CURRENT CALL TO THIS ROUTINE WILL ADD
TO THE PLOT ALREADY STARTED BY THE PREVIOUS CALL.
.INDENT -2
=#(GREATER THAN ZERO), USED WHEN THIS ROUTINE IS FIRST CALLED TO
INITIALIZE THE ARRAYS AND VARIABLES WHICH WILL BE USED TO STORE THE
PLOT, OR TO CAUSE THE CURRENT CALL TO THIS ROUTINE TO INSERT THE
POINTS OR LINES INTO A BLANK PLOT EVEN IF ^^IPLOT \\WAS NONZERO
DURING THE PREVIOUS CALL TO THIS ROUTINE SO THAT THE PLOT STORAGE
WAS NOT BLANKED OUT AFTER THE PLOT WAS GENERATED. ^^IRESET \I\S
\\RETURNED SET TO ZERO.
.INDENT -2
=#1, PLOT STORAGE IS TO BE INITIALIZED BEFORE ANY POINTS OR LINES
ARE INSERTED INTO THE PLOT BY THE CURRENT CALL TO THIS ROUTINE.
^HOWEVER, UNLESS THIS ROUTINE IS USED UPON A COMPUTER WHICH DOES NOT
ALLOW THE TESTING OF THE VALUE OF A VARIABLE WHICH HAS NOT YET BEEN
DEFINED, HAVING ^^IRESET \\ALWAYS SET TO ZERO WILL PRODUCE THE
EXPECTED RESULTS SINCE ONE OF THE VARIABLES SET WITHIN THE ROUTINE
IS TESTED AT THE START OF THE ROUTINE TO DETERMINE WHETHER THE PLOT
STORAGE HAS BEEN INITIALIZED.
.INDENT -2
=#2, 3, 4 OR 5, PLOT STORAGE IS TO BE INITIALIZED EXCEPT FOR THE
CHARACTER SET, THE DOMINANCE RULES AND/OR THE SIZE OF THE PLOT
STORAGE WHICH CAN BE PREDEFINED BY THE CALLING PROGRAM. ^THESE
OPTIONS ARE DESCRIBED LATER IN THIS DOCUMENTATION.
.SKIP 2
.LEFT MARGIN 0
.TEST PAGE 5
.CENTER
^ARGUMENTS ^RETURNED BY ^^DAPLAT C\\ONTAINING ^ERROR ^COUNTS
.CENTER
--------- -------- -- ------ ---------- ----- ------
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LTRERR#=#\\RETURNED CONTAINING THE NUMBER OF POINTS WHICH WERE
OUTSIDE THE CURRENT PLOT.
.SKIP
.INDENT -9
^^LINERR#=#\\RETURNED CONTAINING THE NUMBER OF LINE SEGMENTS WHICH
WERE COMPLETELY OUTSIDE THE CURRENT PLOT. ^IF A PIN MAP IS BEING
SIMULATED, ^^LINERR \\ALSO ACCUMULATES THE NUMBER OF POINTS WHICH
SHOULD HAVE BEEN DISPLAYED ON THE PLOT, BUT FOR WHICH THERE WAS NO
EMPTY LOCATION WITHIN THE ALLOWED DISTANCE. ^^LTRERR \\AND ^^LINERR
\\ARE RETURNED CONTAINING THE ERROR TOTALS ACCUMULATED DURING ALL
CALLS TO ^^DAPLAT \\WHICH ADDED CURVES OR POINTS TO THE SAME PLOT.
^IF ^^DAPLAT \\IS CALLED WITH ARGUMENT ^^IPLOT \\EQUAL TO ZERO
CAUSING THE PLOT STORAGE TO BE ZEROED AFTER PRINTING THE CURRENTLY
STORED PLOT, THEN IT IS THE SUBSEQUENT CALL TO ^^DAPLAT \\WHICH
ZEROES THE ERROR TOTALS.
.PAGE
.LEFT MARGIN 0
.CENTER
^TYPICAL ^SCALES ^PRODUCED ^USING ^^MSHWID V\\ALUES IN ^RANGE 1 TO 10
.CENTER
------- ------ -------- ----- ------ ------ -- ----- - -- --
.SKIP
.NOFILL
  ^^XRIGHT=-XLEFT=150 \\AND ^^YUPPER=-YLOWER=1234500/(10**MSHWID)
.SKIP
.LEFT MARGIN 3
  1.2345E5 -+++++++++++++++++++++++++++++++++++++++++
 -1.2345E5 -+++++++++++++++++++++++++++++++++++++++++
            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            *****************************************
.SKIP
     12345 -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    -12345 -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
           -2-1-1-1-9-8-6-5-3-2 0 2 3 5 6 8 9 1 1 1 2
           E2E2E2E2E1E1E1E1E1E1  E1E1E1E1E1E1E2E2E2E2
.SKIP
    1234.5 ---+--+--+--+--+--+--+--+--+--+--+--+--+--
   -1234.5 ---+--+--+--+--+--+--+--+--+--+--+--+--+--
              !  !  !  !  !  !  !  !  !  !  !  !  !
             -1 -1 -90-68-45-23 0  23 45 68 90 1  1
             E2 E2                            E2 E2
.SKIP
    123.45 -+---+---+---+---+---+---+---+---+---+---+
   -123.45 -+---+---+---+---+---+---+---+---+---+---+
            !   !   !   !   !   !   !   !   !   !   !
          -150-120 -90 -60 -30  0  30  60  90  120 150
.SKIP
    12.345 -+----+----+----+----+----+----+----+----+
   -12.345 -+----+----+----+----+----+----+----+----+
            !    !    !    !    !    !    !    !    !
          -150 -113  -75 -37.5  0   37.5 75   113  150
.SKIP
    1.2345 ---+-----+-----+-----+-----+-----+-----+--
   -1.2345 ---+-----+-----+-----+-----+-----+-----+--
              !     !     !     !     !     !     !
            -135   -90   -45    0    45    90    135
.SKIP
   0.12345 -------+------+------+------+------+------
  -0.12345 -------+------+------+------+------+------
                  !      !      !      !      !
                -105   -52.5    0    52.5    105
.SKIP
  0.012345 -----+-------+-------+-------+-------+----
 -0.012345 -----+-------+-------+-------+-------+----
                !       !       !       !       !
              -120     -60      0      60      120
.SKIP
  1.235E-3 ---+--------+--------+--------+--------+--
 -1.235E-3 ---+--------+--------+--------+--------+--
              !        !        !        !        !
            -135     -67.5      0      67.5      135
.LEFT MARGIN 0
.FILL
.PAGE
.LEFT MARGIN 0
.CENTER
A\N E\\XAMPLE OF THE USE OF ^^DAPLAT
.CENTER
-- ------- -- --- --- -- ------
.SKIP
A\\S AN EXAMPLE OF THE USE OF THIS ROUTINE, THE FOLLOWING PROGRAM
WAS USED TO GENERATE THE 3 PLOTS SHOWN BELOW THE PROGRAM.
.NOFILL
.SKIP
      ^^DIMENSION XPOINT(10),YPOINT(10)
      DATA XPOINT/0. ,1. ,2. ,3. ,4. ,0. ,1. ,2. ,3. ,4. /
      DATA YPOINT/1. ,1.5,2.5,2.5,1.5,2. ,2.3,3. ,2.5,2. /
      DATA IRESET,IDISK/1,1/
      DO 2 JGRID=1,3
      IGRID=JGRID-1
      WRITE(IDISK,1)IGRID
    1 FORMAT(7H IGRID=,I2)
C
C  IPLOT=-1 MAXWID=41 MAXHIH=16 LETTER=1  KONECT=2
C MINSUB=1  MAXSUB=5   XLEFT=0  YLOWER=.5 XRIGHT=4
C YUPPER=3.5 IEDGE=0  MARGIN=0  MSHWID=0  MSHHIH=0 LTROFF=0
C LINOFF=0  LINPRT=1
      CALL DAPLAT(-1,41,16,1,2,
     1XPOINT,YPOINT,1,5,0.,.5,4.,
     23.5,IGRID,0,0,0,0,0,
     30,1,IDISK,IRESET,LTRERR,LINERR)
CHANGING IPLOT=0, LETTER=3, KONECT=4, MINSUB=6, MAXSUB=10
      CALL DAPLAT(0,41,16,3,4,
     1XPOINT,YPOINT,6,10,0.,.5,4.,
     23.5,IGRID,0,0,0,0,0,
     30,1,IDISK,IRESET,LTRERR,LINERR)
    2 WRITE(IDISK,3)
    3 FORMAT(//)
      STOP
      END
.SKIP
 IGRID= 0
*      3.5 -+---------+---------+---------+---------+
*           !         !         !         !         !
*           !         !         !         !         !
*           !         !        DCDD       !         !
*           !         !    DDDD !  DDDDD  !         !
*      2.5 -+---------+-DDD----BABBBBBBB_&_&_&D--------+
*           !       DDCD     BB !         !B_&DD     !
*           !  DDDDD  !    BB   !         !  BBDDDD !
*           CDD       !  BB     !         !    BB  DC
*           !         !BB       !         !      BB !
*      1.5 -+--------BA---------+---------+--------BA
*           !    BBBB !         !         !         !
*           ! BBB     !         !         !         !
*           AB        !         !         !         !
*           !         !         !         !         !
*      0.5 -+---------+---------+---------+---------+
*           !         !         !         !         !
*           0         1         2         3         4
.PAGE
 IGRID= 1
*      3.5 -+---------+---------+---------+---------+
*           !                                       !
*           !                                       !
*           !                  DCDD                 !
*           !              DDDD    DDDDD            !
*      2.5 -+         + DDD    BABBBBBBB_&_&_&D        +
*           !       DDCD     BB            B_&DD     !
*           !  DDDDD       BB                BBDDDD !
*           CDD          BB                    BB  DC
*           !          BB                        BB !
*      1.5 -+        BA         +         +        BA
*           !    BBBB                               !
*           ! BBB                                   !
*           AB                                      !
*           !                                       !
*      0.5 -+---------+---------+---------+---------+
*           !         !         !         !         !
*           0         1         2         3         4
.SKIP 3
 IGRID= 2
*      3.5 -+---------+---------+---------+---------+
*           !                                       !
*           !                                       !
*           !                  DCDD                 !
*           !              DDDD    DDDDD            !
*      2.5 -+           DDD    BABBBBBBB_&_&_&D        +
*           !       DDCD     BB            B_&DD     !
*           !  DDDDD       BB                BBDDDD !
*           CDD          BB                    BB  DC
*           !          BB                        BB !
*      1.5 -+        BA                            BA
*           !    BBBB                               !
*           ! BBB                                   !
*           AB                                      !
*           !                                       !
*      0.5 -+---------+---------+---------+---------+
*           !         !         !         !         !
*           0         1         2         3         4
.LEFT MARGIN 0
.RIGHT MARGIN 60
.FILL
.PAGE
.CENTER
M\\ODIFICATION OF ^PLOT ^FORMAT
.CENTER
------------ -- ---- ------
.SKIP
^IF AN INTERNAL GRID IS NOT GENERATED, THEN AT ANY EDGE EITHER THE
OUTERMOST GRID LINE OR THE BORDER, BUT NOT BOTH, CAN BE RULED. ^IF
AN INTERNAL GRID IS NOT GENERATED, THEN THE DIGITS IN THE TENS AND
HUNDREDS POSITION IN THE DECIMAL INTEGER VALUE OF ^^IGRID \\CAN BE
USED TO SUPPRESS THE RULING OF SPECIFIC OUTERMOST GRID LINES. ^IF AN
INTERNAL GRID IS NOT BEING GENERATED BUT A PARTICULAR OUTERMOST GRID
LINE IS REQUESTED, THEN THE CORRESPONDING BORDER IS NOT RULED. ^ANY
BORDER CAN BE RULED IF AN INTERNAL GRID IS GENERATED. ^IF AN
INTERNAL GRID IS GENERATED, OR IF NEITHER AN INTERNAL GRID NOR A
PARTICULAR OUTERMOST GRID LINE IS BEING GENERATED, THEN THE VALUE OF
THE TENS OR HUNDREDS DIGITS OF THE DECIMAL INTEGER VALUE OF ^^IEDGE
\\CAN DIRECT WHETHER THE CORRESPONDING BORDER IS TO BE RULED. ^THE
MEANINGS ASSIGNED TO EACH DIGIT IN THE VALUE OF ^^IGRID \\ARE AS
FOLLOW
.SKIP
.LEFT MARGIN 5
.TEST PAGE 5
.INDENT -5
^^ONES DIGIT OF IGRID
.SKIP
.INDENT -3
0##T\\HE PLOT WILL SHOW AN INTERNAL GRID. ^THE VALUES OF THE TENS
AND HUNDREDS DIGITS OF ^^IGRID \\ARE IGNORED.
.INDENT -3
1##^THE PLOT WILL SHOW THE INTERSECTIONS OF THE LINES OF AN INTERNAL
GRID, BUT WILL NOT INCLUDE THE GRID LINES THEMSELVES. ^THE RULING OF
THE OUTERMOST GRID LINES IS CONTROLLED BY THE VALUES IN THE TENS AND
HUNDREDS DIGITS OF ^^IGRID.
.INDENT -3
2##T\\HE PLOT WILL NOT INCLUDE AN INTERNAL GRID. ^THE RULING OF THE
OUTERMOST GRID LINES IS CONTROLLED BY THE VALUES IN THE TENS AND
HUNDREDS DIGITS OF ^^IGRID.
.SKIP
.TEST PAGE 5
.INDENT -5
TENS DIGIT OF IGRID
.SKIP
.INDENT -3
0##S\\HOW BOTH THE LEFTMOST AND RIGHTMOST GRID LINES.
.INDENT -3
1##^SHOW LEFTMOST GRID LINE, BUT DO NOT SHOW RIGHTMOST GRID LINE.
^NOTE THAT IF THE EFFECTIVE VALUE OF ^^MSHWID \\EQUALS THE EFFECTIVE
VALUE OF ^^MAXWID \\THEN A SINGLE VERTICAL GRID LINE IS RULED AND
THIS GRID LINE IS BOTH THE LEFTMOST AND RIGHTMOST GRID LINE AND WILL
BE PLOTTED EXCEPT FOR A TENS DIGIT VALUE OF 3.
.INDENT -3
2##^SHOW RIGHTMOST GRID LINE, BUT DO NOT SHOW LEFTMOST GRID LINE.
.INDENT -3
3##^DO NOT SHOW EITHER LEFTMOST OR RIGHTMOST GRID LINES.
.SKIP
.TEST PAGE 5
.INDENT -5
^^HUNDREDS DIGIT OF IGRID
.SKIP
.INDENT -3
0##S\\HOW BOTH THE LOWER AND UPPER GRID LINES.
.INDENT -3
1##^SHOW LOWER GRID LINE, BUT DO NOT SHOW UPPER GRID LINE. ^NOTE
THAT IF THE EFFECTIVE VALUE OF ^^MSHHIH \\EQUALS THE EFFECTIVE VALUE
OF ^^MAXHIH \\THEN A SINGLE HORIZONTAL GRID LINE IS RULED AND THIS
GRID LINE IS BOTH THE LOWER AND UPPER GRID LINE AND WILL BE PLOTTED
EXCEPT FOR A HUNDREDS DIGIT VALUE OF 3.
.INDENT -3
2##^SHOW UPPER GRID LINE, BUT DO NOT SHOW LOWER GRID LINE.
.INDENT -3
3##^DO NOT SHOW EITHER LOWER OR UPPER GRID LINES.
.SKIP
.LEFT MARGIN 0
^THE TENS AND HUNDREDS DIGITS IN THE DECIMAL INTEGER VALUE OF
^^IEDGE \\ARE USED TO SUPPRESS THE RULING OF SPECIFIC EDGES OF THE
PLOT WHICH DO NOT HAPPEN TO COINCIDE WITH VISIBLE GRID LINES. ^THE
MEANINGS ASSIGNED TO EACH DIGIT IN THE VALUE OF ^^IEDGE \\ARE AS
FOLLOW
.SKIP
.TEST PAGE 5
^^ONES DIGIT OF IEDGE
.SKIP
.LEFT MARGIN 5
.INDENT -3
0##S\\HOW NUMBERS BOTH TO THE LEFT OF AND BELOW THE PLOT.
.INDENT -3
1##^SHOW NUMBERS TO THE LEFT OF THE PLOT, BUT NOT BELOW THE PLOT.
.INDENT -3
2##^SHOW NUMBERS BELOW THE PLOT, BUT NOT TO THE LEFT OF THE PLOT.
.INDENT -3
3##^DO NOT SHOW NUMBERS EITHER TO THE LEFT OF OR BELOW THE PLOT.
.SKIP
.TEST PAGE 5
.LEFT MARGIN 0
^^TENS DIGIT OF IEDGE
.SKIP
.LEFT MARGIN 5
.INDENT -3
0##S\\HOW BOTH THE LEFT AND RIGHT BORDER LINES.
.INDENT -3
1##^SHOW LEFT BORDER LINE, BUT DO NOT SHOW THE RIGHT BORDER LINE.
.INDENT -3
2##^SHOW RIGHT BORDER LINE, BUT DO NOT SHOW LEFT BORDER LINE.
.INDENT -3
3##^DO NOT SHOW EITHER LEFT OR RIGHT BORDER LINES.
.SKIP
.TEST PAGE 5
.LEFT MARGIN 0
^^HUNDREDS DIGIT OF IEDGE
.SKIP
.LEFT MARGIN 5
.INDENT -3
0##S\\HOW BOTH THE LOWER AND UPPER BORDER LINES.
.INDENT -3
1##^SHOW LOWER BORDER LINE, BUT DO NOT SHOW THE UPPER BORDER LINE.
.INDENT -3
2##^SHOW UPPER BORDER LINE, BUT DO NOT SHOW LOWER BORDER LINE.
.INDENT -3
3##^DO NOT SHOW EITHER LOWER OR UPPER BORDER LINES.
.LEFT MARGIN 0
.SKIP 2
.TEST PAGE 5
.LEFT MARGIN 0
.FILL
.CENTER
^ERASURE OF ^POINTS, ^LINES AND ^PIN ^CLUSTERS
.CENTER
------- -- ------##----- --- --- --------
.SKIP
^^A LETTER \\ARGUMENT VALUE OF -1 WILL CAUSE THE ERASURE OF THE
SPECIFIED POINTS, LINES OR SELECTED LEVELS IN PIN CLUSTERS.
.SKIP
^IF ^^LETTER \\IS -1 AND ^^KONECT \\IS ZERO (OR GREATER), ALL
PRINTING CHARACTERS WILL BE CHANGED TO SPACES ALONG THE LINES
SPECIFIED BY VALUES IN THE ^^XPOINT \\AND ^^YPOINT \\ARRAYS.
.SKIP
^IF ^^LETTER \\IS -1 AND ^^KONECT \\IS LESS THAN ZERO, SPACES WILL
REPLACE THE PRINTING CHARACTERS ON THE EDGES OF THE SQUARE SELECTED
BY TAKING THE CENTRAL POINT AS SQUARE 1 AND COUNTING THE CONCENTRIC
SQUARES AROUND THIS POINT UNTIL THE ABSOLUTE VALUE OF ^^KONECT \I\S
\\REACHED.
.SKIP
^THE ILLUSTRATIONS SHOWN BELOW DEMONSTRATE ERASURE OF EDGES OF PIN
CLUSTERS. ^AT THE LEFT IS SHOWN THE STARTING PLOT COMPLETELY FILLED
WITH THE LETTER ^A. ^AT THE RIGHT IS SHOWN THE PLOT AFTER IT HAS
BEEN MODIFIED BY CALLING ^^DAPLAT \\WITH ^^LETTER \\BEING -1 WHILE
^^KONECT \\WAS CONSECUTIVELY -1 (REVEALING THE CENTER POINT AT 1,1),
-3, -5, -7, -9 AND -11 (REVEALING THE COLUMNS CONTAINING THE LEFT
AND RIGHT GRID LINES). ^THE ERASURE OF EACH BOX REQUIRED A SEPARATE
CALL TO ^^DAPLAT \\WITH ^^XPOINT(1)=1.0, YPOINT(1)=1.0, MINSUB=1,
\\AND ^^MAXSUB=1.
.SKIP
.NOFILL
 2 -AAAAAAAAAAAAAAAAAAAAA       2 -+A-A-AAAAAAAAAAA-A-A+
    AAAAAAAAAAAAAAAAAAAAA          !A A A    !    A A A!
    AAAAAAAAAAAAAAAAAAAAA          !A A A AAAAAAA A A A!
    AAAAAAAAAAAAAAAAAAAAA          !A A A A  !  A A A A!
    AAAAAAAAAAAAAAAAAAAAA          !A A A A AAA A A A A!
 1 -AAAAAAAAAAAAAAAAAAAAA       1 -+A-A-A-A-A+A-A-A-A-A+
    AAAAAAAAAAAAAAAAAAAAA          !A A A A AAA A A A A!
    AAAAAAAAAAAAAAAAAAAAA          !A A A A  !  A A A A!
    AAAAAAAAAAAAAAAAAAAAA          !A A A AAAAAAA A A A!
    AAAAAAAAAAAAAAAAAAAAA          !A A A    !    A A A!
 0 -AAAAAAAAAAAAAAAAAAAAA       0 -+A-A-AAAAAAAAAAA-A-A+
    !         !         !          !         !         !
    0         1         2          0         1         2
.FILL
.SKIP
I\F LETTER \\IS -2 AND ^^KONECT \\IS -2 OR LESS, THEN SPACES WILL
REPLACE THE PRINTING CHARACTERS EITHER ON THE EDGES OF, OR WITHIN,
THE SQUARE SELECTED BY ^^KONECT. LETTER \\VALUES OF -1 AND -2 ARE
EQUIVALENT IF ^^KONECT \\IS -1 OR GREATER. ^AS AN EXAMPLE OF THE
ERASURE OF ENTIRE PIN CLUSTERS, A STARTING PLOT COMPLETELY FILLED
WITH THE LETTER ^A WAS MODIFIED TO PRODUCE THE PLOT SHOWN BELOW BY
SPECIFYING THE ^X AND ^Y COORDINATES LISTED TO ITS LEFT WITH
^^LETTER=-2 \\AND ^^KONECT=-3.
.SKIP
.NOFILL
.LEFT MARGIN 8
.TEST PAGE 13
                   2 -AAAAAAAAAAA-----AA--+
 X     Y              !    AAAAAA     AA  !
                      !    AAAAAA     AA  !
0.0   0.0             !    AAA        AAAAA
0.2   1.4             !    AAA     AAAAAAAA
0.7   0.2          1 -+    AAA  +  AAA    +
1.0   1.0             AAAAAAAA     AAA    !
1.3   1.8             AAAAA        AAA    !
1.8   0.6             !  AA     AAAAAA    !
2.0   2.0             !  AA     AAAAAA    !
                   0 -+--AA-----AAAAAAAAAAA
                      !         !         !
                      0         1         2
.FILL
.LEFT MARGIN 0
.SKIP 2
.TEST PAGE 5
.CENTER
I\\NCREASING ^MAXIMUM ^PLOT ^SIZE AND ^RESTORING ^PLOT ^STORAGE
.CENTER
---------- ------- ---- ---- --- --------- ---- -------
.SKIP
^AS SUPPLIED, ^^DAPLAT \\CONTAINS A STORAGE ARRAY LARGE ENOUGH TO
HOLD 5151 CHARACTERS, THIS BEING THE NUMBER OF CHARACTERS NEEDED FOR
A PLOT OF THE DEFAULT SIZE OF 51 LINES EACH OF 101 CHARACTERS. ^THIS
PLOT STORAGE IS CONTAINED IN THE LABELED BLOCK ^^COMMON/FASPA/
\\WHICH MUST CONTAIN AT LEAST 20 WORDS MORE THAN THE WORDS NEEDED TO
STORE ^^MAXWID*MAXHIH \\CHARACTERS, SIX CHARACTERS BEING HELD IN THE
RIGHT 30 BITS OF EACH WORD. ^THE 20 ADDITIONAL WORDS STORE
INFORMATION ABOUT PLOT SIZE AND SCALING. ^THE LABELED COMMON BLOCK
^^COMMON/FASPA/ \\CONTAINS ALL THE INFORMATION NECESSARY TO GENERATE
THE PLOT, WITH THE EXCEPTION OF THE CHARACTER LIST IN
^^COMMON/FASPB/, \\THE CHARACTER DOMINANCE RULES IN ^^COMMON/FASPC/
(\\NEEDED IF MORE POINTS OR LINES ARE TO BE ADDED TO THE SAME PLOT),
AND THE ARGUMENTS ^^LINPRT \\AND ^^IDISK.
.SKIP
I\\F A PLOT IS REQUESTED WHICH IS LARGER THAN CAN BE HELD IN THE
LABELED COMMON BLOCK, THEN THE EFFECTIVE VALUE OF ^^MAXHIH \I\S
\\REDUCED SO THAT THE PLOT WILL FIT. ^THE LABELED COMMON BLOCK CAN
BE MADE LARGER THAN THE 879 LOCATIONS (CALCULATED AS
20+(((51*101)+5)/6) WORDS) PROVIDED IN THIS ROUTINE IF
.LEFT MARGIN 5
.SKIP
.INDENT -3
A.#^THE LARGER SPECIFICATION OF THE LABELED COMMON BLOCK
^^COMMON/FASPA/ \\IS LOADED BY THE CALLING PROGRAM OR BY A BLOCK
DATA ROUTINE BEFORE ^^DAPLAT \\IS LOADED. ^ON THE ^^DEC\\SYSTEM10
COMPUTER AT LEAST, THE SPECIFICATION OF A LABELED COMMON BLOCK WHICH
IS LOADED FIRST ESTABLISHES ITS LENGTH, BUT MUST BE AT LEAST AS
LARGE AS THE SPECIFICATION OF THE SAME COMMON BLOCK IN ANY ROUTINE
WHICH IS LOADED LATER.
.SKIP
.INDENT -3
B.#^THE FIRST THREE LOCATIONS IN THE LABELED COMMON BLOCK
^^COMMON/FASPA/ \\ARE INTEGER.
.SKIP
.INDENT -3
C.#^PRIOR TO THE FIRST CALL TO ^^DAPLAT, \\THE FIRST 3 LOCATIONS IN
THE LABELED COMMON BLOCK ^^COMMON/FASPA/ \\ARE LOADED WITH THE
FOLLOWING INFORMATION EITHER BY A BLOCK DATA ROUTINE OR BY THE MAIN
PROGRAM.
.SKIP
.LEFT MARGIN 10
.INDENT -4
1ST#LOCATION (INITIALIZED TO HAVE THE VALUE 859 IF THIS ROUTINE IS
CALLED WITH ^^IRESET=1 \\OR 4) MUST CONTAIN A VALUE WHICH IS 20 LESS
THAN THE TOTAL NUMBER OF LOCATIONS IN THIS COMMON BLOCK. ^THIS IS
THE NUMBER OF LOCATIONS IN THIS COMMON BLOCK WHICH CAN BE USED TO
STORE VALUES IDENTIFYING THE CHARACTERS WHICH ARE TO APPEAR UPON THE
PLOT SURFACE.
.SKIP
.INDENT -4
2ND#LOCATION (INITIALIZED TO HAVE THE VALUE 30 IF THIS ROUTINE IS
CALLED WITH ^^IRESET=1 \\OR 4) MUST CONTAIN A VALUE WHICH IS 3 MORE
THAN THE MAXIMUM VALUE OF THE ARGUMENTS ^^LETTER \\AND ^^KONECT.
T\\HIS IS THE NUMBER OF DIFFERENT CHARACTERS BY WHICH DATA POINTS
AND LINES CAN BE REPRESENTED, INCLUDING IN THIS COUNT THE SPACE
INDICATING AN EMPTY POSITION, AND THE AMPERSAND INDICATING
SUPERIMPOSED DATA. ^IF THE SECOND LOCATION IN ^^COMMON/FASPA/ \I\S
\\SET TO A VALUE GREATER THAN 30, THEN THE CALLING PROGRAM MUST ALSO
ALLOCATE A CORRESPONDINGLY LARGER ^^COMMON/FASPB/ \\AND
^^COMMON/FASPC/, \\MUST ITSELF DEFINE THE CONTENTS OF THESE COMMON
BLOCKS AND MUST CALL THIS ROUTINE INITIALLY WITH ^^IRESET \\HAVING
THE VALUE 5 TO PREVENT THE REDEFINITION BY THIS ROUTINE OF THE
CONTENTS OF THESE COMMON BLOCKS. ^IF THE SECOND LOCATION IN
^^COMMON/FASPA/ \\IS SET TO THE VALUE 3, THEN THE SPACE, AMPERSAND
AND NONDOMINANT ASTERISK (OR WHATEVER HAPPENS TO BE SELECTED WHEN
^^LETTER \O\R KONECT \\IS SET TO ZERO) WOULD BE THE ONLY CHARACTERS
ALLOWED, OTHER THAN THOSE FORMING THE GRID LINES AND GRID LINE
INTERSECTIONS, IN THE PLOT.
.SKIP
.INDENT -4
3RD#LOCATION (INITIALIZED TO HAVE THE VALUE 6 IF THIS ROUTINE IS
CALLED WITH ^^IRESET=1 \\OR 4) MUST CONTAIN A VALUE WHICH IS 1 MORE
THAN THE NUMBER OF TIMES THE VALUE IN THE SECOND LOCATION IN THIS
COMMON BLOCK CAN BE MULTIPLIED BY ITSELF AND STILL YIELD AS THE
RESULT A VALUE WHICH CAN BE STORED AS A POSITIVE SINGLE PRECISION
INTEGER BY THE COMPUTER UPON WHICH THIS ROUTINE IS BEING RUN. ^THIS
IS THE NUMBER OF CHARACTERS, EACH OF WHICH CAN BE IDENTIFIED BY A
VALUE IN THE RANGE ZERO THROUGH 1 LESS THAN THE VALUE IN THE 2ND
LOCATION IN THIS COMMON BLOCK, WHICH CAN BE STORED IN EACH OF THE
LOCATIONS IN AN ARRAY THE DIMENSION OF WHICH IS INDICATED BY THE
VALUE IN THE FIRST LOCATION IN THIS COMMON BLOCK. ^THE VALUE IN THIS
3RD LOCATION CANNOT EXCEED 22 UNLESS THE SIZE OF ^^COMMON/FASPD/
\\IS INCREASED. ^IF ^^LETTER \O\R KONECT \\CAN TAKE ON VALUES
THROUGH 27, THEN THE VALUES REPRESENTING 6 CHARACTERS CAN BE PACKED
INTO A SINGLE POSITIVE 32 BIT NUMBER. ^IF ^^LETTER \\AND ^^KONECT
\\CANNOT EXCEED ZERO, THEN THE VALUES REPRESENTING 22 CHARACTERS CAN
BE PACKED INTO A SINGLE POSITIVE 36 BIT NUMBER ALTHOUGH THEN ONE OF
THE 3 POSSIBLE VALUES IN EACH BYTE IS WASTED SINCE THE AMPERSAND
WOULD NOT BE NECESSARY.
.LEFT MARGIN 5
.SKIP
.INDENT -3
D.#^THE ARGUMENT NAMED ^^IRESET \\HAS EITHER OF THE VALUES 2 OR 5
WHEN THIS ROUTINE IS FIRST CALLED. ^THESE ARE THE ONLY VALUES OF
^^IRESET \\WHICH INITIALIZE THE REST OF PLOT STORAGE IN LABELED
COMMON BLOCK ^^COMMON/FASPA/, \\BUT DO NOT MODIFY THE VALUES OF THE
FIRST 3 LOCATIONS. ^^IRESET \\CONTROLS THE FOLLOWING SELECTIVE
INITIALIZATION OF THE PLOT STORAGE IN ^^COMMON/FASPA/, \\OF THE
CHARACTER LIST IN ^^COMMON/FASPB/ \\AND OF THE CHARACTER DOMINANCE
RULES IN ^^COMMON/FASPC/.
.SKIP
.LEFT MARGIN 14
.INDENT -9
IRESET#=#0, \\THE ENTIRE PLOT STORAGE, THE CHARACTER LIST, AND THE
CHARACTER DOMINANCE RULES ARE NOT CHANGED.
.INDENT -2
=#1, THE ENTIRE PLOT STORAGE, THE CHARACTER LIST AND THE DOMINANCE
RULES ARE TO BE INITIALIZED.
.INDENT -2
=#2, THE CHARACTER LIST, THE CHARACTER DOMINANCE RULES, AND ALL BUT
THE FIRST THREE LOCATIONS IN THE PLOT STORAGE ARE TO BE INITIALIZED.
^THE FIRST THREE LOCATIONS IN THE PLOT STORAGE ARE NOT CHANGED.
.INDENT -2
=#3, THE CHARACTER LIST AND THE CHARACTER DOMINANCE RULES ARE TO BE
INITIALIZED. ^THE ENTIRE PLOT STORAGE IS NOT CHANGED.
.INDENT -2
=#4, THE ENTIRE PLOT STORAGE IS TO BE INITIALIZED. ^THE CHARACTER
LIST AND CHARACTER DOMINANCE RULES ARE NOT CHANGED.
.INDENT -2
=#5, ALL BUT THE FIRST THREE LOCATIONS IN THE PLOT STORAGE ARE TO BE
INITIALIZED. ^THE CHARACTER LIST, THE CHARACTER DOMINANCE RULES AND
THE FIRST THREE LOCATIONS IN THE PLOT STORAGE ARE NOT CHANGED.
.SKIP
.LEFT MARGIN 0
^A PARTIALLY CONSTRUCTED PLOT CAN BE ADDED TO AND/OR BE DISPLAYED BY
ANOTHER PROGRAM IF
.SKIP
.LEFT MARGIN 5
.INDENT -3
A.#^^DAPLAT \\HAS BEEN CALLED WITH ITS ARGUMENT ^^IPLOT \\BEING
GIVEN EITHER OF THE VALUES -1 OR 1 SO THAT A DESCRIPTION OF THE PLOT
IS PRESERVED IN THE LABELED BLOCK ^^COMMON/FASPA/.
.SKIP
.INDENT -3
\B.#T\\HE ENTIRE CONTENTS OF ^^COMMON/FASPA/ \\ARE WRITTEN INTO A
BINARY FILE AFTER ^^DAPLAT \\RETURNS CONTROL TO THE CALLING PROGRAM.
^IF THE CHARACTER SET OR THE DOMINANCE RULES HAVE BEEN CHANGED, THEN
THE CONTENTS OF ^^COMMON/FASPB/ \\AND OF ^^COMMON/FASPC/ \\SHOULD
SIMILARLY BE WRITTEN INTO THE FILE.
.SKIP
.INDENT -3
C.#^THE SUBSEQUENT PROGRAM RESTORES THE CONTENTS OF THE COMMON BLOCK
OR BLOCKS, THEN DEFINES ^^IRESET \\TO BE 3 BEFORE ^^DAPLAT \I\S
\\FIRST CALLED IF ONLY THE CONTENTS OF ^^COMMON/FASPA/ \\HAVE BEEN
RESTORED, OR ELSE DEFINES ^^IRESET \\TO BE ZERO IF THE CONTENTS OF
^^COMMON/FASPB/ \\AND OF ^^COMMON/FASPC/ \\HAVE SIMILARLY BEEN
RESTORED.
.LEFT MARGIN 0
.SKIP 2
.TEST PAGE 5
.CENTER
^CHANGING THE ^CHARACTER ^SET ^USED FOR ^POINTS AND ^CURVES
.CENTER
-------- --- --------- --- ---- --- ------ --- ------
.SKIP
^THE LABELED BLOCK ^^COMMON/FASPB/ \\CONTAINS THE CHARACTERS WITH
WHICH ^^DAPLAT \\REPRESENTS POINTS AND CURVES. ^THIS COMMON BLOCK IS
DIMENSIONED AT 35, AND CONTAINS THE FOLLOWING CHARACTERS
.SKIP
.NOFILL
.TEST PAGE 8
      ^^COMMON/FASPB/LTRALL(35)
      DIMENSION LTRBGN(35)
      DATA LTRBGN/1H ,1H*,1H!,1H-,1H+,1H ,1H_&,1H*,1HA,1HB,
     1            1HC,1HD,1HE,1HF,1HG,1HH,1HI,1HJ,1HK,1HL,
     2            1HM,1HN,1HO,1HP,1HQ,1HR,1HS,1HT,1HU,1HV,
     3            1HW,1HX,1HY,1HZ,1H*/
      DO 1 I=1,35
    1 LTRALL(I)=LTRBGN(I)
.SKIP
.FILL
LTRALL(1) \\AND ^^LTRBGN(2) \\CONTAIN THE CARRIAGE CONTROL
CHARACTERS USED FOR ^^LINPRT=0 \\AND 1 RESPECTIVELY.
.SKIP
^^LTRALL(3) \\THROUGH ^^LTRALL(5) \\CONTAIN THE CHARACTERS USED FOR
VERTICAL GRID LINES, FOR HORIZONTAL GRID LINES, AND FOR GRID LINE
INTERSECTIONS RESPECTIVELY.
.SKIP
^^LTRALL(6) \\CONTAINS THE SPACE CHARACTER USED FOR THE BACKGROUND
OF THE PLOT. ^CHANGING THIS CHARACTER DOES NOT CHANGE THE SPACE
CHARACTER APPEARING AROUND THE SCALE NUMBERS IN THE MARGINS.
.SKIP
^^LTRALL(7) \\CONTAINS THE AMPERSAND USED WHERE CURVES AND/OR POINTS
COINCIDE.
.SKIP
^^LTRALL(8) \\THROUGH ^^LTRALL(35) \\CONTAIN THE CHARACTERS USED FOR
^^LETTER \O\R KONECT=0 \\THROUGH ^^LETTER \O\R KONECT=27
\\RESPECTIVELY.
.SKIP
^THE DOMINANCE RULES FOR THE CHARACTERS IN ^^LTRALL(7) \\THROUGH AND
INCLUDING ^^LTRALL(35) \\ARE CONTAINED IN ^^COMMON/FASPC/.
.SKIP
.NOFILL
.TEST PAGE 6
      COMMON/FASPC/MASTER(29)
      MASTER(1)=1  !AMPERSAND DOMINANT OVER ALL BUT 2ND *
      MASTER(2)=-1 !NONDOMINANT ASTERISK
      DO 2 I=3,28
    2 MASTER(I)=0  !ALPHABETIC LETTERS ALL OF SAME DOMINANCE
      MASTER(29)=2 !DOMINANT ASTERISK
.SKIP
.FILL
W\\HEN CHARACTERS HAVING DIFFERENT VALUES IN THE ^^MASTER \\ARRAY
COINCIDE, THE CHARACTER HAVING THE LARGER VALUE IN THE ^^MASTER
\\ARRAY IS DOMINANT. ^IF THE VALUES ARE EQUAL, THEN THE CHARACTER AT
THAT POSITION IS CONVERTED TO AN AMPERSAND (OR TO WHATEVER HAPPENS
TO BE IN ^^LTRALL(7)).
.SKIP
I\\F EITHER THE CHARACTER LIST OR THE DOMINANCE RULES ARE TO BE
CHANGED, THEN EITHER A BLOCK DATA ROUTINE OR THE MAIN PROGRAM MUST
DEFINE BOTH THE ^^LTRALL \\AND ^^MASTER \\ARRAYS AND ^^DAPLAT \\MUST
BE CALLED THE FIRST TIME WITH ^^IRESET \\SET TO EITHER 4 OR 5
DEPENDING UPON WHETHER OR NOT ^^DAPLAT \\IS TO INITIALIZE THE FIRST
THREE LOCATIONS IN ^^COMMON/FASPA/.
.SKIP
I\F LETTER \\AND ^^KONECT \\ARE TO BE ALLOWED TO TAKE ON VALUES
GREATER THAN 27, THEN THE CALLING PROGRAM MUST ALLOCATE A
CORRESPONDINGLY LARGER ^^COMMON/FASPB/ \\AND ^^COMMON/FASPC/, \\MUST
ITSELF DEFINE THE FIRST THREE LOCATIONS IN ^^COMMON/FASPA/ \\AS WELL
AS THE ENTIRE CONTENTS OF ^^COMMON/FASPB/ \\AND OF ^^COMMON/FASPC/
\\BEFORE THIS ROUTINE IS FIRST CALLED, AND MUST CALL THIS ROUTINE
INITIALLY WITH ^^IRESET \\HAVING THE VALUE 5 TO PREVENT THE
REDEFINITION BY THIS ROUTINE OF ANY OF THIS INFORMATION.
.SKIP
^PLOTS ARE CONSTRUCTED USING THE CHARACTERS IN ^^COMMON/FASPB/
\\WHEN ^^DAPLAT \\IS CALLED HAVING THE ARGUMENT ^^IPLOT \\GREATER
THAN OR EQUAL TO ZERO. ^ONLY THE POSITION OF THE LETTERS WITHIN THE
COMMON BLOCK AS INDICATED BY THE VALUES OF ^^LETTER \\AND/OR
^^KONECT \\ARE USED WHEN STORING THE PLOT, SO THE SAME STORED CURVES
AND/OR POINTS CAN BE PLOTTED WITH DIFFERENT CHARACTER SETS BY
DIFFERENT CALLS TO ^^DAPLAT.
.FILL
.SKIP 2
.TEST PAGE 5
.CENTER
H\\IDDEN ^SWITCH USED TO ^ENABLE ^TIME ^SERIES ^PLOTS
.CENTER
------ ------ ---- -- ------ ---- ------ -----
.SKIP
^THIS SECTION DESCRIBES A FEATURE OF ^^DAPLAT \\WHICH ALLOWS ITS USE
FOR THE CONSTRUCTION OF TALL PLOTS FORMED OF SEGMENTS GENERATED ONE
PER EACH ^^DAPLAT \\CALL. ^THIS FEATURE IS NOT MEANT FOR THE CASUAL
USER, BUT IS DESCRIBED SO THAT THE TOTAL INTERFACE PRESENTED BY
^^DAPLAT \\TO ALL OTHER PROGRAMS IS DOCUMENTED.
.SKIP
^THE HIDDEN SWITCH IS MERELY A 2 STATE, ON/OFF CONDITION ENABLED BY
THE SIGN OF THE ARGUMENT ^^IGRID \\WHICH WOULD NOT LOGICALLY HAVE A
NEGATIVE VALUE. ^IF ^^IGRID \\IS LESS THAN ZERO, THEN 1 LESS THAN
ITS ABSOLUTE VALUE IS USED AS DESCRIBED IN THE PRECEDING PORTION OF
THIS MANUAL, AND THE BOTTOM LINE OF THE PLOT IS NOT REPRESENTED IN
THE PLOT. ^INSTEAD, AFTER THE PLOT HAS BEEN GENERATED, THE
CHARACTERS STORED FOR THE BOTTOM LINE REPLACE THOSE STORED FOR THE
TOP LINE AND THE REST OF THE PLOT STORAGE IS LEFT EMPTY.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING SAMPLE PLOTS DEMONSTRATE THE RESULTS OBTAINED BY THE
USE OF THE HIDDEN SWITCH. ^THE DOUBLE LINES AT THE TOPS OF THE LEFT
TWO PLOTS AND AT THE BOTTOM OF THE THIRD PLOT ARE MARGIN LINES WHICH
ARE VISIBLE SINCE THEY DO NOT COINCIDE WITH GRID LINES.
.SKIP
.LEFT MARGIN 3
.NOFILL
.TEST PAGE 13
   ^^IGRID=1        IGRID=-2       IGRID=1        IGRID=-2
   LINOFF=0       LINOFF=0       LINOFF=1       LINOFF=1
.SKIP
   !       !      !       ! 2.3 -+---+---+ 2.3 -+---+---+
2 -+---+---+   2 -+---+---+      !       !      !       !
   !       !      !       !      !       !      !       !
   !       !      !       ! 1.3 -+   +   + 1.3 -+   +   +
1 -+   +   +   1 -+   +   +      !       !      !       !
   !       !      !       !      !       !      !       !
   !       !      !       ! 0.3 -+---+---+ 0.3 -+---+---+
0 -+---+---+                     !       !
   !   !   !                     !   !   !
  100 200 300                   100 200 300
.LEFT MARGIN 0
.FILL
.SKIP 2
.TEST PAGE 5
.LEFT MARGIN 0
.PAGE
.CENTER
R\\ATIONALIZATION OF ^PLOT ^SCALES
.CENTER
--------------- -- ---- ------
.SKIP
^THE PROPORTIONS OF THE GRID SUPERIMPOSED UPON THE PLOT AREA BY THE
^^DAPLAT \\ROUTINE MUST BE SPECIFIED BY THE CALLING PROGRAM. ^THE
NUMBERS WHICH ARE PRINTED BESIDE AND BELOW THE PLOT MERELY REPRESENT
THE DATA UNIT COORDINATES PLOTTED AT THE CENTERS OF THE COLUMNS AND
LINES WHICH BEAR GRID LINES. ^THE RANGE OF DATA UNIT COORDINATES
REPRESENTED BY THESE SCALES CAN BE DIFFICULT TO INTERPRET IF THE
CALLING PROGRAM HOLDS THE GRID PROPORTIONS CONSTANT WHILE ATTEMPTING
TO OBTAIN THE MAXIMUM RESOLUTION BY ADJUSTING THE MINIMUM AND
MAXIMUM COORDINATES TO SPREAD THE CURVES ACROSS THE FULL WIDTH OR
HEIGHT OF THE PLOT. ^^DAPLAT \\CANNOT ITSELF CALCULATE THE GRID
PROPORTIONS WHICH WOULD PRODUCE A MINIMUM NUMBER OF NONZERO DIGITS
IN EACH SCALE NUMBER. ^IF PREDETERMINED GRID SPACINGS AND OFFSETS
ARE NOT NECESSARY, THEN THE ROUTINE ^^DAGRID \\CAN BE CALLED ONCE
FOR EACH SCALE BEFORE THE DATA IS PLOTTED TO SELECT THE GRID
PROPORTIONS AND TO EXPAND THE COORDINATE RANGES SLIGHTLY TO GIVE
NEATER SCALE NUMBERS.
.SKIP
^IF ^^DAGRID \\IS USED TO RATIONALIZE THE HORIZONTAL SCALE, THEN THE
ARGUMENT LIST CAN BE STATED AS
.SKIP
.NOFILL
.TEST PAGE 8
      ^^SUBROUTINE DAGRID(JSTIFY,MAXWID,XLEFT ,XRIGHT,MSHWID,
     1    LTROFF)
.SKIP
.FILL
\\OR, IF THE ROUTINE IS USED TO RATIONALIZE THE VERTICAL SCALE, THEN
THE ARGUMENT LIST CAN INSTEAD BY STATED AS
.NOFILL
.SKIP
      ^^SUBROUTINE DAGRID(JSTIFY,MAXHIH,YLOWER,YUPPER,MSHHIH,
     1    LINOFF)
.FILL
.SKIP
T\\HE FIRST TWO ARGUMENTS, ^^JSTIFY \\AND ^^MAXWID, \\ARE USED ONLY
FOR INPUT AND ARE RETURNED UNCHANGED. ^THE NEXT TWO ARGUMENTS,
^^XLEFT \\AND ^^XRIGHT (\O\R YLOWER \\AND ^^YUPPER), \\ARE USED BOTH
FOR INPUT OF THE ORIGINAL RANGE AND FOR RETURNING THE MODIFIED
RANGE. ^THE FINAL TWO ARGUMENTS, ^^MSHWID \\AND ^^LTROFF (\O\R
MSHHIH \\AND ^^LINOFF), \\ARE USED ONLY FOR RETURNING A DESCRIPTION
OF THE GRID TO THE CALLING PROGRAM AND THEIR INPUT VALUES ARE
IGNORED. ^THESE ARGUMENTS ARE DEFINED AS FOLLOW.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^JSTIFY#=#-2, \\A GRID LINE IS TO BE INCLUDED IN THE LEFT COLUMN
(OR BOTTOM LINE) OF THE PLOT WHICH WOULD BE PRODUCED BY ^^DAPLAT.
.INDENT -2
=#-1, \\THE DATA UNIT COORDINATE REPRESENTED BY THE VALUE OF ^^XLEFT
(\O\R YLOWER) \\IS TO BE SHOWN IN THE LEFT COLUMN (OR BOTTOM LINE)
OF THE PLOT WHICH WOULD BE PRODUCED BY ^^DAPLAT.
.INDENT -2
=#0, \\THE DATA UNIT COORDINATE RANGE REPRESENTED BY THE VALUES OF
^^XLEFT \\AND ^^XRIGHT (\O\R YLOWER \\AND ^^YUPPER) \\IS TO BE
CENTERED IN THE PLOT WHICH WOULD BE PRODUCED BY ^^DAPLAT.
.INDENT -9
.INDENT -2
=#1, \\THE DATA UNIT COORDINATE REPRESENTED BY THE VALUE OF ^^XRIGHT
(\O\R YUPPER) \\IS TO BE SHOWN IN THE RIGHT COLUMN (OR TOP LINE) OF
THE PLOT WHICH WOULD BE PRODUCED BY ^^DAPLAT.
.INDENT -2
=#2, \\A GRID LINE IS TO BE INCLUDED IN THE RIGHT COLUMN (OR TOP
LINE) OF THE PLOT WHICH WOULD BE PRODUCED BY ^^DAPLAT.
.SKIP
.INDENT -9
MAXWID#=#\\WIDTH (OR HEIGHT) OF THE PLOT STATED AS THE NUMBER OF
COLUMNS (OR LINES). ^^MAXWID \\SHOULD NOT BE INPUT CONTAINING A ZERO
OR NEGATIVE VALUE.
.SKIP
.INDENT -9
^^XLEFT##=#\\INPUT CONTAINING THE DATA UNIT COORDINATE TO BE
REPRESENTED BY THE CENTER OF THE LEFT COLUMN (OR BOTTOM LINE) OF
PLOT. ^THIS SHOULD BE THE SMALLEST DATA UNIT COORDINATE TO BE
REPRESENTED IF THE SCALE INCREASES TOWARD THE RIGHT (OR TOP) SINCE
^^DAGRID \\ALLOWS COMPUTATION ERRORS WHICH PLACE THE RETURNED
LIMITING DATA UNIT COORDINATES INTO THE OUTER HALVES OF THE
OUTERMOST COLUMNS (OR LINES).
.INDENT -2
=#RETURNED CONTAINING THE DATA UNIT COORDINATE WHICH WOULD GIVE A
RATIONAL SCALE IF REPRESENTED BY THE CENTER OF THE LEFT COLUMN (OR
OF THE BOTTOM LINE) OF THE PLOT.
.SKIP
.INDENT -9
^^XRIGHT#=#\\INPUT CONTAINING THE DATA UNIT COORDINATE TO BE
REPRESENTED BY THE CENTER OF THE RIGHT COLUMN (OR TOP LINE) OF THE
PLOT. ^THIS SHOULD BE THE LARGEST DATA UNIT COORDINATE TO BE
REPRESENTED IF THE SCALE INCREASES TOWARD THE RIGHT (OR TOP).
.INDENT -2
=#RETURNED CONTAINING THE DATA UNIT COORDINATE WHICH WOULD GIVE A
RATIONAL SCALE IF REPRESENTED BY THE CENTER OF THE RIGHT COLUMN (OR
OF THE TOP LINE) OF THE PLOT.
.FILL
.RIGHT MARGIN 60
.LEFT MARGIN 0
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^MSHWID#=#\\RETURNED CONTAINING THE GRID DIVISION WIDTH (OR HEIGHT)
STATED AS THE NUMBER OF COLUMNS (OR LINES) WHICH WOULD GIVE A
RATIONAL SCALE. ^^MSHWID \\IS RETURNED CONTAINING 1 MORE THAN THE
NUMBER OF COLUMNS (OR LINES) BETWEEN SUCCESSIVE COLUMNS (OR LINES)
WHICH SHOULD BEAR GRID LINES.
.INDENT -2
=#0, RETURNED IF THIS ROUTINE COULD NOT RATIONALIZE THE SCALE. ^THIS
COULD HAPPEN IF EITHER THE DATA UNIT COORDINATE RANGE OR THE WIDTH
OF THE PLOT IS TOO SMALL.
.SKIP
.INDENT -9
^^LTROFF#=#\\RETURNED CONTAINING THE NUMBER OF COLUMNS (OR LINES) BY
WHICH THE LEFT (OR BOTTOM) GRID LINE SHOULD BE OFFSET FROM THE LEFT
(OR BOTTOM) EDGE OF THE PLOT TO GIVE A RATIONAL SCALE.
.PAGE
.LEFT MARGIN 0
.CENTER
^AN ^EXAMPLE OF THE ^USE OF ^^DAGRID
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE FOLLOWING DEMONSTRATION PROGRAM ASKS THE USER TO TYPE THE PLOT
WIDTH AND THE LIMITING DATA UNIT COORDINATES, THEN CALLS ^^DAPLAT
\\TO DISPLAY SCALES FOR EACH OF THE POSSIBLE VALUES OF ^^JSTIFY. A
\\TYPICAL DIALOG BETWEEN THE PROGRAM AND ITS USER IS SHOWN AFTER THE
LISTING OF THE PROGRAM.
.SKIP
.NOFILL
^^C     PROGRAM TO DEMONSTRATE DAGRID ROUTINE
      DIMENSION XPOINT(2),YPOINT(2)
      DATA YPOINT/0.0,0.0/
      DATA ITTY,JTTY/5,5/
      DIMENSION EXAMPL(20)
      IRESET=1
    1 WRITE(JTTY,2)
    2 FORMAT(7H WIDTH ,$)
      READ(ITTY,3)MAXWID
    3 FORMAT(I)
      IF(MAXWID.LE.0)MAXWID=51
      WRITE(JTTY,4)
    4 FORMAT(7H RANGE ,$)
      READ(ITTY,5)XLEFT,XRIGHT
    5 FORMAT(2F)
      XPOINT(1)=XLEFT
      XPOINT(2)=XRIGHT
      JSTIFY=-2
    6 CALL DAGRID(JSTIFY,MAXWID,XLEFT,XRIGHT,MSHWID,LTROFF)
      IF(MSHWID.LE.0)GO TO 1
      IF(JSTIFY.EQ.-2)WRITE(JTTY,7)XLEFT,XRIGHT,MSHWID,
     1LTROFF
      IF(JSTIFY.EQ.-1)WRITE(JTTY,8)XLEFT,XRIGHT,MSHWID,
     1LTROFF
      IF(JSTIFY.EQ.0)WRITE(JTTY,9)XLEFT,XRIGHT,MSHWID,
     1LTROFF
      IF(JSTIFY.EQ.1)WRITE(JTTY,10)XLEFT,XRIGHT,MSHWID,
     1LTROFF
      IF(JSTIFY.EQ.2)WRITE(JTTY,11)XLEFT,XRIGHT,MSHWID,
     1LTROFF
    7 FORMAT(1X/22H LEFT JUSTIFIED GRID  ,2E14.6,2I3)
    8 FORMAT(1X/22H LEFT JUSTIFIED RANGE ,2E14.6,2I3)
    9 FORMAT(1X/22H CENTERED RANGE       ,2E14.6,2I3)
   10 FORMAT(1X/22H RIGHT JUSTIFIED RANGE,2E14.6,2I3)
   11 FORMAT(1X/22H RIGHT JUSTIFIED GRID ,2E14.6,2I3)
      CALL DAPLAT(0,MAXWID,1,0,0,
     1XPOINT,YPOINT,1,2,XLEFT,0.0,XRIGHT,
     21.0,0,2,5,MSHWID,1,LTROFF,
     30,0,5,IRESET,LTRERR,LINERR)
      IF(JSTIFY.GT.1)GO TO 1
      XLEFT=XPOINT(1)
      XRIGHT=XPOINT(2)
      JSTIFY=JSTIFY+1
      GO TO 6
      END
.PAGE
WIDTH 51
RANGE -27 79
.SKIP
LEFT JUSTIFIED GRID   -0.500000E+02  0.888889E+02  9  0
     +-------***************************************---+
     !        !        !        !        !        !
    -50      -25       0       25       50       75
.SKIP
LEFT JUSTIFIED RANGE  -0.272727E+02  0.863636E+02 11  1
     ************************************************--+
      !          !          !          !          !
     -25         0         25         50         75
.SKIP
CENTERED RANGE        -0.318182E+02  0.818182E+02 11  3
     +-************************************************+
        !          !          !          !          !
       -25         0         25         50         75
.SKIP
RIGHT JUSTIFIED RANGE -0.340909E+02  0.795455E+02 11  4
     +--************************************************
         !          !          !          !          !
        -25         0         25         50         75
.SKIP
RIGHT JUSTIFIED GRID  -0.388889E+02  0.100000E+03  9  5
     +---***************************************-------+
          !        !        !        !        !        !
         -25       0       25       50       75       100
WIDTH 51
RANGE 112 18
.SKIP
LEFT JUSTIFIED GRID    0.125000E+03  0.113636E+02 11  0
     +-----******************************************--+
     !          !          !          !          !
    125        100        75         50         25
.SKIP
LEFT JUSTIFIED RANGE   0.112000E+03  0.120000E+02  5  1
     ************************************************--+
      !    !    !    !    !    !    !    !    !    !
     110  100  90   80   70   60   50   40   30   20
.SKIP
CENTERED RANGE         0.116000E+03  0.160000E+02  5  3
     +-************************************************+
        !    !    !    !    !    !    !    !    !    !
       110  100  90   80   70   60   50   40   30   20
.SKIP
RIGHT JUSTIFIED RANGE  0.118000E+03  0.180000E+02  5  4
     +--************************************************
         !    !    !    !    !    !    !    !    !    !
        110  100  90   80   70   60   50   40   30   20
.SKIP
RIGHT JUSTIFIED GRID   0.113636E+03  0.000000E+00 11  6
     +******************************************-------+
           !          !          !          !          !
          100        75         50         25          0
.SUBTITLE ^^DARANK, R\\ETURNS ^SORTED ^INTEGERS ^EXCLUDING ^DUPLICATES
.PAGE
.NOFILL
^^DDDDD          AAA  RRRRRR          AAA  NN    NN  KK   KK
DD   DD       AAAA  RR    RR       AAAA  NNN   NN  KK  KK
DD    DD     AA AA  RR    RR      AA AA  NNNN  NN  KK KK
DD    DD    AA  AA  RRRRRR       AA  AA  NN NN NN  KKKKK
DD    DD   AAAAAAA  RR  RR      AAAAAAA  NN  NNNN  KKK KK
DD   DD   AA    AA  RR   RR    AA    AA  NN   NNN  KK   KK
DDDDD    AA     AA  RR    RR  AA     AA  NN    NN  KK    KK
.SKIP 2
.CENTER
DARANK, R\\ETURNS ^SORTED ^INTEGERS ^EXCLUDING ^DUPLICATES
.CENTER
------##------- ------ -------- --------- ----------
.FILL
.SKIP
^A SINGLE CALL TO ^^DARANK \\INTERPRETS AN ARRAY READ BY THE CALLING
PROGRAM WITH A MULTIPLE OF AN ^A1 FORMAT AND RETURNS THE DECIMAL
INTEGER VALUES REPRESENTED BY THIS ARRAY. ^THE RETURNED VALUES ARE
SORTED INTO EITHER INCREASING OR DECREASING ORDER AND DO NOT INCLUDE
DUPLICATE VALUES. ^IF MORE VALUES ARE REPRESENTED THAN CAN BE STORED
IN THE ARRAY PROVIDED BY THE CALLING PROGRAM FOR RETURNING THESE
VALUES, THEN EITHER THE SMALLEST OR THE LARGEST VALUES CAN BE
DISCARDED.
.SKIP
^NUMBERS CAN BE SEPARATED BY SPACES, BY TAB CHARACTERS AND/OR BY
COMMAS. ^EXCESS COMMAS ARE IGNORED AND DO NOT INDICATE EITHER
MISSING OR ZERO VALUES. ^THE EVALUATION IS TERMINATED WHEN A
SEMICOLON IS FOUND WITHIN THE CONTENTS OF THE INPUT TEXT BUFFER OR
ELSE WHEN ALL OF THE CHARACTERS WITHIN THE INPUT TEXT BUFFER HAVE
BEEN INTERPRETED. ^AN EXCLAMATION POINT AND ANY CHARACTERS TO ITS
RIGHT ARE TAKEN TO FORM A COMMENT AND ARE OTHERWISE IGNORED. ^AN
AMPERSAND AND ANY CHARACTERS TO ITS RIGHT ARE SIMILARLY IGNORED, BUT
THE CALLING PROGRAM IS INFORMED THAT AN AMPERSAND WAS FOUND SO THAT
THE CALLING PROGRAM CAN READ NEW TEXT INTO THE INPUT BUFFER BEFORE
CALLING THIS ROUTINE AGAIN TO CONTINUE THE EVALUATION.
.SKIP
^THE REPRESENTATION OF A NUMBER CAN CONTAIN LEADING SIGN, EMBEDDED
DECIMAL POINT AND/OR TRAILING LETTER ^E WITH POSSIBLY SIGNED
EXPONENT. ^A PERCENT SIGN FOLLOWING THE NUMBER IMPLIES ^E-2,
TRAILING LETTER ^K IMPLIES ^E3 AND TRAILING LETTER ^M IMPLIES ^E6.
^TO BE RECOGNIZED AS PART OF A NUMBER, THE PERCENT SIGN OR LETTER ^K
OR ^M OR ^E MUST FOLLOW EITHER A SIGN OR A DIGIT OR A DECIMAL POINT,
OTHERWISE THE PERCENT SIGN OR LETTER ^K OR ^M OR ^E WILL BE AN
UNKNOWN CHARACTER.
.SKIP
^TWO VERSIONS OF THIS ROUTINE ARE SUPPLIED. ^THE LONGER VERSION,
NAMED ^^DARANK, \\REQUIRES THAT THE ROUTINES ^^DANEXT, DASPAN \\AND
^^DAHEFT \\BE LOADED TO ALLOW THE EVALUATION OF RANGES SPECIFIED IN
EITHER SLASH, COLON OR ASTERISK NOTATIONS. ^THE SHORTER VERSION,
NAMED ^^DAIRNK, \\TREATS THE SLASH, COLON AND ASTERISK CHARACTERS
THE SAME AS ANY OTHER UNKNOWN CHARACTERS, BUT ONLY REQUIRES THAT THE
ADDITIONAL ROUTINES ^^DAMISS \\AND ^^DAHEFT \\BE LOADED.
.SKIP
^THE RANGE SPECIFICATIONS ACCEPTED BY THE LONGER VERSION OF THIS
ROUTINE ARE WRITTEN AS A LOWER BOUND, INCREMENT AND UPPER BOUND
SEPARATED BY SLASHES OR BY COLONS (THE 2 CHARACTERS ARE EQUIVALENT).
^IF THE INCREMENT IS TO BE ONE, THEN THE LOWER AND UPPER BOUNDS NEED
BE SEPARATED ONLY BY A SINGLE SLASH OR BY A SINGLE COLON. ^IF EITHER
BOUND IS MISSING, IT IS ASSUMED TO BE ZERO. ^THE LOWER BOUND IS THE
FIRST NUMBER OF THE SERIES. ^THE SERIES CAN THEN EITHER INCREASE OR
DECREASE DEPENDING UPON WHETHER THE UPPER BOUND IS LESS THAN, EQUAL
TO, OR GREATER THAN THE LOWER BOUND. ^THE SIGN OF THE INCREMENT IS
CHANGED IF IT DOES NOT CONFORM TO THE RELATIVE VALUES OF THE BOUNDS.
^IF A RANGE IS SPECIFIED WHICH CONTAINS MORE VALUES THAN CAN BE
RETURNED TO THE CALLING PROGRAM, THEN THE PORTION OF THE RANGE WHICH
COULD CONTAIN ACCEPTABLE VALUES IS CALCULATED, SO THAT ALL VALUES
WITHIN THE ORIGINALLY SPECIFIED RANGE DO NOT HAVE TO BE INDIVIDUALLY
TESTED.
.SKIP
^THE LONGER VERSION OF THIS ROUTINE WILL ALSO ACCEPT A SINGLE VALUE
PRECEDED BY A NUMBER AND AN ASTERISK. ^THE ASTERISK NOTATION IS USED
BY OTHER ROUTINES IN ^^FASP \\TO INDICATE MULTIPLE APPEARANCES OF A
SINGLE VALUE, BUT THE INITIAL NUMBER IS IGNORED BY ^^DARANK \\OTHER
THAN TO DETERMINE THAT IT IS GREATER THAN ZERO. ^IF THE INITIAL
NUMBER IS NOT GREATER THAN ZERO, THEN THE VALUE FOLLOWING THE
SEPARATING ASTERISK IS NOT RETURNED TO THE CALLING PROGRAM.
.SKIP 2
.CENTER
^THE ^^DARANK \\AND ^^DAIRNK A\\RGUMENT ^LISTS
.CENTER
--- ------ --- ------ -------- -----
.SKIP
^THE ARGUMENT LISTS OF ROUTINES ^^DARANK \\AND ^^DAIRNK \\ARE
.SKIP
.NOFILL
      ^^SUBROUTINE DARANK(INCRES,IFTEST,MINMUM,MAXMUM,MINSTR,
     1    MAXSTR,IBUFFR,MAXBFR,LOWBFR,KIND  ,MAXUSD,ISTORE)
.SKIP
\\AND
.SKIP
      ^^SUBROUTINE DAIRNK(INCRES,IFTEST,MINMUM,MAXMUM,MINSTR,
     1    MAXSTR,IBUFFR,MAXBFR,LOWBFR,KIND  ,MAXUSD,ISTORE)
.SKIP
\\BOTH WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR),ISTORE(MAXSTR)
.SKIP
.FILL
T\\HE ARGUMENT LISTS OF THE 2 ROUTINES ARE IDENTICAL, WITH THE
EXCEPTION THAT ^^DAIRNK \\DOES NOT RECOGNIZE RANGE SPECIFICATIONS
AND SO WILL NOT RETURN ^^KIND \\CONTAINING THE VALUE 5 WHICH WOULD
INDICATE AN ILLEGAL RANGE SPECIFICATION.
.SKIP
^THE FOLLOWING ARGUMENTS ARE USED FOR INPUT AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^INCRES#=#\\SPECIFIES WHETHER THE RETURNED VALUES ARE TO BE SORTED
INTO DECREASING OR INCREASING ORDER, AND WHETHER IT IS THE SMALLER
OR THE LARGER VALUES WHICH ARE DISCARDED WHEN MORE VALUES ARE FOUND
THAN CAN BE RETURNED IN ^^ISTORE(MINSTR) \\THROUGH AND INCLUDING
^^ISTORE(MAXSTR).
.INDENT -2
=#1, \\THE RETURNED VALUES ARE TO BE SORTED INTO DECREASING ORDER
SUCH THAT ^^ISTORE(MINSTR) \\CONTAINS A VALUE GREATER THAN
^^ISTORE(MINSTR+1). I\\F MORE VALUES ARE FOUND THAN CAN BE RETURNED
IN THE AVAILABLE PORTION OF THE ^^ISTORE \\ARRAY, THEN THE SMALLER
VALUES ARE DISCARDED.
.INDENT -2
=#2, THE RETURNED VALUES ARE TO BE SORTED INTO DECREASING ORDER SUCH
THAT ^^ISTORE(MINSTR) \\CONTAINS A VALUE GREATER THAN
^^ISTORE(MINSTR+1). I\\F MORE VALUES ARE FOUND THAN CAN BE RETURNED
IN THE AVAILABLE PORTION OF THE ^^ISTORE \\ARRAY, THEN THE LARGER
VALUES ARE DISCARDED.
.INDENT -2
=#3, THE RETURNED VALUES ARE TO BE SORTED INTO INCREASING ORDER SUCH
THAT ^^ISTORE(MINSTR) \\CONTAINS A VALUE SMALLER THAN
^^ISTORE(MINSTR+1). I\\F MORE VALUES ARE FOUND THAN CAN BE RETURNED
IN THE AVAILABLE PORTION OF THE ^^ISTORE \\ARRAY, THEN THE SMALLER
VALUES ARE DISCARDED.
.INDENT -2
=#4, THE RETURNED VALUES ARE TO BE SORTED INTO INCREASING ORDER SUCH
THAT ^^ISTORE(MINSTR) \\CONTAINS A VALUE SMALLER THAN
^^ISTORE(MINSTR+1). I\\F MORE VALUES ARE FOUND THAN CAN BE RETURNED
IN THE AVAILABLE PORTION OF THE ^^ISTORE \\ARRAY, THEN THE LARGER
VALUES ARE DISCARDED.
.SKIP
.INDENT -9
^^IFTEST#=#\\SPECIFIES WHETHER THE CALLING PROGRAM HAS SPECIFIED
MINIMUM AND/OR MAXIMUM LIMITS TO THE RANGE OF ACCEPTABLE VALUES.
^VALUES WHICH ARE SMALLER THAN THE MINIMUM LIMIT OR WHICH ARE
GREATER THAN THE MAXIMUM LIMIT ARE DISCARDED IF THESE LIMITS ARE
SPECIFIED.
.INDENT -2
=#-2 OR 2, THERE ARE NO MINIMUM AND MAXIMUM LIMITS TO THE RANGE OF
ACCEPTABLE VALUES.
.INDENT -2
=#-1, VALUES WHICH ARE SMALLER THAN THE VALUE OF THE ARGUMENT NAMED
^^MINMUM \\ARE DISCARDED.
.INDENT -2
=#0, VALUES WHICH ARE SMALLER THAN THE VALUE OF THE ARGUMENT NAMED
^^MINMUM \\OR WHICH ARE GREATER THAN THE VALUE OF THE ARGUMENT NAMED
^^MAXMUM \\ARE DISCARDED. ^IF ^^MINMUM \\IS GREATER THAN ^^MAXMUM,
\\THEN NO VALUES WHATEVER WILL BE ACCEPTED.
.INDENT -2
=#1, VALUES WHICH ARE GREATER THAN THE VALUE OF THE ARGUMENT NAMED
^^MAXMUM \\ARE DISCARDED.
.SKIP
.INDENT -9
^^MINMUM#=#\\LOWER LIMIT OF THE RANGE OF ACCEPTABLE VALUES IF
^^IFTEST \\HAS EITHER OF THE VALUES -1 OR 0. ^^MINMUM \\IS IGNORED
IF ^^IFTEST \\HAS ANY VALUE OTHER THAN -1 OR 0.
.SKIP
.INDENT -9
^^MAXMUM#=#\\UPPER LIMIT OF THE RANGE OF ACCEPTABLE VALUES IF
^^IFTEST \\HAS EITHER OF THE VALUES 0 OR 1. ^^MAXMUM \\IS IGNORED IF
^^IFTEST \\HAS ANY VALUE OTHER THAN 0 OR 1.
.SKIP
.INDENT -9
^^MINSTR#=#\\SUBSCRIPT OF THE FIRST LOCATION IN THE ^^ISTORE \\ARRAY
INTO WHICH A VALUE CAN BE STORED IF THE ARGUMENT NAMED ^^KIND \I\S
\\INPUT CONTAINING A VALUE LESS THAN 3. ^IF ^^KIND \\IS INPUT
CONTAINING A VALUE OF 3 OR GREATER, THEN ^^ISTORE(MINSTR) \\THROUGH
AND INCLUDING ^^ISTORE(MAXUSD) \\ARE ASSUMED TO CONTAIN A GROUP OF
INTEGER VALUES WHICH WERE RETURNED BY A PREVIOUS CALL TO THIS
ROUTINE SORTED IN THE SAME DIRECTION AS CURRENTLY REQUESTED AND
WHICH ARE TO BE MERGED WITH THE VALUES FOUND BY THE CURRENT CALL TO
THIS ROUTINE.
.SKIP
.INDENT -9
^^MAXSTR#=#\\SUBSCRIPT OF THE FINAL LOCATION IN THE ^^ISTORE \\ARRAY
INTO WHICH A VALUE CAN BE STORED. ^THIS ROUTINE DOES NOT REPORT
WHETHER MORE VALUES WERE FOUND THAN CAN BE RETURNED IN THE AVAILABLE
PORTION OF THE ^^ISTORE \\ARRAY. ^IF THE USER IS TO BE WARNED BY THE
CALLING PROGRAM THAT SOME VALUES WERE DISCARDED, THEN THE CALLING
PROGRAM SHOULD ALLOCATE AT LEAST ONE MORE LOCATION IN THE ^^ISTORE
\\ARRAY THAN IS EXPECTED TO BE NECESSARY. ^THE CALLING PROGRAM COULD
THEN WARN THE USER THAT VALUES HAVE BEEN DISCARDED IF ^^MAXUSD \I\S
\\RETURNED SET EQUAL TO ^^MAXSTR.
.SKIP
.INDENT -9
IBUFFR#=#\\INPUT BUFFER ARRAY CONTAINING CHARACTERS TYPED BY THE
USER, READ BY A MULTIPLE OF AN ^A1 FORMAT, WHICH IS TO BE SEARCHED
FOR THE REPRESENTATIONS OF NUMBERS. ^^IBUFFR \\THEN CONTAINS 1
CHARACTER PER COMPUTER STORAGE LOCATION.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE FINAL (RIGHTMOST) LOCATION IN THE
^^IBUFFR \\ARRAY WHICH CAN BE SEARCHED FOR THE REPRESENTATION OF A
NUMBER.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED BOTH FOR INPUT TO THIS ROUTINE AND
FOR OUTPUT TO THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LOWBFR#=#\\INPUT CONTAINING THE SUBSCRIPT WITHIN THE ^^IBUFFR
\\ARRAY OF THE FIRST (LEFTMOST) CHARACTER WHICH CAN BE SCANNED FOR
THE REPRESENTATION OF A NUMBER. ^^LOWBFR \\IS RETURNED POINTING
BEYOND THE END OF THE BUFFER IF NO PRINTING CHARACTERS OTHER THAN
COMMAS APPEAR IN ADDITION TO THE NUMBERS IN THE BUFFER, OR IF EITHER
AN EXCLAMATION POINT OR AN AMPERSAND IS ENCOUNTERED. ^IF A SEMICOLON
IS FOUND, THEN ^^LOWBFR \\IS RETURNED POINTING TO THE CHARACTER TO
THE RIGHT OF THE SEMICOLON. ^IF AN UNKNOWN CHARACTER IS FOUND, THEN
^^LOWBFR \\IS RETURNED POINTING TO THE UNKNOWN CHARACTER AND MUST BE
INCREMENTED BY THE CALLING PROGRAM BEFORE THIS ROUTINE IS CALLED
AGAIN TO CONTINUE THE EVALUATION OF THE REMAINING CONTENTS OF THE
^^IBUFFR \\ARRAY. ^THE CALLING PROGRAM MUST RESET ^^LOWBFR \T\O
\\POINT TO THE FIRST CHARACTER IN THE BUFFER EACH TIME A NEW LINE OF
TEXT IS READ.
.SKIP
.INDENT -9
^^KIND###=#\\SHOULD BE SET TO ZERO BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS FIRST CALLED TO RETURN A NEW GROUP OF SORTED
INTEGERS. ^^KIND \\IS RETURNED DESCRIBING THE REASON FOR WHICH
CONTROL HAS BEEN TRANSFERRED BACK TO THE CALLING PROGRAM. ^^KIND
\\SHOULD BE SENT TO THE SUBSEQUENT CALL TO THIS ROUTINE UNCHANGED IF
ADDITIONAL VALUES ARE TO BE SEARCHED FOR FOLLOWING AN ERROR, OR IF
AN AMPERSAND HAS DIRECTED THAT THE CALLING PROGRAM READ NEW TEXT
INTO THE INPUT BUFFER. ^THIS ROUTINE WILL RESET ^^MAXUSD \\TO HAVE
THE VALUE ^^MINSTR-1 \I\F KIND \\IS INPUT CONTAINING A VALUE LESS
THAN 3. ^^MAXUSD \\WILL BE LEFT UNCHANGED, AND NEW VALUES WILL BE
MERGED WITH THE PREVIOUSLY SORTED VALUES IN ^^ISTORE(MINSTR)
\\THROUGH AND INCLUDING ^^ISTORE(MAXUSD) \I\F KIND \\IS INPUT
CONTAINING A VALUE OF 3 OR GREATER.
.INDENT -2
=#1, RETURNED IF NO PRINTING CHARACTERS OTHER THAN COMMAS APPEAR IN
ADDITION TO THE NUMBERS IN THE INPUT BUFFER, OR IF AN EXCLAMATION
POINT IS FOUND TO THE RIGHT OF THE NUMBERS AND/OR COMMAS. ^IF AN
EXCLAMATION POINT IS FOUND, THEN THE CHARACTERS TO THE RIGHT OF THE
EXCLAMATION POINT ARE ASSUMED TO FORM A COMMENT AND ARE NOT
EVALUATED AND ^^LOWBFR \\IS RETURNED CONTAINING ^^MAXBFR+1. T\H\E
\\CALLING PROGRAM SHOULD READ A NEW LINE OF TEXT INTO THE INPUT
BUFFER AND RESET ^^LOWBFR \\TO POINT TO THE FIRST CHARACTER IN THE
NEW TEXT BEFORE AGAIN CALLING THIS OR ANY OTHER ROUTINE IN ^^FASP.
I\\F THIS ROUTINE IS CALLED AGAIN WITHOUT THE CALLING PROGRAM HAVING
FIRST CHANGED THE VALUE OF ^^KIND \\TO HAVE A VALUE OF 3 (OR
GREATER), THEN ^^MAXUSD \\WILL BE RESET TO ^^MINSTR-1 \\BEFORE ANY
NEW VALUES ARE SEARCHED FOR, AND ANY VALUES ALREADY IN THE ^^ISTORE
\\ARRAY WILL BE DISCARDED. ^IF THE SUBSEQUENT CALL TO THIS ROUTINE
IS INSTEAD TO CONTINUE THE MERGING OF THE NEW VALUES WITH THOSE
PREVIOUSLY FOUND, THEN THE CALLING PROGRAM SHOULD REST ^^KIND \T\O
\\HAVE THE VALUE 3 (OR GREATER) BEFORE THIS ROUTINE IS AGAIN CALLED.
.INDENT -2
=#2, RETURNED IF A SEMICOLON IS FOUND TO THE RIGHT OF THE NUMBERS
AND/OR COMMAS IN THE INPUT TEXT BUFFER. ^^LOWBFR \\IS RETURNED
POINTING TO THE CHARACTER TO THE RIGHT OF THE SEMICOLON. ^IF THIS
ROUTINE IS CALLED AGAIN WITHOUT THE CALLING PROGRAM HAVING FIRST
CHANGED THE VALUE OF ^^KIND \\TO HAVE A VALUE OF 3 (OR GREATER),
THEN ^^MAXUSD \\WILL BE RESET TO ^^MINSTR-1 \\BEFORE ANY NEW VALUES
ARE SEARCHED FOR, AND ANY VALUES ALREADY IN THE ^^ISTORE \\ARRAY
WILL BE DISCARDED. ^IF THE SUBSEQUENT CALL TO THIS ROUTINE IS
INSTEAD TO CONTINUE THE MERGING OF THE NEW VALUES WITH THOSE
PREVIOUSLY FOUND, THEN THE CALLING PROGRAM SHOULD REST ^^KIND \T\O
\\HAVE THE VALUE 3 (OR GREATER) BEFORE THIS ROUTINE IS AGAIN CALLED.
.INDENT -2
=#3, RETURNED IF AN AMPERSAND WAS FOUND TO THE RIGHT OF THE NUMBERS
AND/OR COMMAS. ^THE CHARACTERS TO THE RIGHT OF THE AMPERSAND ARE
ASSUMED TO FORM A COMMENT AND ARE NOT EVALUATED. ^^LOWBFR \I\S
\\RETURNED CONTAINING ^^MAXBFR+1. T\\HE CALLING PROGRAM SHOULD READ
NEW TEXT INTO THE INPUT BUFFER AND RESET ^^LOWBFR \\TO POINT TO THE
FIRST CHARACTER OF THE NEW TEXT. ^IF THIS ROUTINE IS CALLED AGAIN
WITHOUT THE VALUE OF ^^KIND \\HAVING BEEN CHANGED, THEN ANY NEW
VALUES WHICH ARE FOUND WILL BE MERGED WITH THOSE ALREADY IN
^^ISTORE(MINSTR) \\THROUGH AND INCLUDING ^^ISTORE(MAXUSD).
.INDENT -2
=#4, \\RETURNED IF AN UNKNOWN CHARACTER WAS FOUND IN THE INPUT TEXT
BUFFER. ^^LOWBFR \\IS RETURNED POINTING TO THIS UNKNOWN CHARACTER
AND MUST BE INCREMENTED BY THE CALLING PROGRAM BEFORE THIS ROUTINE
IS CALLED AGAIN. ^THE LETTERS ^E, ^K AND ^M AND THE PERCENT SIGN ARE
UNKNOWN IF THESE DO NOT APPEAR WITHIN NUMBERS. ^THE ASTERISK, SLASH
AND COLON CHARACTERS ARE UNKNOWN TO ^^DAIRNK. I\\F THIS ROUTINE IS
CALLED AGAIN WITHOUT THE VALUE OF ^^KIND \\HAVING BEEN CHANGED, THEN
ANY NEW VALUES WHICH ARE FOUND WILL BE MERGED WITH THOSE ALREADY IN
^^ISTORE(MINSTR) \\THROUGH AND INCLUDING ^^ISTORE(MAXUSD).
.INDENT -2
=#5, \\RETURNED IF A RANGE SPECIFICATION WAS FOUND WHICH CONTAINS
TOO MANY ASTERISKS, TOO MANY SLASHES OR TOO MANY COLONS. ^^LOWBFR
\\IS RETURNED POINTING TO THE CHARACTER TO THE IMMEDIATE RIGHT OF
THE RANGE SPECIFICATION. ^^DAIRNK \\WOULD INSTEAD RETURN ^^KIND
\\CONTAINING THE VALUE 4 TO INDICATE AN UNKNOWN CHARACTER IF AN
ASTERISK, SLASH OR COLON WAS FOUND. ^IF THIS ROUTINE IS CALLED AGAIN
WITHOUT THE VALUE OF ^^KIND \\HAVING BEEN CHANGED, THEN ANY NEW
VALUES WHICH ARE FOUND WILL BE MERGED WITH THOSE ALREADY IN
^^ISTORE(MINSTR) \\THROUGH AND INCLUDING ^^ISTORE(MAXUSD).
.SKIP
.INDENT -9
MAXUSD#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE HIGHEST LOCATION
IN THE ^^ISTORE \\ARRAY USED FOR RETURNING THE SORTED VALUES. ^THE
FIRST VALUE FOUND BY THIS ROUTINE IS PLACED INTO ^^ISTORE(MINSTR)
\I\F KIND \\IS INPUT CONTAINING A VALUE LESS THAN 3, OR WILL BE
MERGED INTO THE SORTED NUMBERS ALREADY IN ^^ISTORE(MINSTR) \\THROUGH
AND INCLUDING ^^ISTORE(MAXUSD) \I\F KIND \\IS INPUT CONTAINING A
VALUE OF 3 OR GREATER INDICATING THAT THE PREVIOUS CALL TO THIS
ROUTINE HAS ALREADY BEGUN THE EVALUATION OF THE GROUP OF SORTED
NUMBERS.
.SKIP
.INDENT -9
^^ISTORE#=#\\ARRAY IN WHICH THE SORTED DECIMAL INTEGER VALUES ARE
RETURNED.
.LEFT MARGIN 0
.SKIP 2
.TEST PAGE 5
.CENTER
^AN ^EXAMPLE OF THE ^USE OF ^^DARANK
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE FOLLOWING DEMONSTRATION PROGRAM REPORTS THE VALUES REPRESENTED
BY THE TEXT TYPED BY THE USER. ^THE VALUES OF THE ARGUMENTS
^^INCRES, IFTEST, MINMUM \\AND ^^MAXMUM \\CAN BE SPECIFIED BY THE
USER WHEN THE PROGRAM IS STARTED OR WHENEVER A SEMICOLON IS
ENCOUNTERED IN THE TEXT BEING INTERPRETED. ^IF A ZERO IS TYPED FOR
THE VALUE OF ^^INCRES, \\THEN THE FORMER VALUES OF THESE ARGUMENTS
ARE ALL RETAINED UNCHANGED.
.SKIP
.NOFILL
      ^^DIMENSION ISTORE(100),IBUFFR(72),JBUFFR(72)
      DATA INCRES,IFTEST,MINMUM,MAXMUM,KIND,MAXBFR,MINSTR,
     1ITTY,JTTY/1,2,0,0,0,72,2,5,5/
      WRITE(JTTY,1)
    1 FORMAT(15H SIZE OF ARRAY ,$)
      READ(ITTY,4)MAXSTR
      MAXSTR=MINSTR+MAXSTR-1
      IF(MAXSTR.GT.99)MAXSTR=99
      ISTORE(MINSTR-1)=-999
      ISTORE(MAXSTR+1)=-999
      LOWBFR=MAXBFR+1
    2 WRITE(JTTY,3)
    3 FORMAT(29H INCRES,IFTEST,MINMUM,MAXMUM ,$)
      READ(ITTY,4)ISAVE,JSAVE,KSAVE,LSAVE
    4 FORMAT(4I)
      IF(ISAVE.LE.0)GO TO 11
      INCRES=ISAVE
      IFTEST=JSAVE
      MINMUM=KSAVE
      MAXMUM=LSAVE
      GO TO 11
C     OBTAIN NEW TEXT TO BE PROCESSED
    5 WRITE(JTTY,6)
    6 FORMAT(2H *,$)
      GO TO 9
    7 WRITE(JTTY,8)
    8 FORMAT(2H _&,$)
    9 READ(ITTY,10)IBUFFR
   10 FORMAT(72A1)
      LOWBFR=1
C     EVALUATE TEXT AND REPORT RESULTS
   11 CALL DARANK(INCRES,IFTEST,MINMUM,MAXMUM,MINSTR,
     1MAXSTR,IBUFFR,MAXBFR,LOWBFR,KIND  ,MAXUSD,ISTORE)
      IF(ISTORE(MINSTR-1).NE.-999)WRITE(JTTY,12)
      IF(ISTORE(MAXSTR+1).NE.-999)WRITE(JTTY,12)
   12 FORMAT(6H ERROR)
      IF(MAXUSD.LT.MINSTR)GO TO 15
      KOUNT=0
      DO 13 INDEX=MINSTR,MAXUSD
   13 CALL DANUMB(0,ISTORE(INDEX),10,JBUFFR,KOUNT,0,72)
      WRITE(JTTY,14)(JBUFFR(I),I=1,KOUNT)
   14 FORMAT(1X,72A1)
   15 GO TO(5,2,7,16,18),KIND
   16 WRITE(JTTY,17)IBUFFR(LOWBFR)
   17 FORMAT(19H ILLEGAL CHARACTER ,1A1)
      LOWBFR=LOWBFR+1
      GO TO 11
   18 WRITE(JTTY,19)
   19 FORMAT(14H ILLEGAL RANGE)
      GO TO 11
      END
.SKIP 2
.TEST PAGE 5
T\\YPICAL ^DIALOG ^BETWEEN ^USER AND ^^DARANK D\\EMONSTRATION ^PROGRAM
------- ------ ------- ---- --- ------ ------------- -------
.SKIP
^^SIZE OF ARRAY 10
INCRES,IFTEST,MINMUM,MAXMUM 3 0 -10 10
*-1001/5/1000
-6 -1 4 9
*-1000/5/1000
-10 -5 0 5 10
*-999/5/1000
-9 -4 1 6
*-998/5/1000
-8 -3 2 7
*-997/5/1000
-7 -2 3 8
*-996/5/1000
-6 -1 4 9
*-995/5/1000
-10 -5 0 5 10
*1001/5/-1000
-9 -4 1 6
*1000/5/-1000
-10 -5 0 5 10
*999/5/-1000
-6 -1 4 9
*998/5/-1000
-7 -2 3 8
*997/5/-1000
-8 -3 2 7
*996/5/-10000
-9 -4 1 6
*995/5/-1000;-50/10/50_&SEMICOLON INTERUPTS PROCESSING
-10 -5 0 5 10
INCRES,IFTEST,MINMUM,MAXMUM 3 2
-40 -30 -20 -10 0 10 20 30 40 50
_&-37-20+10-30,,-33_&CONTINUES GROUP AFTER SEMICOLON ABOVE
-33 -30 -20 -10 0 10 20 30 40 50
_&45+55_&
-20 -10 0 10 20 30 40 45 50 55
_&35 1000*5 *6 -3*6!LATTER 2 RANGES DON'T SPECIFY ANYTHING
0 5 10 20 30 35 40 45 50 55
.SUBTITLE ^^DARITE, F\\REE ^FORMAT ^^FORTRAN O\\UTPUT ^ROUTINE
.PAGE
.LEFT MARGIN 0
.RIGHT MARGIN 60
.NOFILL
^^DDDDDD         AAAA  RRRRRRR   IIIIII  TTTTTTTTTT  EEEEEEEEE
DD    DD      AA AA  RR     RR   II        TT      EE
DD     DD    AA  AA  RR     RR   II        TT      EE
DD     DD   AA   AA  RRRRRRR     II        TT      EEEEE
DD     DD  AAAAAAAA  RR  RR      II        TT      EE
DD    DD  AA     AA  RR   RR     II        TT      EE
DDDDDD   AA      AA  RR    RR  IIIIII      TT      EEEEEEEEE
.FILL
.SKIP 2
.CENTER
DARITE, F\\REE ^FORMAT ^^FORTRAN O\\UTPUT ^ROUTINE
.CENTER
------##---- ------ ------- ------ -------
.SKIP
^^DARITE \\REPRESENTS A VALUE SO THAT IT CAN BE WRITTEN WITH A
^^FORTRAN \\FORMAT STATEMENT CONTAINING A MULTIPLE ^A1 ALPHAMERIC
SPECIFICATION. ^THE VALUE CAN BE REPRESENTED EITHER WITH A SPECIFIED
NUMBER OF DIGITS RIGHT OF THE DECIMAL POINT AND WITH A MAXIMUM
NUMBER OF SIGNIFICANT DIGITS, OR IN SCIENTIFIC NOTATION AS A NUMBER
IN THE RANGE 1.0 TO 9.999... WITH A FOLLOWING EXPONENT. ^IF FLOATING
POINT NOTATION HAS BEEN REQUESTED, BUT THE NUMBER CANNOT FIT INTO
THE SUPPLIED FIELD WITH THE SPECIFIED NUMBER OF DIGITS RIGHT OF THE
DECIMAL POINT, THEN THE NUMBER OF DIGITS RIGHT OF THE DECIMAL POINT
WILL BE DECREASED, AND IF THE NUMBER WILL STILL NOT FIT, THEN
SCIENTIFIC NOTATION WILL BE USED. ^IF THE NUMBER WILL NOT FIT INTO
THE FIELD EVEN IN SCIENTIFIC NOTATION, THEN THE FIELD WILL BE FILLED
WITH ASTERISKS.
.SKIP
^THE REPRESENTATION OF THE NUMBER IS ROUNDED BASED UPON THE DIGIT
WHICH WOULD BE TO THE RIGHT OF THE RIGHTMOST DISPLAYED DIGIT. ^IF
THE DIGIT TO THE RIGHT OF THE RIGHTMOST DISPLAYED DIGIT IS 0 THROUGH
4, THEN THE DISPLAYED DIGITS ARE LEFT UNCHANGED. ^IF THE DIGIT TO
THE RIGHT OF THE RIGHTMOST DISPLAYED DIGIT IS 5 THROUGH 9, THEN THE
ABSOLUTE VALUE OF THE DISPLAYED VALUE IS INCREASED.
.SKIP 2
.CENTER
^THE ^^DARITE A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
.NOFILL
^THE ARGUMENT LIST OF ROUTINE ^^DARITE \I\S
.SKIP
      SUBROUTINE DARITE(VALUE ,JSTIFY,NOTATN,IPART ,ISIGN ,
     1    KLIP  ,IFILL ,IWIDTH,MINDEC,MAXDEC,MINSIG,MAXSIG,
     2    INIZRO,MARGIN,IDECML,IEXPNT,IFORMT,IZERO ,LFTCOL,
     3    MAXBFR,IBUFFR,KOUNT ,IERR  )
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR)
.FILL
.SKIP
T\\HE FOLLOWING ARE INPUT ARGUMENTS LEFT UNCHANGED
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^VALUE##=#\\THE NUMBER TO BE REPRESENTED
.SKIP
.INDENT -9
^^JSTIFY#=#-1, \\LEFT JUSTIFY THE REPRESENTATION OF THE VALUE IN A
FIELD OF WIDTH ^^IWIDTH.
.INDENT -3
#=#0, \\CENTER THE REPRESENTATION OF THE VALUE IN A FIELD OF WIDTH
^^IWIDTH.
.INDENT -3
#=#1, \\RIGHT JUSTIFY THE REPRESENTATION OF THE VALUE IN A FIELD OF
WIDTH ^^IWIDTH.
.SKIP
.INDENT -9
NOTATN#=#-1, \\REPRESENT IN ARRAY ^^IBUFFR \\THE VALUE IN SCIENTIFIC
NOTATION. ^THE VALUE 1234 WOULD BE REPRESENTED IN ^^IBUFFR \A\S
1.234E3
.INDENT -3
#=#0, \\REPRESENT IN ^^IBUFFR \\THE VALUE IN FLOATING POINT FORM.
^THE VALUE 1234.56 WOULD BE DISPLAYED AS IT IS WRITTEN IF THE NUMBER
OF DIGITS REQUESTED RIGHT OF THE DECIMAL POINT IS 2 AND IF AT LEAST
6 SIGNIFICANT DIGITS IN A FIELD OF AT LEAST 7 CHARACTERS ARE ALLOWED.
.INDENT -3
#=#1, MULTIPLY VALUE BY 100 AND INSERT THE PERCENT SIGN FOLLOWING
DIGITS OF NUMBER. ^^IWIDTH \\MUST INCLUDE ROOM FOR THIS PERCENT
SIGN. ^^MINDEC \\AND ^^MAXDEC \\REFER TO THE DISPLAYED DECIMAL
POINT. ^TO PRINT TENTHS OF A PERCENT, ^^MAXDEC \\WOULD BE GIVEN THE
VALUE 1, AND ^^MINDEC \\WOULD BE 1 OR LESS.
.INDENT -3
#=#2, IF THE VALUE IS IN RANGE 1000 TO 1000000, DIVIDE THE VALUE BY
1000 AND INSERT THE LETTER ^K FOLLOWING THE DIGITS. ^IF THE VALUE IS
1000000 OR GREATER, DIVIDE THE VALUE BY 1000000 AND INSERT THE
LETTER ^M FOLLOWING THE DIGITS. ^^IWIDTH \\MUST INCLUDE ROOM FOR THE
LETTER ^K OR ^^M. MINDEC \\AND ^^MAXDEC \\REFER TO THE DISPLAYED
DECIMAL POINT. ^^MINDEC \\AND ^^MAXDEC \\BOTH SET AT 2 WOULD
REPRESENT THE VALUE 1234 AS 1.23^K.
.INDENT -3
#=#3, SAME AS ^^NOTATN=2 \\EXCEPT THAT ^^MINDEC \\AND ^^MAXDEC
\\REFER TO THE DECIMAL POINT IN THE ORIGINAL VALUE, NOT TO THE
DECIMAL POINT IN THE DISPLAYED NUMBER. ^IF A ^K OR ^M IS DISPLAYED
RIGHT OF THE NUMBER, THEN ^^MINDEC \\AND ^^MAXDEC \\VALUES OF -1 ARE
EQUIVALENT TO VALUES OF 0. ^^MINDEC=-2 \\INDICATES THAT THERE IS NO
LOWER LIMIT TO THE NUMBER OF DIGITS TO THE RIGHT OF THE DISPLAYED
DECIMAL POINT, AND IS PROBABLY THE APPROPRIATE VALUE UNLESS IT IS
ABSOLUTELY NECESSARY TO DISPLAY THE DIGITS WHICH WOULD BE TO THE
RIGHT OF THE DECIMAL POINT IN THE ORIGINAL VALUE, AS FOR EXAMPLE IF
THE AMOUNTS ARE DOLLARS AND MUST BE DISPLAYED ALWAYS INCLUDING THE
CENTS DIGITS. ^THE VALUE 1234.56 WOULD BE REPRESENTED AS 1.23456^K
FOR ^^NOTATN=3 \\AND ^^MAXDEC=2.
.SKIP
.INDENT -9
IPART##=#-1, \\IF THE VALUE IS REPRESENTED IN FLOATING POINT FORM,
COMPLETELY REPRESENT THIS VALUE. ^IF THE VALUE IS REPRESENTED IN
SCIENTIFIC NOTATION, REPRESENT ONLY THE NORMALIZED PORTION OF THE
VALUE WITHOUT THE EXPONENT, IT BEING THIS NORMALIZED VALUE (IN THE
RANGE OF 1.0 TO 9.999...) WHICH IS LEFT JUSTIFIED, CENTERED OR RIGHT
JUSTIFIED ACCORDING TO THE VALUE OF ^^JSTIFY. IWIDTH \\MUST,
HOWEVER, CONTAIN SUFFICIENT ROOM FOR EITHER THE NORMALIZED VALUE OR
THE EXPONENT, WHICHEVER REQUIRES THE MOST CHARACTERS TO REPRESENT.
.INDENT -3
#=#0, COMPLETELY REPRESENT THE VALUE REGARDLESS OF WHETHER IN
FLOATING POINT OR SCIENTIFIC NOTATION.
.INDENT -3
#=#1, IF THE VALUE IS REPRESENTED IN FLOATING POINT FORM, INSERT
NOTHING (EXCEPT THE POSSIBLE TRAILING SPACES INDICATED BY ^^IFILL)
\\INTO ^^IBUFFR. I\\F THE VALUE IS REPRESENTED IN SCIENTIFIC
NOTATION, REPRESENT ONLY THE EXPONENT PORTION, IT BEING THIS
EXPONENT PORTION WHICH IS LEFT JUSTIFIED, CENTERED OR RIGHT
JUSTIFIED ACCORDING TO THE VALUE OF ^^JSTIFY. IWIDTH \\MUST,
HOWEVER, CONTAIN SUFFICIENT ROOM FOR EITHER THE NORMALIZED VALUE OR
THE EXPONENT, WHICHEVER REQUIRES THE MOST CHARACTERS TO REPRESENT.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^ISIGN##=#-1, \\IF THE VALUE IS GREATER THAN ZERO, AND IF ^^IPART
\\IS LESS THAN OR EQUAL TO ZERO, THEN PLACE A PLUS SIGN TO THE LEFT
OF THE REPRESENTATION OF THE VALUE. ^IF THE VALUE IS EQUAL TO ZERO,
DO NOT ADD AN EXTRA SPACE WHERE THE PLUS OR MINUS SIGN WOULD
OTHERWISE BE.
.INDENT -2
=#0, IF THE VALUE IS GREATER THAN OR EQUAL TO ZERO, DO NOT ADD AN
EXTRA SPACE WHERE THE MINUS SIGN WOULD OTHERWISE BE.
.INDENT -3
#=#1, IF THE VALUE IS GREATER THAN OR EQUAL TO ZERO, AND IF ^^IPART
\\IS LESS THAN OR EQUAL TO ZERO, THEN A SPACE WILL BE PLACED AT THE
LEFT END OF THE REPRESENTATION OF THE VALUE, WHERE THE MINUS SIGN
WOULD OTHERWISE BE, EVEN IF THE NUMBER OF DIGITS IN THE
REPRESENTATION MUST BE REDUCED TO MAKE ROOM FOR THIS SPACE.
.INDENT -2
=#2, IF THE VALUE IS GREATER THAN ZERO, AND IF ^^IPART \\IS LESS
THAN OR EQUAL TO ZERO, THEN PLACE A PLUS SIGN TO THE LEFT OF THE
REPRESENTATION OF THE VALUE. ^IF THE VALUE IS EQUAL TO ZERO, AND IF
^^IPART \\IS LESS THAN OR EQUAL TO ZERO, THEN PLACE AT LEAST 1 SPACE
AT THE LEFT END OF THE REPRESENTATION OF THE VALUE EVEN IF THE
NUMBER OF DIGITS IN THE REPRESENTATION MUST BE REDUCED TO MAKE ROOM
FOR THIS SPACE.
.SKIP
.INDENT -9
^^KLIP###=#-1, \\SUPPRESS REPRESENTATION OF ALL ZEROES WHICH ARE
BEYOND THE FIRST DIGIT AFTER THE DECIMAL POINT AND WHICH DO NOT HAVE
A NON-ZERO DIGIT TO THEIR RIGHT. ^IF CENTERING OR RIGHT JUSTIFYING,
IT IS THE NUMBER AFTER REMOVAL OF THE ZEROES WHICH IS CENTERED OR
RIGHT JUSTIFIED.
.INDENT -2
=#0, REPRESENT AS ZEROES ALL ZEROES WHICH ARE TO THE RIGHT OF THE
DECIMAL POINT.
.INDENT -2
=#1, CONVERT TO SPACES ALL ZEROES WHICH ARE BEYOND THE FIRST DIGIT
AFTER THE DECIMAL POINT AND WHICH DO NOT HAVE A NON-ZERO DIGIT TO
THEIR RIGHT. ^REMAINING CHARACTERS WILL BE IN THE SAME POSITIONS AS
IF THE ZEROES WHERE NONZEROES. ^IF ^^NOTATN \\IS GREATER THAN ZERO,
THEN SPACES CAN APPEAR BETWEEN THE NONSPACE CHARACTERS OF THE NUMBER
AND THE FOLLOWING PERCENT SIGN OR ^K OR ^M SINCE THE LOCATION OF
THESE PRINTING CHARACTERS IS NOT CHANGED BY THE CONVERSION OF THE
TRAILING ZEROES TO SPACES.
.INDENT -2
=#-2, SAME AS ^^KLIP=-1, \\EXCEPT THAT IF NO NON-ZERO DIGIT WOULD BE
REPRESENTED TO THE RIGHT OF THE DECIMAL POINT, THEN THE ZERO WHICH
WOULD BE IMMEDIATELY TO THE RIGHT OF THE DECIMAL POINT IS NOT
REPRESENTED. ^IF CENTERING OR RIGHT JUSTIFYING, IT IS THE NUMBER
AFTER REMOVAL OF THESE ZEROES WHICH IS CENTERED OR RIGHT JUSTIFIED.
.INDENT -2
=#-3, SAME AS ^^KLIP=-2, \\EXCEPT THAT IF NO NON-ZERO DIGIT WOULD BE
REPRESENTED TO THE RIGHT OF THE DECIMAL POINT, THEN THE DECIMAL
POINT IS NOT REPRESENTED EITHER. ^IF CENTERING OR RIGHT JUSTIFYING,
IT IS THE NUMBER AFTER REMOVAL OF THE DECIMAL POINT AND THE ZEROES
TO ITS RIGHT WHICH IS CENTERED OR RIGHT JUSTIFIED.
.INDENT -2
=#2, SAME AS ^^KLIP=1, \\EXCEPT THAT IF NO NON-ZERO DIGIT WOULD BE
REPRESENTED TO THE RIGHT OF THE RIGHT OF THE DECIMAL POINT, THEN THE
ZERO WHICH WOULD BE IMMEDIATELY TO THE RIGHT OF THE DECIMAL POINT IS
ALSO CONVERTED TO A SPACE. ^REMAINING CHARACTERS WILL BE IN THE SAME
POSITIONS AS IF THE ZEROES WERE NON-ZEROES.
.INDENT -2
=#3, SAME AS ^^KLIP=2, \\EXCEPT THAT IF NO NON-ZERO DIGIT WOULD BE
REPRESENTED TO THE RIGHT OF THE DECIMAL POINT, THEN THE DECIMAL
POINT IS ALSO CONVERTED TO A SPACE. ^CHARACTERS WHICH WOULD BE TO
THE LEFT OF THE DECIMAL POINT WILL BE IN THE SAME POSITIONS AS IF A
NON-ZERO DIGIT APPEARED TO THE RIGHT OF THE DECIMAL POINT.
.SKIP
^FOR EXAMPLE, THE REPRESENTATIONS OF THE VALUE 12.34 IN FLOATING
POINT WITH ^^MAXDEC=4 \\AND IN SCIENTIFIC NOTATION WITH ^^IDECML=5
\\WOULD BE
.SKIP
.NOFILL
.LEFT MARGIN 0
.TEST PAGE 3
              FOR ^^KLIP.LT.0      12.34        1.23E1
                  KLIP=0       12.3400     1.23400E1
                  KLIP=.GT.0   12.34       1.234  E1
.LEFT MARGIN 9
.SKIP
.FILL
T\\HE VALUE 123000 WOULD BE REPRESENTED AS SHOWN BELOW IF ^^NOTATN=2
.SKIP
.NOFILL
.LEFT MARGIN 14
.TEST PAGE 7
\\FOR ^^KLIP=-3       123K        1.23E5
    KLIP=-2      123.K        1.23E5
    KLIP=-1     123.0K        1.23E5
    KLIP=0   123.0000K     1.23000E5
    KLIP=1   123.0   K     1.23   E5
    KLIP=2   123.    K     1.23   E5
    KLIP=3   123     K     1.23   E5
.LEFT MARGIN 9
.SKIP
.FILL
.INDENT -9
IFILL##=#0, \\DO NOT FILL THE PORTION OF THE FIELD RIGHT OF THE
RIGHTMOST NONSPACE CHARACTER IN THE REPRESENTATION OF THE VALUE WITH
SPACES. ^^KOUNT \\WILL BE LEFT POINTING AT THE RIGHTMOST NONSPACE
CHARACTER IN THE REPRESENTATION OF THE VALUE. ^THE VALUE OF ^^IFILL
\\HAS NO EFFECT ON THE NONSPACE CHARACTERS IN THE REPRESENTATION OF
THE VALUE. ^IF ^^IFILL=0, \\AND IF ^^IPART \\IS LESS THAN OR EQUAL
TO ZERO, THEN THE CHARACTERS ORIGINALLY IN THE ^^IBUFFR \\ARRAY TO
THE RIGHT OF THE NONSPACE PORTION OF THE REPRESENTATION OF THE VALUE
ARE LEFT INTACT. (^THE REASON WHY ^^IPART \\WHEN GREATER THAN ZERO
IS AN EXCEPTION IS THAT THE NORMALIZED PORTION OF THE NUMBER MUST BE
TEMPORARILY STORED IN ^^IBUFFR \\EVEN IF IT IS NOT GOING TO BE
REPRESENTED SINCE POSSIBLE EXPONENT CHANGE DUE TO ROUNDING MUST BE
CHECKED FOR.)
.INDENT -3
#=#1, FILL THE FIELD RIGHT OF THE NONSPACE PORTION OF THE
REPRESENTATION OF THE VALUE WITH SPACES. ^^KOUNT \\WILL BE LEFT
POINTING AT ^^LFTCOL+IWIDTH.
.SKIP
.INDENT -9
IWIDTH#=#\\THE NUMBER OF CHARACTERS TO BE IN THE FIELD IN WHICH THE
VALUE IS REPRESENTED. ^^IWIDTH \\MUST INCLUDE ROOM FOR EXPONENT,
SIGN AND DECIMAL POINT IF THESE ARE NECESSARY TO REPRESENT THE VALUE.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS CONTROL THE FORMAT OF NUMBERS DISPLAYED IN
FLOATING POINT FORM (WITHOUT ^E EXPONENT), OR DISPLAYED WITH
FOLLOWING ^K, ^M OR PERCENT SIGN. ^THESE ARGUMENTS DO NOT CONTROL
THE FORMAT OF NUMBERS REPRESENTED IN SCIENTIFIC NOTATION (EITHER
WITH DISPLAYED EXPONENT OR WITH SUPPRESSED ZERO EXPONENT).
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^MINDEC#=#\\MINIMUM NUMBER OF DIGITS RIGHT OF THE DISPLAYED DECIMAL
POINT IN NUMBERS WHICH ARE DISPLAYED IN FLOATING POINT FORM. ^IF IT
WOULD BE NECESSARY TO REPRESENT LESS DIGITS RIGHT OF THE DECIMAL
POINT THAN INDICATED BY ^^MINDEC, \\THEN THE VALUE WILL BE
REPRESENTED IN SCIENTIFIC NOTATION INSTEAD. ^THE MAXIMUM NUMBER OF
DIGITS RIGHT OF THE DECIMAL POINT IS DETERMINED BY THE COMBINATION
OF ^^MAXDEC \\AND ^^MAXSIG.
.INDENT -2
=#-2, \\THERE IS NO LOWER LIMIT TO THE NUMBER OF DIGITS WHICH MUST
BE REPRESENTED RIGHT OF THE DECIMAL POINT, AND EVEN THE DECIMAL
POINT ITSELF NEED NOT BE REPRESENTED. ^^MINDEC=-1 \\IS EQUIVALENT TO
^^MINDEC=-2 \\UNLESS ^^NOTATN=3 \\WHILE ^^VALUE \\IS 1000 OR GREATER.
.INDENT -2
=#-1, IF ^^NOTATN \\IS NOT 3, OR IF ^^NOTATN \\IS 3 BUT THE VALUE
BEING REPRESENTED IS LESS THAN 1000, THEN ^^MINDEC=-1 \I\S
\\EQUIVALENT TO ^^MINDEC=-2 \\SUCH THAT THERE IS NO LOWER LIMIT TO
THE NUMBER OF DIGITS WHICH MUST BE REPRESENTED RIGHT OF THE DECIMAL
POINT, AND EVEN THE DECIMAL POINT ITSELF NEED NOT BE REPRESENTED.
.SKIP
^IF ^^NOTATN=3 \\AND ^^VALUE=1000 \\OR GREATER, THEN ^^MINDEC=-1
\\WOULD HAVE THE SAME EFFECT AS ^^MINDEC=0 \\SUCH THAT ALL DIGITS TO
THE LEFT OF THE DECIMAL POINT IN THE ORIGINAL UNSHIFTED VALUE (AS
REPRESENTED WITHOUT ^K OR ^M) MUST BE INCLUDED IN THE ACTUAL
REPRESENTATION OF THE VALUE EVEN WHEN THE ^K OR ^M IS INCLUDED.
^^MINDEC \\SHOULD HAVE THE VALUE -2 IF, IN ORDER TO FIT THE
REPRESENTATION INTO THE AVAILABLE FIELD WIDTH WHILE ^^NOTATN=3, \I\T
\\IS TO BE POSSIBLE THAT A VALUE WHICH IS EQUAL TO OR GREATER THAN
1000 BE REPRESENTED WITHOUT ALL OF THE DIGITS WHICH WOULD BE TO THE
LEFT OF THE DECIMAL POINT IN THE ORIGINAL VALUE, OR EVEN WITHOUT THE
DECIMAL POINT ITSELF.
.INDENT -2
=#EQUAL OR GREATER THAN ZERO, IF ^^NOTATN \\IS NOT 3, OR IF ^^NOTATN
\\IS 3 BUT THE VALUE BEING REPRESENTED IS LESS THAN 1000, THEN
^^MINDEC \\IS THE MINIMUM NUMBER OF DIGITS WHICH CAN BE DISPLAYED
RIGHT OF THE DECIMAL POINT IN A FLOATING POINT NUMBER. ^IF LESS THAN
^^MINDEC \\DIGITS WOULD BE DISPLAYED RIGHT OF THE DECIMAL POINT,
THEN THE VALUE WILL BE REPRESENTED IN SCIENTIFIC NOTATION INSTEAD.
^IF ^^MINDEC=0, \\THEN IT IS NOT NECESSARY THAT ANY DIGITS BE
DISPLAYED RIGHT OF THE DECIMAL POINT, BUT THE DECIMAL POINT ITSELF
MUST BE DISPLAYED.
.SKIP
^IF ^^NOTATN=3 \\AND ^^VALUE=1000 \\OR GREATER, THEN ^^MINDEC \I\S
\\THE MINIMUM NUMBER OF DIGITS TO THE RIGHT OF THE DECIMAL POINT IN
THE ORIGINAL VALUE WHICH MUST BE DISPLAYED. ^IF ^^VALUE \\IS BETWEEN
1000 AND 1000000, THEN AT LEAST ^^MINDEC+3 \\DIGITS MUST BE
DISPLAYED RIGHT OF THE DECIMAL POINT. ^IF ^^VALUE \\IS 1000000 OR
GREATER, THEN AT LEAST ^^MINDEC+6 \\DIGITS MUST BE DISPLAYED RIGHT
OF THE DECIMAL POINT.
.SKIP
^FOR EXAMPLE, THE VALUE 1234.56 WOULD BE REPRESENTED AS FOLLOWS FOR
VARIOUS VALUES OF ^^MINDEC \\AND ^^NOTATN. I\\T SHOULD BE NOTED THAT
WHEN THE DIGIT 5 RIGHT OF THE DECIMAL POINT IN THE ORIGINAL VALUE IS
NOT REPRESENTED, THEN THE DIGIT 4 LEFT OF THE DECIMAL POINT IS
ROUNDED UPWARDS TO 5.
.SKIP
.NOFILL
.TEST PAGE 5
                       ^^NOTATN=0  NOTATN=2  NOTATN=3
  \\FOR ^^MINDEC=MAXDEC=-1     1235        1K    1.235K
      MINDEC=MAXDEC=0     1235.       1.K    1.235K
      MINDEC=MAXDEC=1    1234.6      1.2K   1.2346K
      MINDEC=MAXDEC=2   1234.56     1.23K  1.23456K
.FILL
.SKIP
.INDENT -9
MAXDEC#=#\\MAXIMUM NUMBER OF DIGITS RIGHT OF THE DISPLAYED DECIMAL
POINT IN NUMBERS DISPLAYED IN FLOATING POINT FORM.
.INDENT -3
#=#-2, REPRESENT AS MANY DIGITS RIGHT OF THE DECIMAL POINT AS THE
FIELD WILL HOLD (UP TO A MAXIMUM TOTAL NUMBER OF DIGITS SPECIFIED BY
^^MAXSIG).
.INDENT -3
#=#-1, \I\F NOTATN \\IS NOT 3, OR IF ^^NOTATN \\IS 3 BUT THE VALUE
BEING REPRESENTED IS LESS THAN 1000, REPRESENT ONLY DIGITS LEFT OF
THE DECIMAL POINT. ^THE DECIMAL POINT ITSELF WILL NOT BE
REPRESENTED. ^IF MORE THAN ^^IWIDTH \O\R MAXSIG \\DIGITS WOULD
APPEAR LEFT OF THE DECIMAL POINT, THEN THE NUMBER WILL BE
REPRESENTED IN SCIENTIFIC NOTATION.
.SKIP
^IF ^^NOTATN=3 \\AND ^^VALUE=1000 \\OR GREATER, THEN ^^MAXDEC=-1
\\WOULD HAVE THE SAME EFFECT AS ^^MAXDEC=0 \\SUCH THAT ALL DIGITS
WHICH WOULD BE TO THE LEFT OF THE DECIMAL POINT IN THE ORIGINAL
VALUE (AS REPRESENTED WITHOUT ^K OR ^M) WILL IF POSSIBLE BE INCLUDED
IN THE REPRESENTATION OF THE VALUE SHIFTED FOR THE ^K OR ^M
NOTATION. ^IF ^^MINDEC \\IS GREATER THAN -2, AND IF NOT ALL OF THE
DIGITS TO THE LEFT OF THE DECIMAL POINT IN THE ORIGINAL UNSHIFTED
VALUE CAN BE INCLUDED IN THE SUPPLIED FIELD WIDTH, THEN THE VALUE
WILL INSTEAD BE REPRESENTED IN SCIENTIFIC NOTATION.
.INDENT -3
#=#GREATER THAN OR EQUAL TO ZERO, IF ^^NOTATN \\IS NOT 3, OR IF
^^NOTATN \\IS 3 BUT THE VALUE BEING REPRESENTED IS LESS THAN 1000,
REPRESENT THE VALUE WITH ^^MAXDEC \\DIGITS RIGHT OF DECIMAL POINT.
^IF THIS REPRESENTATION OF THE VALUE WILL NOT FIT INTO THE FIELD
SIZE INDICATED BY ^^IWIDTH \O\R MAXSIG, \\THEN REDUCE THE NUMBER OF
DIGITS REPRESENTED RIGHT OF THE DECIMAL POINT SO THAT THE
REPRESENTATION WILL FIT, OR REPRESENT THE VALUE IN SCIENTIFIC
NOTATION IF THERE ARE MORE THAN ^^IWIDTH \O\R MAXSIG \\DIGITS LEFT
OF THE DECIMAL POINT.
.SKIP
.SKIP
^IF ^^NOTATN=3 \\AND ^^VALUE=1000 \\OR GREATER, THEN ^^MAXDEC \I\S
\\THE NUMBER OF DIGITS TO THE RIGHT OF THE DECIMAL POINT IN THE
ORIGINAL UNSHIFTED VALUE WHICH CAN BE DISPLAYED IF THERE IS ROOM FOR
THESE IN THE SUPPLIED FIELD WIDTH. ^IF ^^VALUE \\IS BETWEEN 1000 AND
1000000, THEN AT MOST ^^MAXDEC+3 \\DIGITS CAN BE DISPLAYED RIGHT OF
THE DISPLAYED DECIMAL POINT. ^IF ^^VALUE \\IS 1000000 OR GREATER,
THEN AT MOST ^^MAXDEC+6 \\DIGITS CAN BE DISPLAYED RIGHT OF THE
DECIMAL POINT.
.SKIP
.INDENT -9
^^MINSIG#=#\\MINIMUM NUMBER OF SIGNIFICANT DIGITS IN THE FLOATING
POINT REPRESENTATION OF THE VALUE. ^IF THE FLOATING POINT
REPRESENTATION OF THE VALUE WOULD CONTAIN LESS THAN ^^MINSIG
\\SIGNIFICANT DIGITS, THEN THE VALUE WILL BE REPRESENTED IN
SCIENTIFIC NOTATION. ^IF THE VALUE BEING DISPLAYED HAS THE VALUE
ZERO, THEN ^^MINSIG \\IS IGNORED.
.SKIP
.INDENT -9
^^MAXSIG#=#\\SELECTS THE MAXIMUM NUMBER OF SIGNIFICANT DIGITS IN THE
FLOATING POINT REPRESENTATION OF THE VALUE.
.INDENT -3
#=#LESS THAN OR EQUAL TO ZERO, ALLOW AS MANY DIGITS AS THE FIELD
WILL HOLD
.INDENT -3
#=#GREATER THAN ZERO, ^^MAXSIG \\IS THE MAXIMUM NUMBER OF DIGITS
WHICH CAN BE DISPLAYED STARTING WITH THE LEFTMOST NONZERO DIGIT,
COUNTING IT AND ALL DIGITS TO ITS RIGHT. ^^MAXSIG \\DOES NOT INCLUDE
THE DECIMAL POINT, DOES NOT INCLUDE THE MINUS SIGN IF THE VALUE IS
NEGATIVE, AND DOES NOT INCLUDE THE PERCENT SIGN, ^K OR ^M IF
^^NOTATN \\IS GREATER THAN ZERO. ^THE NUMBER OF DIGITS DISPLAYED
RIGHT OF THE DECIMAL POINT IS REDUCED IF NECESSARY SO THAT THE
NUMBER OF DIGITS STARTING AT THE LEFTMOST NONZERO DISPLAYED DIGIT
AND COUNTING IT AND ALL DIGITS DISPLAYED TO ITS RIGHT DOES NOT
EXCEED ^^MAXSIG. I\F MAXSIG \\WOULD BE LESS THAN THE NUMBER OF
DIGITS LEFT OF THE DECIMAL POINT IN THE REPRESENTATION OF THE VALUE,
THEN THE VALUE WILL BE REPRESENTED IN SCIENTIFIC NOTATION.
.SKIP
.INDENT -9
^^INIZRO#=#-1, \\IF THE NUMBER IS REPRESENTED IN FLOATING POINT FORM
AND HAS AN ABSOLUTE VALUE LESS THAN 1.0, THEN A ZERO IS DISPLAYED
LEFT OF THE DECIMAL POINT IF AND ONLY IF NO DIGITS WOULD OTHERWISE
BE DISPLAYED.
.INDENT -2
=#0, IF THE NUMBER IS REPRESENTED IN FLOATING POINT FORM AND HAS AN
ABSOLUTE VALUE LESS THAN 1.0, THEN A ZERO IS DISPLAYED TO THE LEFT
OF THE DECIMAL POINT.
.INDENT -2
=#1, IF THE NUMBER IS REPRESENTED IN FLOATING POINT FORM AND HAS AN
ABSOLUTE VALUE LESS THAN 1.0, THEN A ZERO IS NOT DISPLAYED TO THE
LEFT OF THE DECIMAL POINT. ^IF NO DIGITS APPEAR IN THE
REPRESENTATION OF THE NUMBER AND ^^IFILL \\EQUALS ONE, THEN NEITHER
DECIMAL POINT NOR SIGN ARE REPRESENTED AND THE FIELD WILL BE FILLED
WITH SPACES. ^IF NO DIGITS APPEAR IN THE REPRESENTATION OF THE
NUMBER AND ^^IFILL \\IS ZERO INDICATING THAT THE FIELD IS NOT TO BE
FILLED WITH SPACES RIGHT OF THE NUMBER, THEN ^^KOUNT \\WILL BE
RETURNED EQUAL TO THE INPUT VALUE OF ^^LFTCOL.
.SKIP
F\\OR EXAMPLE, VALUES GREATER THAN OR EQUAL TO ZERO BUT LESS THAN
0.005 WOULD BE REPRESENTED AS SHOWN BELOW IF ^^MAXDEC \\EQUALS 2
.NOFILL
.SKIP
.TEST PAGE 5
            ^^KLIP=0     KLIP=1     KLIP=2     KLIP=3
.SKIP
INIZRO=-1      .00        .0        0.         0
      = 0     0.00       0.0        0.         0
      = 1      .00        .0
.SKIP
.FILL
L\\IKEWISE, VALUES BETWEEN -0.005 AND ZERO WOULD BE REPRESENTED AS
FOLLOW IF ^^MAXDEC \\EQUALS 2
.NOFILL
.SKIP
.TEST PAGE 5
            ^^KLIP=0     KLIP=1     KLIP=2     KLIP=3
.SKIP
INIZRO=-1     -.00       -.0       -0.        -0
      = 0    -0.00      -0.0       -0.        -0
      = 1     -.00       -.0
.FILL
.SKIP
.INDENT -9
MARGIN#=#0, \\IF THE NUMBER IS REPRESENTED IN FLOATING POINT FORM,
AND IF A ^K, ^M OR PERCENT SIGN DOES NOT FOLLOW THE REPRESENTATION
OF THE VALUE, THEN DO NOT ADD AN EXTRA SPACE WHERE THE ^K, ^M OR
PERCENT SIGN WOULD OTHERWISE BE.
.INDENT -2
=#GREATER THAN ZERO, ^^MARGIN \\IS THE NUMBER OF CHARACTERS IN THE
FIELD CONTAINING SPACES AND/OR THE ^K, ^M OR PERCENT SIGN TO THE
RIGHT OF A FLOATING POINT NUMBER. ^^MARGIN \\CAN BE USED TO FORCE A
FLOATING POINT NUMBER TO HAVE ITS RIGHTMOST DIGIT AT THE SAME
POSITION AS THE RIGHTMOST DIGIT OF THE NORMALIZED PORTION OF A VALUE
REPRESENTED IN SCIENTIFIC NOTATION. ^FOR THIS PURPOSE, ^^MARGIN
\\WOULD BE 1 GREATER THAN ^^IEXPNT. I\F MARGIN \\IS GREATER THAN 1
AND A ^K, ^M OR PERCENT SIGN MUST BE PLACED TO THE RIGHT OF THE
NUMBER, THEN THE ^K, ^M OR PERCENT SIGN IS PLACED AT THE LEFT OF THE
FIELD OF SPACES WHERE THE ^E OF A SCIENTIFIC NOTATION NUMBER WOULD
APPEAR, AND THE FIELD THEN CONTAINS ^^MARGIN-1 \\SPACES TO THE RIGHT
OF THE ^K, ^M OR PERCENT SIGN. ^^MARGIN \\WOULD HAVE THE VALUE 1 IF
IT IS MERELY DESIRED TO FORCE A SINGLE SPACE TO THE RIGHT OF THE
REPRESENTATION OF THE NUMBER IF A ^K, ^M OR PERCENT SIGN DOES NOT
APPEAR TO ITS RIGHT.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS CONTROL THE FORMAT OF VALUES REPRESENTED IN
SCIENTIFIC NOTATION EITHER WITH DISPLAYED EXPONENT OR WITH
SUPPRESSED ZERO EXPONENT (^^IZERO \\LESS THAN OR EQUAL TO ZERO).
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^IDECML#=#\\SAME AS ^^MAXDEC \\EXCEPT THAT ^^IDECML \\APPLIES ONLY
TO VALUES DISPLAYED IN SCIENTIFIC NOTATION. ^NOTE THAT IF THE VALUE
IS BEING REPRESENTED IN SCIENTIFIC NOTATION, THEN A NONZERO DIGIT
WILL BE USED LEFT OF THE DECIMAL POINT UNLESS THE VALUE IS ITSELF
ZERO. ^THEREFORE, IF ^^IDECML \\IS GREATER THAN OR EQUAL TO ZERO,
THEN THE MAXIMUM NUMBER OF SIGNIFICANT DIGITS WHICH CAN BE DISPLAYED
IN SCIENTIFIC NOTATION IS ^^IDECML+1.
.SKIP
.INDENT -9
IEXPNT#=#\\MINIMUM NUMBER OF DIGITS IN THE EXPONENT IF THE VALUE IS
REPRESENTED IN SCIENTIFIC NOTATION. ^IF FEWER THAN ^^IEXPNT \\DIGITS
ARE NEEDED IN THE EXPONENT, THESE ARE JUSTIFIED IN AN EXPONENT FIELD
OF ^^IEXPNT \\WIDTH WITH EITHER SPACES OR ZEROES AS FILL ACCORDING
TO THE VALUE OF ^^IFORMT. IEXPNT \\MUST INCLUDE ROOM FOR THE SIGN
(IF THE EXPONENT IS NEGATIVE) BUT DOES NOT INCLUDE ROOM FOR THE
INITIAL LETTER ^E OF THE EXPONENT.
.SKIP
.INDENT -9
^^IFORMT#=#0, \I\F IEXPNT \\IS GREATER THAN THE NUMBER OF CHARACTERS
NEEDED TO REPRESENT THE EXPONENT, THEN LEFT JUSTIFY THE EXPONENT
WITHIN THE EXPONENT FIELD.
.INDENT -2
=#1, IF ^^IEXPNT \\IS GREATER THAN THE NUMBER OF CHARACTERS NEEDED
TO REPRESENT THE EXPONENT, THEN RIGHT JUSTIFY THE DIGITS OF THE
EXPONENT WITHIN THE EXPONENT FIELD. ^IF THE EXPONENT IS NEGATIVE,
PLACE THE SIGN RIGHT OF THE ^E AT THE START OF THE EXPONENT.
^ZEROES, NOT SPACES, ARE USED TO FILL THE REST OF THE EXPONENT FIELD.
.INDENT -2
=#2, SAME AS ^^IFORMT=1 \\EXCEPT THAT SPACES, NOT ZEROES ARE USED TO
FILL BETWEEN THE SIGN IF ANY AND THE DIGITS OF THE EXPONENT.
.INDENT -2
=#3, SAME AS ^^IFORMT=2 \\EXCEPT THAT THE SIGN IF ANY IS PLACED
IMMEDIATELY TO THE LEFT OF THE DIGITS OF THE EXPONENT INSTEAD OF TO
THE RIGHT OF THE ^E AT THE START OF THE EXPONENT.
.SKIP
^FOR EXAMPLE, IF ^^IEXPNT \\IS 4, THEN THE VALUE 1.2^E-3 WOULD BE
REPRESENTED
.SKIP
.NOFILL
.TEST PAGE 4
      FOR ^^IFORMT=0     1.2E-3
          IFORMT=1     1.2E-003
          IFORMT=2     1.2E-  3
          IFORMT=3     1.2E  -3
.FILL
.SKIP
.INDENT -9
IZERO##=#-1, \\IF THE VALUE IS BEING REPRESENTED IN SCIENTIFIC
NOTATION AND HAS A ZERO EXPONENT (VALUE OF THE NUMBER IS ZERO OR IS
IN EITHER RANGE -9.99... TO -1.00... OR RANGE 1.00... TO 9.99...),
THEN THE REPRESENTATION OF THE NUMBER WILL NOT INCLUDE AN EXPONENT
FIELD.
.INDENT -2
=#0, IF THE VALUE IS BEING REPRESENTED IN SCIENTIFIC NOTATION AND
HAS A ZERO EXPONENT (VALUE OF THE NUMBER IS ZERO OR IS IN EITHER
RANGE -9.99... TO -1.00... OR RANGE 1.00... TO 9.99...), THEN THE
EXPONENT FIELD IS OF THE SAME SIZE AS IF THE EXPONENT WAS ONE BUT
THE EXPONENT FIELD IS FILLED WITH SPACES.
.INDENT -2
=#1, IF THE VALUE IS BEING REPRESENTED IN SCIENTIFIC NOTATION, THEN
THE EXPONENT WILL BE DISPLAYED EVEN IF THIS EXPONENT IS ZERO.
.SKIP
^FOR EXAMPLE, IF ^^IEXPNT \\IS 4, THEN THE VALUE 1.2 WOULD BE
REPRESENTED
.SKIP
.NOFILL
.TEST PAGE 3
      FOR ^^IZERO=-1         1.2
          IZERO=0     1.2
          IZERO=1     1.2E   0
.FILL
.SKIP
.LEFT MARGIN 0
T\\HE FOLLOWING ARGUMENTS, TOGETHER WITH ^^IWIDTH \\DESCRIBED
EARLIER, DEFINE THE USABLE PORTION OF THE ^^IBUFFR \\ARRAY, AND ARE
RETURNED UNCHANGED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LFTCOL#=#\\THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY ENTRY TO THE
IMMEDIATE LEFT OF THE FIELD IN WHICH THE NUMBER IS TO BE
REPRESENTED. ^ALTHOUGH ^^LFTCOL \\WILL USUALLY BE EQUAL TO THE
NUMBER OF CHARACTERS ALREADY IN THE ^^IBUFFR \\ARRAY, DIFFERENTLY
NAMED ARGUMENTS SHOULD BE USED FOR ^^LFTCOL \\AND ^^KOUNT \\SINCE,
IF THE COMPILER TRANSFERS THESE BY VALUE RATHER THAN BY ADDRESS,
THEN THE RETURN FROM THIS ROUTINE COULD COPY OUT THE NEW VALUE OF
^^KOUNT \\BEFORE COPYING OUT THE UNCHANGED VALUE OF ^^LFTCOL.
.SKIP
.INDENT -9
MAXBFR#=#\\THE MAXIMUM DIMENSION OF THE ^^IBUFFR \\ARRAY. ^IF
^^LFTCOL+IWIDTH \\IS GREATER THAN ^^MAXBFR, \\THEN THE EFFECTIVE
VALUE OF ^^IWIDTH \\IS REDUCED TO ^^MAXBFR-LFTCOL.
.SKIP
.LEFT MARGIN 0
T\\HE FOLLOWING ARE OUTPUT ARGUMENTS
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^IBUFFR#=#\\ARRAY IN WHICH THE NUMBER IS TO BE REPRESENTED AND
WHICH CAN THEN BE PRINTED BY THE CALLING PROGRAM USING A MULTIPLE OF
AN ^A1 FORMAT.
.SKIP
.INDENT -9
^^KOUNT##=#\\RETURNED POINTING TO THE RIGHTMOST CHARACTER INSERTED
INTO THE ^^IBUFFR \\ARRAY. ^THIS WILL ALWAYS EQUAL ^^LFTCOL+IWIDTH
\I\F IFILL=1.
.SKIP
.INDENT -9
IERR###=#-1 \\RETURNED IF THE FIELD WAS FILLED WITH ASTERISKS DUE TO
FIELD OVERFLOW EVEN IN SCIENTIFIC NOTATION.
.INDENT -3
#=#0 RETURNED IF THE VALUE WAS REPRESENTED IN FLOATING POINT FORM
WITH OR WITHOUT FOLLOWING PERCENT SIGN, ^K OR ^M.
.INDENT -3
#=#1 OR GREATER RETURNED IF VALUE WAS REPRESENTED IN SCIENTIFIC
NOTATION. ^^IERR \\IS THE NUMBER OF DIGITS WHICH ARE SHOWN LEFT OF
THE EXPONENT PRIOR TO THE SUPPRESSION OF RIGHTMOST ZEROES WHICH
MIGHT BE REQUESTED BY NONZERO VALUES OF ^^KLIP. I\F IPART \I\S 1
\\CAUSING ONLY THE EXPONENT TO BE SHOWN, THEN ^^IERR \\IS THE NUMBER
OF DIGITS WHICH WOULD SHOWN IF ^^IPART \\INSTEAD HAD THE VALUE -1
(AGAIN PRIOR TO THE SUPPRESSION OF RIGHTMOST ZEROES). ^IF THIS
ROUTINE IS BEING CALLED TO APPEND THE REPRESENTATION OF A NUMBER TO
A LINE OF TEXT WHICH ALREADY CONTAINS OTHER INFORMATION, THEN THE
CALLING PROGRAM CAN TEST THE RETURNED VALUE OF ^^IERR \\TO DETERMINE
WHETHER THERE WAS ENOUGH ROOM AT THE END OF THE LINE FOR THE NUMBER
TO BE REPRESENTED WITH SUFFICIENT ACCURACY.
.LEFT MARGIN 0
.PAGE
.CENTER
^AN ^EXAMPLE OF THE ^USE OF ^^DARITE
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE FOLLOWING SAMPLE PROGRAM DEMONSTRATES THE MANNER IN WHICH
^^DARITE \\IS CALLED.
.SKIP
.LEFT MARGIN 5
.NOFILL
      ^^DIMENSION IBUFFR(12),VALUE(2)
      DATA VALUE/1.2345678E4,1.2345678E-6/
      DATA IBUFFR(1)/1H(/
      DO 4 ITEM=1,2
      DO 3 MAXSIG=1,8
C     VALUE=VALUE(ITEM) IWIDTH=10       IDECML=MAXSIG-1
C     JSTIFY=1          MINDEC=-2       IEXPNT=0
C     NOTATN=0          MAXDEC=-2       IFORMT=0
C     IPART =0          MINSIG=MAXSIG   IZERO =1
C     ISIGN =0          MAXSIG          LFTCOL=1
C     KLIP  =0          INIZRO=0        MAXBFR=12
C     IFILL =1          MARGIN=0        IBUFFR
      CALL DARITE(VALUE(ITEM),1,0,0,0,
     10,1,10,-2,-2,MAXSIG,MAXSIG,0,0,
     2MAXSIG-1,0,0,1,1,12,IBUFFR,KOUNT,IERR)
      KOUNT=KOUNT+1
      IBUFFR(KOUNT)=1H)
      IF(MAXSIG.EQ.1)WRITE(1,1)MAXSIG,
     1(IBUFFR(I),I=1,KOUNT),VALUE(ITEM)
    1 FORMAT(1X/1X,'MAXSIG=',1I1,1X,12A1,
     1'   VALUE =',1E16.8)
      IF(MAXSIG.GT.1)WRITE(1,2)MAXSIG,
     1(IBUFFR(I),I=1,KOUNT)
    2 FORMAT(1X,'MAXSIG=',1I1,1X,12A1)
    3 CONTINUE
    4 CONTINUE
      END
.SKIP
.LEFT MARGIN 0
.FILL
T\\HE OUTPUT GENERATED BY THE ABOVE PROGRAM IS SHOWN BELOW
.SKIP
.LEFT MARGIN 4
.NOFILL
 ^^MAXSIG=1 (      1.E4)   VALUE =  0.12345678E+05
 MAXSIG=2 (     1.2E4)
 MAXSIG=3 (    1.23E4)
 MAXSIG=4 (   1.235E4)
 MAXSIG=5 (    12346.)
 MAXSIG=6 (   12345.7)
 MAXSIG=7 (  12345.68)
 MAXSIG=8 ( 12345.678)
.SKIP
 MAXSIG=1 (  0.000001)   VALUE =  0.12345678E-05
 MAXSIG=2 ( 0.0000012)
 MAXSIG=3 (0.00000123)
 MAXSIG=4 (  1.235E-6)
 MAXSIG=5 ( 1.2346E-6)
 MAXSIG=6 (1.23457E-6)
 MAXSIG=7 (1.23457E-6)
 MAXSIG=8 (1.23457E-6)
.LEFT MARGIN 0
.FILL
.PAGE
.FILL
.LEFT MARGIN 0
.CENTER
D\\EMONSTRATION ^PROGRAM TO ^INTERACTIVELY ^TEST ^^DARITE A\\RGUMENTS
.CENTER
------------- ------- -- ------------- ---- ------ ---------
.SKIP
^THE USER OF THE PROGRAM LISTED ON THE FOLLOWING PAGES DEFINES BY
NAME AND VALUE EACH ARGUMENT WHICH IS TO BE TESTED. ^WHEN AN EMPTY
LINE IS READ, THE PROGRAM WILL REPORT ENCLOSED IN PARENTHESES THE
RESULTS OF CALLING ^^DARITE \\WITH THE SPECIFIED ARGUMENT VALUES,
FOR ALL POSSIBLE VALUES OF ^^JSTIFY \\AND OF ^^IFILL. A \\SAMPLE
DIALOG BETWEEN THE PROGRAM AND THE USER IS PRESENTED FOLLOWING THE
LISTING OF THE PROGRAM.
.SKIP 3
.NOFILL
^^C     PROGRAM TO DEMONSTRATE DARITE ROUTINE
C
C     DEFINE DICTIONARY CONSISTING OF ARGUMENT NAMES
      DIMENSION ITYPE(23),KNTLTR(23),IWORD(128)
      DATA MAXWRD,MAXKNT,MAXINP,MAXOUT/128,23,60,132/
      DATA IWORD/                  1HV,1HA,1HL,1HU,1HE,
     1 1HJ,1HS,1HT,1HI,1HF,1HY,    1HN,1HO,1HT,1HA,1HT,1HN,
     2 1HI,1HP,1HA,1HR,1HT,        1HI,1HS,1HI,1HG,1HN,
     3 1HK,1HL,1HI,1HP,            1HI,1HF,1HI,1HL,1HL,
     4 1HI,1HW,1HI,1HD,1HT,1HH,    1HM,1HI,1HN,1HD,1HE,1HC,
     5 1HM,1HA,1HX,1HD,1HE,1HC,    1HM,1HI,1HN,1HS,1HI,1HG,
     6 1HM,1HA,1HX,1HS,1HI,1HG,    1HI,1HN,1HI,1HZ,1HR,1HO,
     7 1HM,1HA,1HR,1HG,1HI,1HN,    1HI,1HD,1HE,1HC,1HM,1HL,
     8 1HI,1HE,1HX,1HP,1HN,1HT,    1HI,1HF,1HO,1HR,1HM,1HT,
     9 1HI,1HZ,1HE,1HR,1HO,        1HL,1HF,1HT,1HC,1HO,1HL,
     1 1HM,1HA,1HX,1HB,1HF,1HR,    1HI,1HB,1HU,1HF,1HF,1HR,
     2 1HK,1HO,1HU,1HN,1HT,        1HI,1HE,1HR,1HR/
      DATA ITYPE/4,-1,0,0,0,0,-1,0,0,0,
     10,0,0,0,0,0,0,0,-1,0,
     2-1,-1,-1/
      DATA KNTLTR/5,6,6,5,5,4,5,6,6,6,
     16,6,6,6,6,6,6,5,6,6,
     26,5,4/
C
C     DEFINE INITIAL VALUES OF ARGUMENTS
      DATA NOTATN, IPART, ISIGN,  KLIP, IFILL,IWIDTH,MINDEC,
     1     MAXDEC,MINSIG,MAXSIG,INIZRO,MARGIN,IDECML,IEXPNT,
     2     IFORMT, IZERO,MAXBFR/5*0,10,10*0,99/
      DATA VALUE/0.0/
C
C     DEFINE NEEDED CHARACTERS
      DATA IWHAT,IBLANK,ITAB/1H?,1H ,1H	/
C
C     INPUT AND OUTPUT BUFFERS
      DIMENSION IBUFFR(132),JBUFFR(60)
C
C     INPUT AND OUTPUT UNIT NUMBERS
      DATA ITTY,JTTY/5,5/
C
      WRITE(JTTY,1)
    1 FORMAT(1X,37HPROGRAM TO DEMONSTRATE DARITE ROUTINE/
     11X,47HTYPE ARGUMENT NAME AND VALUE, 1 OR MORE ON LINE/
     21X,41HEMPTY LINE CALLS DARITE WITH THESE VALUES/
     31X,43HSPACE IN BUFFER PRINTS AS <, UNDEFINED AS >)
C
C     READ USER SPECIFICATION OF ARGUMENT VALUES
    2 WRITE(JTTY,3)
    3 FORMAT(1X,1H*,$)
      READ(ITTY,4)JBUFFR
    4 FORMAT(60A1)
C
C     IDENTIFY THE ARGUMENT
      LOWBFR=0
    5 LOWBFR=LOWBFR+1
    6 INIBFR=LOWBFR
      CALL DAVERB(1,MAXWRD,IWORD,1,MAXKNT,
     1KNTLTR,JBUFFR,MAXINP,LOWBFR,KIND,MATCH,LCNWRD,
     2LCNKNT,LCNBFR)
      GO TO(21,9,8,8,17),KIND
C
C     OBTAIN VALUE OF ARGUMENT
    7 LOWBFR=LOWBFR+1
    8 KONTRL=ITYPE(MATCH)
      IF(KONTRL.LT.0)KONTRL=1
      CALL DAHEFT(KONTRL,1,0,JBUFFR,MAXINP,LOWBFR,KIND,
     1ISHIFT,JSHIFT,KSHIFT,LSHIFT,IVALUE,AVALUE)
      GO TO(2,10,12),KIND
C
C     ALLOW COMMA OR EQUAL SIGN
    9 IF(JBUFFR(LOWBFR).EQ.1H=)GO TO 13
      GO TO 11
   10 IF(JBUFFR(LOWBFR).EQ.1H=)GO TO 7
   11 IF(JBUFFR(LOWBFR).EQ.1H,)GO TO 5
      IF(JBUFFR(LOWBFR).EQ.1H;)GO TO 5
      IF(JBUFFR(LOWBFR).EQ.1H!)GO TO 2
      LCNBFR=LOWBFR
      GO TO 18
C
C     SET ARGUMENT IF VALUE FOUND
   12 IF(ITYPE(MATCH).LT.0)GO TO 15
      IF(MATCH.EQ.1)VALUE=AVALUE
      IF(MATCH.EQ.2)JSTIFY=IVALUE
      IF(MATCH.EQ.3)NOTATN=IVALUE
      IF(MATCH.EQ.4)IPART=IVALUE
      IF(MATCH.EQ.5)ISIGN=IVALUE
      IF(MATCH.EQ.6)KLIP=IVALUE
      IF(MATCH.EQ.7)IFILL=IVALUE
      IF(MATCH.EQ.8)IWIDTH=IVALUE
      IF(MATCH.EQ.9)MINDEC=IVALUE
      IF(MATCH.EQ.10)MAXDEC=IVALUE
      IF(MATCH.EQ.11)MINSIG=IVALUE
      IF(MATCH.EQ.12)MAXSIG=IVALUE
      IF(MATCH.EQ.13)INIZRO=IVALUE
      IF(MATCH.EQ.14)MARGIN=IVALUE
      IF(MATCH.EQ.15)IDECML=IVALUE
      IF(MATCH.EQ.16)IEXPNT=IVALUE
      IF(MATCH.EQ.17)IFORMT=IVALUE
      IF(MATCH.EQ.18)IZERO=IVALUE
      IF(MATCH.EQ.20)MAXBFR=IVALUE
      GO TO 6
C
C     ARGUMENT TYPED BY USER FOUND TO BE IN ERROR
   13 WRITE(JTTY,14)
   14 FORMAT(1X,22HARGUMENT NOT SPECIFIED)
      GO TO 2
   15 J=LCNWRD+KNTLTR(LCNKNT)-1
      WRITE(JTTY,16)(IWORD(I),I=LCNWRD,J)
   16 FORMAT(1X,16HUSER CANNOT SET ,100A1)
      GO TO 2
   17 LOWBFR=LOWBFR-1
   18 IF(LOWBFR.GE.MAXINP)GO TO 19
      IF(JBUFFR(LOWBFR+1).EQ.IBLANK)GO TO 19
      IF(JBUFFR(LOWBFR+1).EQ.ITAB)GO TO 19
      IF(JBUFFR(LOWBFR+1).EQ.1H,)GO TO 19
      IF(JBUFFR(LOWBFR+1).EQ.1H=)GO TO 19
      LOWBFR=LOWBFR+1
      GO TO 18
   19 WRITE(JTTY,20)(JBUFFR(I),I=LCNBFR,LOWBFR),IWHAT
   20 FORMAT(1X,100A1)
      GO TO 2
C
C     TEST IF ANYTHING WAS TYPED WHEN END OF LINE FOUND
   21 IF(INIBFR.GT.1)GO TO 2
C
C     REPORT ARGUMENT VALUES TO USER
      WRITE(JTTY,22)NOTATN, IPART, ISIGN,  KLIP,IWIDTH,
     1MINDEC,MAXDEC,MINSIG,MAXSIG,INIZRO,MARGIN,IDECML,
     2IEXPNT,IFORMT, IZERO,MAXBFR, VALUE
   22 FORMAT(7H NOTATN,1I3,7H  IPART,1I3,7H  ISIGN,1I3,
     1       7H   KLIP,1I3,7H IWIDTH,1I3,7H MINDEC,1I3/
     2       7H MAXDEC,1I3,7H MINSIG,1I3,7H MAXSIG,1I3,
     3       7H INIZRO,1I3,7H MARGIN,1I3,7H IDECML,1I3/
     4       7H IEXPNT,1I3,7H IFORMT,1I3,7H  IZERO,1I3,
     5       7H MAXBFR,1I3,7H  VALUE,1E13.5)
C
C     LOOP FOR IFILL=0 AND 1 FOR JSTIFY=-1, 0 AND 1
      DO 31 IJSTIF=1,3
      JSTIFY=IJSTIF-2
      LFTCOL=0
      DO 29 IIFILL=1,2
      IFILL=IIFILL-1
C
C     INSERT VALUE OF IFILL INTO OUTPUT TEXT
      IBUFFR(LFTCOL+1)=IBLANK
      IBUFFR(LFTCOL+2)=1HF
      IBUFFR(LFTCOL+3)=1HI
      IBUFFR(LFTCOL+4)=1HL
      LFTCOL=LFTCOL+4
      AVALUE=IFILL
      CALL DARITE(AVALUE,1,0,0,0,
     10,0,2,-1,-1,0,2,
     20,0,0,0,0,0,LFTCOL,
     3MAXOUT,IBUFFR,LFTCOL,IERR)
C
C     INSERT TEXT LEFT OF VALUE, LEAVING ROOM FOR IERR
      LFTERR=LFTCOL+4
      IBUFFR(LFTCOL+1)=IBLANK
      IBUFFR(LFTCOL+2)=1HE
      IBUFFR(LFTCOL+3)=1HR
      IBUFFR(LFTCOL+4)=1HR
      IBUFFR(LFTCOL+7)=IBLANK
      IBUFFR(LFTCOL+8)=1H(
      LFTCOL=LFTCOL+8
      IBUFFR(LFTCOL+IWIDTH+1)=1H)
C
C     CALL DARITE TO REPRESENT VALUE WITH USER SET FORMAT
      LIMIT=LFTCOL+MAXBFR
      CALL DARITE( VALUE,JSTIFY,NOTATN, IPART, ISIGN,
     1  KLIP, IFILL,IWIDTH,MINDEC,MAXDEC,MINSIG,MAXSIG,
     2INIZRO,MARGIN,IDECML,IEXPNT,IFORMT, IZERO,LFTCOL,
     3 LIMIT,IBUFFR, KOUNT,  IERR)
      IF(IBUFFR(LFTCOL).NE.1H()TYPE 23
      IF(IBUFFR(LFTCOL+IWIDTH+1).NE.1H))TYPE 24
   23 FORMAT(1X,33HCHARACTER LEFT OF FIELD DESTROYED)
   24 FORMAT(1X,34HCHARACTER RIGHT OF FIELD DESTROYED)
C
C     INSERT VALUE OF IERR INTO TEXT LEFT OF VALUE
      AVALUE=IERR
      CALL DARITE(AVALUE,1,0,0,0,
     10,0,2,-1,-1,0,2,
     20,0,0,0,0,0,LFTERR,
     3MAXOUT,IBUFFR,I,IERR)
C
C     MARK SPACES AND EMPTY LOCATIONS RETURNED BY DARITE
      I=LFTCOL+1
   25 IF(I.GT.KOUNT)GO TO 26
      IF(IBUFFR(I).EQ.IBLANK)IBUFFR(I)=1H<
      I=I+1
      GO TO 25
   26 KOUNT=KOUNT+1
      IF(KOUNT.GT.LFTCOL+IWIDTH)GO TO 27
      IBUFFR(KOUNT)=1H>
      GO TO 26
   27 IF(KOUNT.GE.LFTCOL+IWIDTH+IEXTRA)GO TO 28
      KOUNT=KOUNT+1
      IBUFFR(KOUNT)=IBLANK
      GO TO 27
   28 LFTCOL=KOUNT
   29 CONTINUE
C
C     DISPLAY THE RESULT TO USER
      WRITE(JTTY,30)JSTIFY,(IBUFFR(I),I=1,KOUNT)
   30 FORMAT(1X,3HJST,I2,120A1)
   31 CONTINUE
C
C     GO BACK TO ASK USER FOR NEXT ARGUMENT TO CHANGE
      GO TO 2
      END
.SKIP 3
T\\YPICAL ^DIALOG ^BETWEEN ^^DARITE D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
^^PROGRAM TO DEMONSTRATE DARITE ROUTINE
TYPE ARGUMENT NAME AND VALUE, 1 OR MORE ON LINE
EMPTY LINE CALLS DARITE WITH THESE VALUES
SPACE IN BUFFER PRINTS AS <, UNDEFINED AS >
.TEST PAGE 8
*MAXD -2 MAXS 6 VALUE 123.45678
*
NOTATN  0  IPART  0  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  0
MAXDEC -2 MINSIG  0 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  0
IEXPNT  0 IFORMT  0  IZERO  0 MAXBFR 99  VALUE  0.12346E+03
JST-1 FIL 0 ERR 0 (123.457>>>) FIL 1 ERR 0 (123.457<<<)
JST 0 FIL 0 ERR 0 (<123.457>>) FIL 1 ERR 0 (<123.457<<)
JST 1 FIL 0 ERR 0 (<<<123.457) FIL 1 ERR 0 (<<<123.457)
.TEST PAGE 8
*MINS 6 MIND 4 !IMPOSSIBLE CONDITIONS TO FORCE E NOTATION
*
NOTATN  0  IPART  0  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  0
IEXPNT  0 IFORMT  0  IZERO  0 MAXBFR 99  VALUE  0.12346E+03
JST-1 FIL 0 ERR 1 (1.E2>>>>>>) FIL 1 ERR 1 (1.E2<<<<<<)
JST 0 FIL 0 ERR 1 (<<<1.E2>>>) FIL 1 ERR 1 (<<<1.E2<<<)
JST 1 FIL 0 ERR 1 (<<<<<<1.E2) FIL 1 ERR 1 (<<<<<<1.E2)
.TEST PAGE 8
*IDEC 5 IEXP 3 IFOR 1 !MAKE DISPLAY LOOK BETTER
*
NOTATN  0  IPART  0  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  5
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR 99  VALUE  0.12346E+03
JST-1 FIL 0 ERR 5 (1.2346E002) FIL 1 ERR 5 (1.2346E002)
JST 0 FIL 0 ERR 5 (1.2346E002) FIL 1 ERR 5 (1.2346E002)
JST 1 FIL 0 ERR 5 (1.2346E002) FIL 1 ERR 5 (1.2346E002)
.TEST PAGE 8
*VAL 9.085E-7 !TRY A NEGATIVE EXPONENT
*
NOTATN  0  IPART  0  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  5
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR 99  VALUE  0.90850E-06
JST-1 FIL 0 ERR 5 (9.0850E-07) FIL 1 ERR 5 (9.0850E-07)
JST 0 FIL 0 ERR 5 (9.0850E-07) FIL 1 ERR 5 (9.0850E-07)
JST 1 FIL 0 ERR 5 (9.0850E-07) FIL 1 ERR 5 (9.0850E-07)
.TEST PAGE 8
*IPAR -1 !LOOK AT NORMALIZED PART ONLY
*
NOTATN  0  IPART -1  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  5
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR 99  VALUE  0.90850E-06
JST-1 FIL 0 ERR 6 (9.08500>>>) FIL 1 ERR 6 (9.08500<<<)
JST 0 FIL 0 ERR 6 (<9.08500>>) FIL 1 ERR 6 (<9.08500<<)
JST 1 FIL 0 ERR 6 (<<<9.08500) FIL 1 ERR 6 (<<<9.08500)
.TEST PAGE 8
*IPAR 1 !LOOK AT EXPONENT
*
NOTATN  0  IPART  1  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  5
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR 99  VALUE  0.90850E-06
JST-1 FIL 0 ERR 6 (E-07>>>>>>) FIL 1 ERR 6 (E-07<<<<<<)
JST 0 FIL 0 ERR 6 (<<<E-07>>>) FIL 1 ERR 6 (<<<E-07<<<)
JST 1 FIL 0 ERR 6 (<<<<<<E-07) FIL 1 ERR 6 (<<<<<<E-07)
.TEST PAGE 8
*VAL 9.99996E-7 IPA 0 !TEST ROUNDING
*
NOTATN  0  IPART  0  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  5
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR 99  VALUE  0.10000E-05
JST-1 FIL 0 ERR 5 (1.0000E-06) FIL 1 ERR 5 (1.0000E-06)
JST 0 FIL 0 ERR 5 (1.0000E-06) FIL 1 ERR 5 (1.0000E-06)
JST 1 FIL 0 ERR 5 (1.0000E-06) FIL 1 ERR 5 (1.0000E-06)
.TEST PAGE 8
*IPA -1 !LOOK AT NORMALIZED PART
*
NOTATN  0  IPART -1  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  5
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR 99  VALUE  0.10000E-05
JST-1 FIL 0 ERR 6 (9.99996>>>) FIL 1 ERR 6 (9.99996<<<)
JST 0 FIL 0 ERR 6 (<9.99996>>) FIL 1 ERR 6 (<9.99996<<)
JST 1 FIL 0 ERR 6 (<<<9.99996) FIL 1 ERR 6 (<<<9.99996)
.TEST PAGE 8
*IPA 1 !LOOK AT EXPONENT
*
NOTATN  0  IPART  1  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  5
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR 99  VALUE  0.10000E-05
JST-1 FIL 0 ERR 6 (E-07>>>>>>) FIL 1 ERR 6 (E-07<<<<<<)
JST 0 FIL 0 ERR 6 (<<<E-07>>>) FIL 1 ERR 6 (<<<E-07<<<)
JST 1 FIL 0 ERR 6 (<<<<<<E-07) FIL 1 ERR 6 (<<<<<<E-07)
.TEST PAGE 8
*IDEC 4 IPA -1 !REDUCE DIGITS TO SAME FOR ALL OR PART
*
NOTATN  0  IPART -1  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  4
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR 99  VALUE  0.10000E-05
JST-1 FIL 0 ERR 5 (1.0000>>>>) FIL 1 ERR 5 (1.0000<<<<)
JST 0 FIL 0 ERR 5 (<<1.0000>>) FIL 1 ERR 5 (<<1.0000<<)
JST 1 FIL 0 ERR 5 (<<<<1.0000) FIL 1 ERR 5 (<<<<1.0000)
.TEST PAGE 8
*IPA 1 !MAKE SURE THAT EXPONENT SHOWS RESULTS OF ROUNDING
*
NOTATN  0  IPART  1  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  4
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR 99  VALUE  0.10000E-05
JST-1 FIL 0 ERR 5 (E-06>>>>>>) FIL 1 ERR 5 (E-06<<<<<<)
JST 0 FIL 0 ERR 5 (<<<E-06>>>) FIL 1 ERR 5 (<<<E-06<<<)
JST 1 FIL 0 ERR 5 (<<<<<<E-06) FIL 1 ERR 5 (<<<<<<E-06)
.TEST PAGE 8
*MAXB 5 IPA 0 !REDUCE BUFFER LENGTH TO MIDDLE OF FIELD
*
NOTATN  0  IPART  0  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  4
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR  5  VALUE  0.10000E-05
JST-1 FIL 0 ERR 1 (1E-06>>>>>) FIL 1 ERR 1 (1E-06>>>>>)
JST 0 FIL 0 ERR 1 (1E-06>>>>>) FIL 1 ERR 1 (1E-06>>>>>)
JST 1 FIL 0 ERR 1 (1E-06>>>>>) FIL 1 ERR 1 (1E-06>>>>>)
.TEST PAGE 8
*IPA -1
*
NOTATN  0  IPART -1  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  4
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR  5  VALUE  0.10000E-05
JST-1 FIL 0 ERR 4 (1.000>>>>>) FIL 1 ERR 4 (1.000>>>>>)
JST 0 FIL 0 ERR 4 (1.000>>>>>) FIL 1 ERR 4 (1.000>>>>>)
JST 1 FIL 0 ERR 4 (1.000>>>>>) FIL 1 ERR 4 (1.000>>>>>)
.TEST PAGE 8
*IPA 1
*
NOTATN  0  IPART  1  ISIGN  0   KLIP  0 IWIDTH 10 MINDEC  4
MAXDEC -2 MINSIG  6 MAXSIG  6 INIZRO  0 MARGIN  0 IDECML  4
IEXPNT  3 IFORMT  1  IZERO  0 MAXBFR  5  VALUE  0.10000E-05
JST-1 FIL 0 ERR 4 (E-06>>>>>>) FIL 1 ERR 4 (E-06<>>>>>)
JST 0 FIL 0 ERR 4 (E-06>>>>>>) FIL 1 ERR 4 (E-06<>>>>>)
JST 1 FIL 0 ERR 4 (<E-06>>>>>) FIL 1 ERR 4 (<E-06>>>>>)
.SUBTITLE ^^DAROME, R\\OMAN ^NUMERAL ^GENERATOR
.PAGE
.NOFILL
^^DDDDDDD      AAA    RRRRRRRRR OOOOOOOOO MMM     MMM EEEEEEEE
DDD   DDD  AAA AAA  RRR   RRR OOO   OOO MMMM   MMMM EEE
DDD   DDD AAA   AAA RRRRRRR   OOO   OOO MMM M M MMM EEEEEE
DDD   DDD AAAAAAAAA RRR  RRR  OOO   OOO MMM  M  MMM EEE
DDDDDDD   AAA   AAA RRR   RRR OOOOOOOOO MMM     MMM EEEEEEEE
.SKIP 3
.FILL
.CENTER
DAROME, R\\OMAN ^NUMERAL ^GENERATOR
.CENTER
------##----- ------- ---------
.SKIP
^^DAROME \\REPRESENTS AN INTEGER VALUE IN ^ROMAN NUMERAL NOTATION SO
THAT IT CAN BE WRITTEN WITH A ^^FORTRAN \\FORMAT STATEMENT
CONTAINING A MULTIPLE OF AN ^A1 ALPHAMERIC FORMAT SPECIFICATION.
^THE ARGUMENT LIST OF ^^DAROME \\IS IDENTICAL TO THAT OF ^^DANUMB
\\EXCEPT FOR THE ^^DANUMB \\ARGUMENT ^^IRADIX \\WHICH IS NOT
APPLICABLE TO THE CONSTRUCTION OF ^ROMAN NUMERALS.
.SKIP
^VALUES OVER 3999 CANNOT BE REPRESENTED IN ^ROMAN NUMERAL NOTATION
SINCE THE THE LARGEST NUMBER HAVING A LETTER EQUIVALENT IS 1000
REPRESENTED BY ^M. ^THE ROUTINE COULD REPRESENT LARGER NUMBERS IF
LETTER ASSIGNMENTS FOR LARGER POWERS OF TEN AND FOR HALVES OF POWERS
OF TEN ARE DECIDED UPON AND INCORPORATED INTO THE ARRAY WHICH
SPECIFIES THESE ASSIGNMENTS IN ^^DAROME. V\\ALUES OF ZERO OR LESS
CANNOT BE REPRESENTED BY ^^DAROME \\SINCE ^ROMAN NUMERAL NOTATION
CANNOT BE USED TO REPRESENT THESE VALUES.
.SKIP
^^DAROME \\HAS NO OUTPUT ARGUMENT USED TO SIGNAL AN ERROR CONDITION.
^INSTEAD, THE CHARACTER COUNT ^^KOUNT \\IS RETURNED UNCHANGED IF THE
REPRESENTATION OF THE NUMBER WILL NOT FIT INTO THE BUFFER PROVIDED
OR IF THE VALUE IS NOT WITHIN THE RANGE WHICH CAN BE REPRESENTED.
.PAGE
.CENTER
^THE ^^DAROME A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DAROME \I\S
.SKIP
.NOFILL
      SUBROUTINE DAROME(KONTRL,NUMBER,LETTER,KOUNT,LFTCOL,
     1MAX)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION LETTER(MAX)
.FILL
.SKIP
T\\HE FOLLOWING ARE INPUT ARGUMENTS LEFT UNCHANGED
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KONTRL#=#0, \\LEFT JUSTIFY THE REPRESENTATION OF THE NUMBER.
.SKIP
^IF ^^KOUNT \\IS LESS THAN ^^LFTCOL, \\THEN THE OUTPUT BUFFER
STARTING AT ^^LETTER(KOUNT+1) \\AND EXTENDING THROUGH
^^LETTER(LFTCOL) \\WILL BE FILLED WITH SPACES.
.SKIP
^IF ^^KOUNT \\IS LESS THAN OR EQUAL TO ^^LFTCOL, \\THEN THE LEFTMOST
CHARACTER OF THE ^ROMAN NUMERAL REPRESENTATION OF THE NUMBER WILL BE
PLACED IN ^^LETTER(LFTCOL+1).
.SKIP
I\F KOUNT \\IS GREATER THAN ^^LFTCOL, \\MEANING THAT CHARACTERS ARE
ALREADY IN USE TO THE RIGHT OF ^^LFTCOL, \\THEN A SPACE WILL BE
PLACED IN ^^LETTER(KOUNT+1), \\AND THE LEFTMOST LETTER OF THE
REPRESENTATION OF THE NUMBER WILL BE PLACED IN ^^LETTER(KOUNT+2).
.SKIP
I\\F THE REPRESENTATION OF THE NUMBER WILL FIT INTO THE OUTPUT
BUFFER, THEN THE CHARACTER COUNT ^^KOUNT \\WILL BE LEFT POINTING TO
THE LOCATION OF THE RIGHTMOST LETTER OF THE REPRESENTATION OF THE
NUMBER. ^IF THE REPRESENTATION OF THE NUMBER WOULD EXTEND TO THE
RIGHT OF ^^LETTER(MAX), \\THEN THE CHARACTER COUNT ^^KOUNT \I\S
\\RETURNED UNCHANGED.
.SKIP
.INDENT -2
=#1, RIGHT JUSTIFY THE REPRESENTATION OF THE NUMBER SO THAT THE
RIGHTMOST LETTER OF THE REPRESENTATION OF THE NUMBER IS PLACED IN
^^LETTER(LFTCOL).
.SKIP
I\\F THE REPRESENTATION OF THE NUMBER REQUIRES LESS THAN
^^LFTCOL-KOUNT \\CHARACTERS, THEN FILL THE OUTPUT BUFFER WITH SPACES
STARTING AT ^^LETTER(KOUNT+1) \\AND EXTENDING UP TO THE LEFTMOST
CHARACTER OF THE REPRESENTATION OF THE NUMBER.
.SKIP
^IF THE REPRESENTATION OF THE NUMBER WILL FIT INTO THE OUTPUT
BUFFER, THEN THE CHARACTER COUNT ^^KOUNT \\WILL BE RETURNED EQUAL TO
^^LFTCOL. I\F LFTCOL \\IS GREATER THAN THE DIMENSION OF THE BUFFER,
OR IF THE NUMBER IS TOO LARGE TO BE REPRESENTED STARTING AT
^^LETTER(KOUNT+1) \\AND ENDING AT ^^LETTER(LFTCOL), \\THEN THE
CHARACTER COUNT ^^KOUNT \\IS RETURNED UNCHANGED.
.SKIP
.INDENT -9
^^NUMBER#=#\\THE INTEGER VALUE TO BE REPRESENTED.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS AN ARRAY TO WHICH THE REPRESENTATION OF
THE VALUE IS APPENDED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LETTER#=#\\THE OUTPUT BUFFER INTO WHICH ^^DAROME \\WILL PLACE THE
REPRESENTATION OF THE NUMBER AND WHICH CAN BE WRITTEN BY A MULTIPLE
OF AN ^A1 FORMAT BY THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED FOR BOTH INPUT TO, AND OUTPUT FROM
THIS ROUTINE.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KOUNT##=#\\IS INPUT CONTAINING THE NUMBER OF CHARACTERS ALREADY IN
USE IN THE OUTPUT BUFFER ^^LETTER \\ARRAY.
.SKIP
^IF THE REPRESENTATION OF THE VALUE WILL FIT INTO THE LETTER ARRAY,
THEN ^^KOUNT \\WILL BE RETURNED CONTAINING THE LOCATION WITHIN THE
^^LETTER \\ARRAY OF THE RIGHTMOST CHARACTER OF THE REPRESENTATION OF
THE VALUE. ^^KOUNT \\IS RETURNED UNCHANGED EITHER IF THE
REPRESENTATION OF THE VALUE WILL NOT FIT INTO THE ^^LETTER \\ARRAY
OR IF THE VALUE CANNOT BE REPRESENTED USING ^ROMAN NUMERAL NOTATION.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARE INPUT ARGUMENTS WHICH DESCRIBE THE SIZE OF THE
OUTPUT TEXT BUFFER. ^THESE ARGUMENTS ARE RETURNED UNCHANGED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LFTCOL#=#\\NUMBER OF CHARACTERS IN THE BUFFER WHICH ARE TO BE TO
THE LEFT OF THE REPRESENTATION OF THE NUMBER IF ^^KONTRL \\EQUALS 0.
.SKIP
.INDENT -2
=#POSITION IN THE BUFFER AT WHICH IS TO BE PLACED THE RIGHT LETTER
OF THE REPRESENTATION OF THE NUMBER IF ^^KONTRL \\EQUALS 1.
.SKIP
.INDENT -9
^^MAX####=#\\THE DIMENSION OF THE OUTPUT BUFFER ^^LETTER \\ARRAY.
^THE CHARACTER COUNT ^^KOUNT \\WILL BE RETURNED UNCHANGED IF THE
REPRESENTATION OF THE VALUE WOULD EXTEND BEYOND ^^LETTER(MAX).
.PAGE
.LEFT MARGIN 0
.FILL
.CENTER
P\\ROGRAM TO ^DEMONSTRATE THE ^USE OF ^^DAROME
.CENTER
------- -- ----------- --- --- -- ------
.SKIP
T\\HE PROGRAM LISTED BELOW ACCEPTS A VALUE FROM THE USER, TWICE
GENERATES THE LEFT JUSTIFIED ^ROMAN NUMERAL REPRESENTATION OF THE
NUMBER, WITH THE FIRST STARTING IN COLUMN 6, THEN GENERATES THE
RIGHT JUSTIFIED REPRESENTATION ENDING IN COLUMN 59. ^THE ASTERISKS
ORIGINALLY IN THE BUFFER ARE RETAINED IN COLUMN 1 BY SETTING
^^KOUNT=1 \\BEFORE GENERATING THE FIRST REPRESENTATION, TO THE RIGHT
OF THE SECOND REPRESENTATION BY INCREMENTING ^^KOUNT \\BY 1, AND IN
COLUMN 60 BY SETTING ^^LFTCOL=59 \\FOR THE RIGHT JUSTIFICATION. ^A
SAMPLE DIALOG BETWEEN THE PROGRAM AND THE USER IS PRESENTED BELOW
THE LISTING OF THE PROGRAM.
.SKIP
.NOFILL
      ^^DIMENSION LETTER(60)
      DATA ITTY,JTTY,MAX/5,5,60/
C
C     REQUEST AND READ NUMBER TO BE CONVERTED
      WRITE(JTTY,1)
    1 FORMAT(1X,37HPROGRAM TO DEMONSTRATE DAROME ROUTINE)
    2 WRITE(JTTY,3)
    3 FORMAT(7H VALUE ,$)
      READ(ITTY,4)NUMBER
    4 FORMAT(I)
      DO 5 I=1,MAX
    5 LETTER(I)=1H*
C
C     CONVERT NUMBER TO ROMAN NUMERAL FORM
      KOUNT=1
      LFTCOL=5
      KONTRL=0
      IPASS=-2
    6 CALL DAROME(KONTRL,NUMBER,LETTER,KOUNT,LFTCOL,
     1MAX)
      IPASS=IPASS+1
      IF(IPASS.LT.0)GO TO 6
      IF(IPASS.GT.0)GO TO 7
      KONTRL=1
      KOUNT=KOUNT+1
      LFTCOL=MAX-1
      GO TO 6
C
C     REPORT RESULTS TO USER
    7 WRITE(JTTY,8)LETTER
    8 FORMAT(1X,60A1)
      GO TO 2
      END
.SKIP
PROGRAM TO DEMONSTRATE DAROME ROUTINE
VALUE 3846
*    MMMDCCCXLVI MMMDCCCXLVI*                   MMMDCCCXLVI*
VALUE 29
*    XXIX XXIX*                                        XXIX*
.FILL
.SUBTITLE ^^DASAVE, I\\NTEGER _& ^CHARACTER ^^FORTRAN DATA S\\TATEMENT ^GENERATOR
.PAGE
.LEFT MARGIN 0
.NOFILL
^^DDDDD          AAA    SSSSSS        AAA  VV    VV  EEEEEEEE
DD   DD       AAAA  SS             AAAA  VV   VV   EE
DD    DD     AA AA  SS            AA AA  VV  VV    EE
DD    DD    AA  AA    SSSS       AA  AA  VV VV     EEEEE
DD    DD   AAAAAAA        SS    AAAAAAA  VVVV      EE
DD   DD   AA    AA        SS   AA    AA  VVV       EE
DDDDD    AA     AA  SSSSSS    AA     AA  VV        EEEEEEEE
.FILL
.LEFT MARGIN 0
.SKIP 3
.NOFILL
DASAVE, I\\NTEGER _& ^CHARACTER ^^FORTRAN DATA S\\TATEMENT ^GENERATOR
------##------- - --------- ------- ---- --------- ---------
.FILL
.SKIP
^THE ^^FORTRAN DATA \\STATEMENT GENERATOR ROUTINE NAMED ^^DASAVE
\\ALLOWS THE COMPILATION INTO A ^^FORTRAN \\PROGRAM OF INTEGER DATA
WHICH HAS BEEN CALCULATED BY ANOTHER PROGRAM OR OF ALPHAMERIC DATA
WHICH ANOTHER PROGRAM HAS READ USING A MULTIPLE OF AN ^A1 FORMAT.
.SKIP
^THE ^^DASAVE \\ROUTINE ACCEPTS AS INPUT AN INTEGER OR ALPHAMERIC
ARRAY WHICH CAN BE LONGER THAN CAN BE REPRESENTED BY A SINGLE ^^DATA
\\STATEMENT. ^OUTPUT CONSISTS OF THE ^^DIMENSION \\STATEMENTS FOR
THE ORIGINAL ARRAY AND FOR COMPONENT ARRAYS EACH SMALL ENOUGH TO BE
REPRESENTED BY A SINGLE ^^DATA \\STATEMENT, OF THE ^^EQUIVALENCE
\\STATEMENTS NECESSARY TO RECONSTRUCT THE ORIGINAL ARRAY FROM THE
COMPONENT ARRAYS, AND OF THE ^^DATA \\STATEMENTS REPRESENTING THE
COMPONENT ARRAYS. ^A MAXIMUM OF 200 COMPONENT ARRAYS CAN BE
REPRESENTED, BUT THIS LIMIT CAN EASILY BE RAISED BY INCREASING THE
DIMENSION OF A SINGLE ARRAY INTERNAL TO THE ^^DASAVE \\ROUTINE. ^IN
ADDITION TO THE LENGTH LIMIT IMPOSED BY THE MAXIMUM NUMBER OF
COMPONENT ARRAYS, THE MANNER IN WHICH THE NAMES OF THE COMPONENT
ARRAYS ARE CONSTRUCTED LIMITS THE LENGTH OF THE ORIGINAL ARRAY TO
99999 LOCATIONS.
.SKIP
^THE WIDTH OF THE STATEMENTS AND THE NUMBER OF LINES PER STATEMENT
ARE SPECIFIED BY THE CALLING PROGRAM. ^IF AN INTEGER ARRAY IS BEING
REPRESENTED, THE ^^DATA \\STATEMENTS CAN HAVE THE NUMBERS ARRANGED
IN COLUMNS OR ELSE COMPRESSED TO PRODUCE A SHORTER OUTPUT FILE.
^ALPHAMERIC ARRAYS ARE ALWAYS REPRESENTED WITH THE CHARACTERS
ARRANGED IN COLUMNS.
.SKIP
^A SINGLE CALL TO ^^DASAVE \\EITHER CAN PRODUCE THE COMPLETE SET OF
^^DIMENSION, EQUIVALENCE \\AND ^^DATA \\STATEMENTS NECESSARY TO
REPRESENT THE CONTENTS OF THE INPUT ARRAY, OR CAN PRODUCE ONLY THOSE
STATEMENTS OF A PARTICULAR TYPE WHICH WOULD BE COMBINED WITH
STATEMENTS GENERATED BY OTHER CALLS TO REPRESENT THE CONTENTS OF THE
INPUT ARRAY. ^IF SEVERAL ARRAYS ARE BEING REPRESENTED IN A SINGLE
OUTPUT FILE BY A SEQUENCE OF CALLS TO THIS ROUTINE, THEN SEPARATE
CALLS TO THIS ROUTINE SHOULD BE USED TO GENERATE ALL OF THE
STATEMENTS OF A PARTICULAR TYPE NECESSARY TO REPRESENT ALL OF THE
ARRAYS BEFORE GENERATING ALL OF THE STATEMENTS OF THE NEXT TYPE
SINCE SOME COMPILERS REQUIRE THAT ALL ^^DIMENSION \\AND
^^EQUIVALENCE \\STATEMENTS APPEAR PRIOR TO ANY ^^DATA \\STATEMENTS.
.SKIP 3
.CENTER
^THE ^^DASAVE R\\OUTINE ^ARGUMENT ^LIST
.CENTER
--- ------ ------- -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DASAVE \I\S
.SKIP
.NOFILL
      SUBROUTINE DASAVE(IPART ,IFORMT,MAXCLM,MAXLIN,IDATA ,
     1    KNTDAT,LETTER,KNTLTR,NAME  ,KNTNAM,IOUT  ,IERR  )
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IDATA(KNTDAT),LETTER(KNTLTR),NAME(KNTNAM)
.SKIP
.FILL
A\\LL ARGUMENTS EXCEPT ^^IERR \\ARE USED FOR INPUT ONLY AND ARE
RETURNED UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IPART##=#\\SPECIFIES WHETHER THE CURRENT CALL TO THIS ROUTINE IS
TO GENERATE ALL OF THE STATEMENTS NECESSARY TO REPRESENT THE
CONTENTS OF THE INPUT ARRAY, OR WHETHER THE CURRENT CALL IS TO
GENERATE ONLY THOSE STATEMENTS OF A PARTICULAR TYPE WHICH COULD BE
COMBINED WITH THE OUTPUT FROM OTHER CALLS TO THIS ROUTINE TO
REPRESENT THE CONTENTS OF THE INPUT ARRAY.
.INDENT -2
=#-1, CONSTRUCT ^^DIMENSION \\AND ^^EQUIVALENCE \\STATEMENTS BUT NOT
^^DATA \\STATEMENTS
.INDENT -2
=#0, CONSTRUCT ^^DIMENSION, EQUIVALENCE \\AND ^^DATA \\STATEMENTS
.INDENT -2
=#1, CONSTRUCT ^^DIMENSION \\STATEMENTS ONLY
.INDENT -2
=#2, CONSTRUCT ^^EQUIVALENCE \\STATEMENTS ONLY
.INDENT -2
=#3, CONSTRUCT ^^DATA \\STATEMENTS ONLY
.INDENT -2
=#-4, -3 OR -2, IDENTICAL TO ^^IPART=-1, 0 \\OR 1 RESPECTIVELY,
EXCEPT THAT THE RESULTING ^^DIMENSION \\STATEMENTS SPECIFY THE
COMPONENT ARRAYS NECESSARY TO CONSTRUCT THE ORIGINAL ARRAY, BUT DO
NOT INCLUDE THE NAME AND DIMENSION OF THE ORIGINAL ARRAY.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IFORMT#=#\\SPECIFIES WHETHER THE CHARACTERS IN THE ^^LETTER
\\ARRAY OR THE INTEGER VALUES IN THE ^^IDATA \\ARRAY ARE TO BE
REPRESENTED. ^IF INTEGER VALUES ARE BEING REPRESENTED, THEN ^^IFORMT
\\ALSO SPECIFIES WHETHER THE ^^DATA \\STATEMENTS ARE TO BE WRITTEN
WITH SPACES COMPACTED OUT, OR WITH THE NUMBERS ARRANGED IN COLUMNS.
.INDENT -2
=#-1, REPRESENTS THE CHARACTERS IN ^^LETTER(1) \\THROUGH AND
INCLUDING ^^LETTER(KNTLTR) \\IN A COLUMN FORM. ^EACH CHARACTER IS
PRECEDED BY 1^H IN THE ^^DATA \\STATEMENTS.
.INDENT -2
=#0, REPRESENTS THE INTEGER VALUES IN ^^IDATA(1) \\THROUGH AND
INCLUDING ^^IDATA(KNTDAT) \\IN A COMPACT FORM. ^ALTHOUGH THIS
COMPACT FORM IS ACCEPTABLE TO A ^^FORTRAN \\COMPILER, A PERSON WOULD
HAVE CONSIDERABLE DIFFICULTY LOCATING THE VALUE ASSOCIATED WITH A
PARTICULAR SUBSCRIPT WHEN VISUALLY SCANNING ^^DATA \\STATEMENTS
WRITTEN IN THIS COMPACT FORM.
.INDENT -2
=#1 OR GREATER, REPRESENTS THE INTEGERS VALUES IN ^^IDATA(1)
\\THROUGH AND INCLUDING ^^IDATA(KNTDAT) \\IN A COLUMN FORM. ^IF
^^IFORMT \\IS LESS THAN THE NUMBER OF CHARACTERS NEEDED TO REPRESENT
THE VALUE REQUIRING THE MOST CHARACTERS, THEN THE COLUMNS WILL BE OF
THE SAME WIDTH AS THE REPRESENTATION OF THE VALUE REQUIRING THE MOST
CHARACTERS. ^IF ^^IFORMT \\IS EQUAL TO OR GREATER THAN THE NUMBER OF
CHARACTERS NEEDED TO REPRESENT THE VALUE REQUIRING THE MOST
CHARACTERS, THEN THE WIDTH OF THE COLUMNS WILL EQUAL ^^IFORMT.
.SKIP
.INDENT -9
MAXCLM#=#\\THE MAXIMUM NUMBER OF CHARACTERS TO BE IN THE STATEMENT
FIELD OF EACH LINE IN THE OUTPUT. ^THE MAXIMUM VALUE OF ^^MAXCLM
\\IS 66 WHICH IS THE 72 CHARACTER TOTAL WIDTH OF A ^^FORTRAN
\\STATEMENT MINUS THE 6 CHARACTERS IN THE STATEMENT NUMBER AND
CONTINUATION FIELDS.
.SKIP
.INDENT -9
^^MAXLIN#=#\\THE MAXIMUM NUMBER OF LINES ONTO WHICH A ^^FORTRAN
\\STATEMENT CAN BE WRITTEN. ^^MAXLIN \\INCLUDES BOTH THE INITIAL
LINE OF THE STATEMENT AND ALL POSSIBLE CONTINUATION LINES. ^THERE IS
NO LIMIT IMPOSED BY THIS ROUTINE, BUT THE ^^FORTRAN \\COMPILER WILL
PROBABLY RESTRICT THE NUMBER OF LINES TO A NUMBER SUCH AS 10 OR 20.
.SKIP
.INDENT -9
^^IDATA##=#\\THE ARRAY OF INTEGER VALUES WHICH ARE TO BE REPRESENTED
IN THE OUTPUT ^^DATA \\STATEMENTS IF ^^IFORMT \\HAS THE VALUE ZERO
OR GREATER.
.SKIP
.INDENT -9
^^KNTDAT#=#\\THE NUMBER OF VALUES IN THE ^^IDATA \\ARRAY WHICH ARE
TO BE REPRESENTED IF ^^IFORMT \\HAS THE VALUE ZERO OR GREATER. ^ALL
VALUES STARTING WITH ^^IDATA(1) \\AND EXTENDING THROUGH
^^IDATA(KNTDAT) \\WILL BE REPRESENTED.
.SKIP
.INDENT -9
^^LETTER#=#\\THE ARRAY OF CHARACTERS WHICH ARE TO BE REPRESENTED IN
THE OUTPUT ^^DATA \\STATEMENTS IF ^^IFORMT \\HAS THE VALUE -1. ^EACH
LOCATION IN THE ^^LETTER \\ARRAY HOLDS A SINGLE CHARACTER READ BY AN
^A1 FORMAT OR DEFINED BY A 1^H FIELD.
.SKIP
.INDENT -9
^^KNTLTR#=#\\THE NUMBER OF LOCATIONS IN THE ^^LETTER \\ARRAY WHICH
CONTAIN CHARACTERS TO BE REPRESENTED IF ^^IFORMT \\HAS THE VALUE -1.
^^LETTER(1) \\THROUGH AND INCLUDING ^^LETTER(KNTLTR) \\EACH CONTAIN
A SINGLE CHARACTER WHICH IS TO BE REPRESENTED.
.SKIP
.INDENT -9
^^NAME###=#\\AN ARRAY CONTAINING THE LETTERS FORMING THE NAME OF THE
ARRAY AS IT IS TO BE WRITTEN INTO THE OUTPUT ^^DATA \\STATEMENTS.
^EACH LETTER IN THE ^^NAME \\ARRAY MUST BE READ BY AN ^A1 FORMAT OR
DEFINED BY A 1^H FIELD IN A ^^DATA \\STATEMENT IN THE CALLING PROGRAM.
.SKIP
^THE NAME OF A COMPONENT ARRAY IS CONSTRUCTED BY PLACING THE DIGITS
OF THE FIRST SUBSCRIPT REPRESENTED BY THE COMPONENT ARRAY TO THE
RIGHT OF THE BASIC NAME, OR IF THIS WOULD PRODUCE A COMPONENT ARRAY
NAME LONGER THAN 6 CHARACTERS BY REPLACING THE RIGHTMOST LETTERS OF
THE BASIC NAME WITH THE DIGITS OF THE FIRST SUBSCRIPT REPRESENTED BY
THE COMPONENT ARRAY. ^THEREFORE, NAMES OF THE FOLLOWING TYPES RESULT.
.SKIP
.NOFILL
BASIC NAME    NAMES OF TYPICAL COMPONENT ARRAYS
.SKIP
^^A             A001    A210    A419
ABC           ABC001  ABC210  ABC419
ABCDEF        ABCDE1  ABC210  ABC419
.FILL
.SKIP
T\\HE NAMES OF ALL COMPONENT ARRAYS ARE MADE TO BE OF THE SAME
LENGTH BY THE INSERTION OF ZEROES, IF NECESSARY, BETWEEN THE
CHARACTERS OF THE BASIC NAME AND THE CHARACTER REPRESENTATIONS OF
THE SMALLER CORRESPONDING ^^IDATA \\ARRAY SUBSCRIPTS.
.SKIP
.INDENT -9
^^KNTNAM#=#\\THE NUMBER OF LETTERS IN THE NAME CONTAINED IN THE
^^NAME \\ARRAY. ^^KNTNAM \\MUST BE 6 OR LESS. ^THE NAME IS CONTAINED
IN ^^NAME(1) \\THROUGH ^^NAME(KNTNAM).
.SKIP
.INDENT -9
IOUT###=#\\THE UNIT NUMBER ONTO WHICH THE ^^DATA \\STATEMENTS ARE TO
BE WRITTEN. ^THIS ROUTINE WILL ONLY GENERATE THE ^^FORTRAN
\\STATEMENTS NECESSARY TO REPRESENT THE DATA. ^IT IS THE
RESPONSIBILITY OF THE CALLING PROGRAM TO OPEN THE OUTPUT FILE AND TO
WRITE ANY OTHER ^^FORTRAN \\STATEMENTS AND/OR ^^FORTRAN \\COMMENT
LINES WHICH, DEPENDING UPON THE APPLICATION, MIGHT BE NECESSARY
EITHER BEFORE OR AFTER THE OUTPUT FROM THIS ROUTINE.
.SKIP
.INDENT -9
^^IERR###=#\\RETURNED DESCRIBING WHETHER THE VALUES OR CHARACTERS
COULD BE REPRESENTED. ^THE INPUT VALUE OF ^^IERR \\IS IGNORED.
.INDENT -2
=#0, RETURNED IF THE VALUES OR CHARACTERS COULD BE REPRESENTED.
.INDENT -2
=#1, RETURNED IF THE LINE WIDTH SPECIFIED BY ^^MAXCLM \\WAS TOO SHORT.
.INDENT -2
=#2, RETURNED IF MORE THAN 200 INDIVIDUAL ^^DATA \\STATEMENTS WOULD
BE REQUIRED.
.PAGE
.FILL
.LEFT MARGIN 0
.CENTER
^SAMPLE ^OUTPUT FROM THE ^^DASAVE \\ROUTINE
.CENTER
------ ------ ---- --- ---- -------
.SKIP
^THE FOLLOWING SHORT MAIN PROGRAM PRODUCED THE OUTPUT PRINTED BELOW
IT. ^THE ONLY DIFFERENCE BETWEEN THE 2 ^^DASAVE \\ROUTINE CALLS IS
IN THE VALUE OF ^^IFORMT \\WHICH IS 0 IN THE FIRST CALL AND 1 IN THE
SECOND.
.SKIP
.NOFILL
      ^^DIMENSION IDATA(115),NAME(6)
      DATA NAME/1HI,1HV,1HA,1HL,1HU,1HE/
      DATA IOUT,KNTDAT/1,115/
      DO 1 I=1,KNTDAT
    1 IDATA(I)=KNTDAT-I+1
      WRITE(IOUT,2)
    2 FORMAT(13H COMPACT FORM)
      CALL DASAVE(0,0,54,5,IDATA,
     1KNTDAT,LETTER,1,NAME,6,IOUT,IERR)
      WRITE(IOUT,3)
    3 FORMAT(12H COLUMN FORM)
      CALL DASAVE(0,1,54,5,IDATA,
     1KNTDAT,LETTER,1,NAME,6,IOUT,IERR)
      STOP
      END
.SKIP
 COMPACT FORM
      DIMENSION IVALUE(115),IVALU1(80),IVAL81(35)
      EQUIVALENCE (IVALU1(1),IVALUE(1)),
     1(IVAL81(1),IVALUE(81))
      DATA IVALU1/115,114,113,112,111,110,109,108,107,106,
     1105,104,103,102,101,100,99,98,97,96,95,94,93,92,91,90,
     289,88,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,
     371,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,
     453,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36/
      DATA IVAL81/35,34,33,32,31,30,29,28,27,26,25,24,23,22,
     121,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1/
 COLUMN FORM
      DIMENSION IVALUE(115),IVALU1( 50),IVAL51( 50),
     1          IVA101( 15)
      EQUIVALENCE (IVALU1(1),IVALUE(  1)),
     1            (IVAL51(1),IVALUE( 51)),
     2            (IVA101(1),IVALUE(101))
      DATA IVALU1/115,114,113,112,111,110,109,108,107,106,
     1            105,104,103,102,101,100, 99, 98, 97, 96,
     2             95, 94, 93, 92, 91, 90, 89, 88, 87, 86,
     3             85, 84, 83, 82, 81, 80, 79, 78, 77, 76,
     4             75, 74, 73, 72, 71, 70, 69, 68, 67, 66/
      DATA IVAL51/ 65, 64, 63, 62, 61, 60, 59, 58, 57, 56,
     1             55, 54, 53, 52, 51, 50, 49, 48, 47, 46,
     2             45, 44, 43, 42, 41, 40, 39, 38, 37, 36,
     3             35, 34, 33, 32, 31, 30, 29, 28, 27, 26,
     4             25, 24, 23, 22, 21, 20, 19, 18, 17, 16/
      DATA IVA101/ 15, 14, 13, 12, 11, 10,  9,  8,  7,  6,
     1              5,  4,  3,  2,  1/
.FILL
.SUBTITLE ^^DASHOW, D\\ISPLAYS ^INTEGER OR ^REAL ^NUMBER IN ^NARROWEST ^FIELD
.PAGE
.LEFT MARGIN 0
.NOFILL
^^DDDDD         AAA    SSSSSS  HH    HH    OOOOO    WW      WW
DD   DD      AAAA  SS        HH    HH   OO   OO   WW      WW
DD    DD    AA AA  SS        HH    HH  OO     OO  WW  WW  WW
DD    DD   AA  AA    SSSS    HHHHHHHH  OO     OO  WW WWWW WW
DD    DD  AAAAAAA        SS  HH    HH  OO     OO  WWWW  WWWW
DD   DD  AA    AA        SS  HH    HH   OO   OO   WWW    WWW
DDDDD   AA     AA  SSSSSS    HH    HH    OOOOO    WW      WW
.SKIP 2
.FILL
.CENTER
DASHOW, D\\ISPLAYS ^INTEGER OR ^REAL ^NUMBER IN ^NARROWEST ^FIELD
.CENTER
------##-------- ------- -- ---- ------ -- --------- -----
.SKIP
^^DASHOW \\REPRESENTS AN INTEGER VALUE OR A REAL VALUE SO THAT IT
CAN BE WRITTEN WITH A ^^FORTRAN \\FORMAT STATEMENT CONTAINING A
MULTIPLE ^A1 ALPHAMERIC SPECIFICATION. ^THE REPRESENTATION IS LEFT
JUSTIFIED AND RIGHTMOST FILL WITH SPACES (BLANKS) IS NOT PROVIDED.
^IF THE ARRAY WHICH IS SUPPLIED TO RECEIVE THE REPRESENTATION OF THE
NUMBER IS TOO SHORT, THEN THIS ARRAY IS INSTEAD FILLED WITH ASTERISKS.
.SKIP
^INTEGERS CAN BE REPRESENTED AS EITHER OCTAL OR DECIMAL NUMBERS.
^REAL VALUES CAN BE REPRESENTED WITHOUT AN EXPONENT, OR CAN BE
REPRESENTED IN A SCIENTIFIC NOTATION CONSISTING OF THE
REPRESENTATION OF A VALUE IN THE RANGE 1.0 THROUGH 9.999... FOLLOWED
BY THE LETTER ^E AND A REPRESENTATION OF THE POWER OF TEN BY WHICH
THE ORIGINAL VALUE WAS MULTIPLIED TO OBTAIN THE VALUE WITHIN THE
RANGE 1.0 THROUGH 9.999... ^IF A REAL VALUE IS BEING REPRESENTED,
THEN ANY ZERO WHICH IS TO THE RIGHT OF THE DECIMAL POINT AND WHICH
DOES NOT HAVE A NONZERO VALUE TO ITS RIGHT IS SUPPRESSED. ^A REAL
VALUE WHICH IS REPRESENTED WITHOUT AN EXPONENT AND WHICH HAS AN
ABSOLUTE VALUE LESS THAN ONE IS REPRESENTED WITHOUT A ZERO TO THE
LEFT OF THE DECIMAL POINT UNLESS THIS ZERO WOULD BE THE ONLY DIGIT
SHOWN.
.SKIP
^^DASHOW \\CALLS ^^DANUMB \\TO REPRESENT INTEGERS AND ^^DARITE \T\O
\\REPRESENT REAL VALUES. ^^DARITE \\MUST BE CALLED DIRECTLY IF MORE
FLEXIBILITY IN THE REPRESENTATION OF REAL VALUES IS REQUIRED.
.PAGE
.CENTER
^THE ^^DASHOW A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DASHOW \I\S
.NOFILL
.SKIP
      SUBROUTINE DASHOW(KONTRL,MINDEC,MAXDEC,MINSIG,MAXSIG,
     1    IDECML,IVALUE,VALUE ,MAXBFR,KOUNT ,IBUFFR,IERR  )
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENT IS USED ONLY FOR INPUT AND IS RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KONTRL#=#\\SELECTS WHETHER THE VALUE BEING REPRESENTED IS INPUT AS
AN INTEGER OR AS A REAL NUMBER.
.INDENT -2
=#-1, REPRESENT THE INTEGER VALUE INPUT AS THE ARGUMENT NAMED
^^IVALUE \\AS AN OCTAL NUMBER. ^IT SHOULD BE NOTED THAT IT IS THE
VALUE WHICH IS REPRESENTED, NOT THE PARTICULAR BIT SEQUENCE BY WHICH
THIS VALUE HAPPENS TO BE STORED IN THE COMPUTER. ^THE INTEGER HAVING
THE DECIMAL VALUE -8 WOULD BE REPRESENTED AS THE OCTAL NUMBER -10.
.INDENT -2
=#0, REPRESENT THE INTEGER VALUE INPUT AS THE ARGUMENT NAMED
^^IVALUE \\AS A DECIMAL NUMBER.
.INDENT -2
=#1 OR GREATER, REPRESENT THE REAL VALUE INPUT AS THE ARGUMENT NAMED
^^VALUE \\WITH NO MORE THAN ^^MAXDEC \\NOR LESS THAN ^^MINDEC
\\DIGITS TO THE RIGHT OF THE DECIMAL POINT AND WITH NO MORE THAN
^^MAXSIG \\NOR LESS THAN ^^MINSIG \\SIGNIFICANT DIGITS. ^IF THE
VALUE CANNOT BE REPRESENTED USING THE SPECIFIED NUMBERS OF DIGITS IN
FLOATING POINT FORM (WITHOUT AN ^E EXPONENT), THEN THE VALUE IS
INSTEAD REPRESENTED IN SCIENTIFIC NOTATION (WITH AN ^E EXPONENT) AND
WITH ^^IDECML \\DIGITS TO THE RIGHT OF THE DECIMAL POINT IN THE
REPRESENTATION OF THE VALUE WHICH EITHER HAS THE VALUE ZERO, OR
WHICH HAS BEEN MODIFIED THOUGH MULTIPLICATION BY A POWER OF TEN SO
AS TO FALL WITHIN THE RANGE 1.0 THROUGH 9.999...
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS CONTROL THE REPRESENTATION OF THOSE REAL
VALUES WHICH ARE SHOWN IN FLOATING POINT FORM (WITHOUT AN ^E
EXPONENT). ^THESE ARGUMENTS ARE RETURNED UNCHANGED, AND DO NOT
CONTROL THE REPRESENTATION OF INTEGERS OR OF THOSE REAL VALUES WHICH
ARE SHOWN IN SCIENTIFIC NOTATION (WITH AN ^E EXPONENT). ^HOWEVER, IF
^^MAXSIG \\IS SET TO ZERO, THEN THE REAL VALUE WILL BE SHOWN IN
SCIENTIFIC NOTATION.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^MINDEC#=#0, \\THERE IS NO LOWER LIMIT TO THE NUMBER OF DIGITS
WHICH MUST BE SHOWN TO THE RIGHT OF THE DECIMAL POINT OF A NUMBER
REPRESENTED IN FLOATING POINT FORM, AND THE FIELD INTO WHICH THE
REPRESENTATION OF THE NUMBER IS INSERTED DOES NOT EVEN NEED TO
INCLUDE ROOM FOR THE DECIMAL POINT.
.INDENT -2
=#GREATER THAN ZERO, ^^MINDEC \\IS THE MINIMUM NUMBER OF DIGITS
WHICH CAN BE SHOWN TO THE RIGHT OF THE DECIMAL POINT OF A NUMBER
REPRESENTED IN FLOATING POINT FORM IF THE RIGHTMOST OF THESE DIGITS
IS NONZERO. ^IF IT WOULD NOT BE POSSIBLE TO INCLUDE AT LEAST THIS
NUMBER OF DIGITS TO THE RIGHT OF THE DECIMAL POINT, THEN THE VALUE
WILL BE REPRESENTED IN SCIENTIFIC NOTATION INSTEAD. ^AFTER
DETERMINING THAT IT WOULD BE POSSIBLE TO REPRESENT AT LEAST ^^MINDEC
\\DIGITS TO THE RIGHT OF THE DECIMAL POINT, THEN EACH DIGIT WHICH IS
TO THE RIGHT OF THE DECIMAL POINT AND WHICH DOES NOT HAVE A NONZERO
DIGIT TO ITS RIGHT IS SUPPRESSED AND EVEN THE DECIMAL POINT WILL NOT
BE SHOWN IF THERE ARE NO NONZERO DIGITS TO THE RIGHT OF THE DECIMAL
POINT.
.SKIP
.INDENT -9
^^MAXDEC#=#0, \\REPRESENT ONLY THE DIGITS WHICH ARE TO THE LEFT OF
THE DECIMAL POINT OF A NUMBER REPRESENTED IN FLOATING POINT FORM.
^THE DECIMAL POINT WILL NOT BE SHOWN.
.INDENT -2
=#GREATER THAN ZERO, ^^MAXDEC \\IS THE MAXIMUM NUMBER OF DIGITS
WHICH CAN BE SHOWN TO THE RIGHT OF THE DECIMAL POINT OF A NUMBER
REPRESENTED IN FLOATING POINT FORM. ^IF ^^MAXSIG (\\THE MAXIMUM
NUMBER OF SIGNIFICANT DIGITS) MINUS THE NUMBER OF DIGITS TO THE LEFT
OF THE DECIMAL POINT IS LESS THAN ^^MAXDEC \\BUT NOT LESS THAN
^^MINDEC, \\THEN THE NUMBER OF DIGITS TO THE RIGHT OF THE DECIMAL
POINT IS INSTEAD SET TO ^^MAXSIG \\MINUS THE NUMBER OF DIGITS TO THE
LEFT OF THE DECIMAL POINT. ^IF ^^MAXSIG \\MINUS THE NUMBER OF DIGITS
TO THE LEFT OF THE DECIMAL POINT IS LESS THAN ^^MINDEC, \\THEN THE
NUMBER IS REPRESENTED IN SCIENTIFIC NOTATION INSTEAD.
.SKIP
.INDENT -9
^^MINSIG#=#\\MINIMUM NUMBER OF SIGNIFICANT DIGITS WHICH CAN BE SHOWN
IN A NUMBER REPRESENTED IN FLOATING POINT FORM IF THE RIGHTMOST OF
THESE DIGITS IS NONZERO. ^IF THE FLOATING POINT REPRESENTATION OF
THE VALUE WOULD CONTAIN LESS THAN ^^MINSIG \\SIGNIFICANT DIGITS,
THEN THE VALUE WILL BE REPRESENTED IN SCIENTIFIC NOTATION. ^IF THE
VALUE BEING DISPLAYED HAS THE VALUE ZERO, THEN ^^MINSIG \\IS IGNORED.
.SKIP
.INDENT -9
^^MAXSIG#=#0, \\REPRESENT THE VALUE INPUT AS THE ARGUMENT NAMED
^^VALUE \\IN SCIENTIFIC NOTATION (WITH AN ^E EXPONENT) RATHER THAN
IN FLOATING POINT FORM (WITHOUT AN ^E EXPONENT).
.INDENT -2
=#GREATER THAN ZERO, ^^MAXSIG \\IS THE MAXIMUM NUMBER OF DIGITS
WHICH CAN BE SHOWN IN A NUMBER REPRESENTED IN FLOATING POINT FORM,
STARTING WITH THE LEFTMOST NONZERO DIGIT, COUNTING IT AND ALL DIGITS
TO ITS RIGHT. ^^MAXSIG \\DOES NOT INCLUDE THE DECIMAL POINT AND DOES
NOT INCLUDE THE MINUS SIGN IF THE VALUE IS NEGATIVE. ^THE NUMBER OF
DIGITS DISPLAYED TO THE RIGHT OF THE DECIMAL POINT IS REDUCED IF
NECESSARY SO THAT THE NUMBER OF DIGITS STARTING AT THE LEFTMOST
NONZERO DISPLAYED DIGIT AND COUNTING IT AND ALL DIGITS DISPLAYED TO
ITS RIGHT DOES NOT EXCEED ^^MAXSIG. I\F MAXSIG \\WOULD BE LESS THAN
THE NUMBER OF DIGITS LEFT OF THE DECIMAL POINT IN THE REPRESENTATION
OF THE VALUE, THEN THE VALUE WILL BE REPRESENTED IN SCIENTIFIC
NOTATION.
.SKIP
.INDENT -9
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT CONTROLS THE REPRESENTATION OF THOSE VALUES
WHICH ARE SHOWN IN SCIENTIFIC NOTATION (WITH AN ^E EXPONENT). ^THIS
ARGUMENT IS RETURNED UNCHANGED, AND DOES NOT CONTROL THE
REPRESENTATION OF INTEGERS OR OF THOSE REAL VALUES WHICH ARE
REPRESENTED IN FLOATING POINT FORM (WITHOUT AN ^E EXPONENT).
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^IDECML#=#\\SAME AS ^^MAXDEC \\EXCEPT THAT ^^IDECML \\APPLIES ONLY
TO VALUES DISPLAYED IN SCIENTIFIC NOTATION. ^NOTE THAT IF THE VALUE
IS BEING REPRESENTED IN SCIENTIFIC NOTATION, THEN A NONZERO DIGIT
WILL BE USED LEFT OF THE DECIMAL POINT UNLESS THE VALUE IS ITSELF
ZERO. ^THEREFORE, THE MAXIMUM NUMBER OF SIGNIFICANT DIGITS WHICH CAN
BE DISPLAYED IN SCIENTIFIC NOTATION IS ^^IDECML+1.
.SKIP
.LEFT MARGIN 0
T\\HE FOLLOWING ARGUMENTS ARE USED ONLY FOR INPUT AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IVALUE#=#\\INPUT CONTAINING THE INTEGER VALUE TO BE REPRESENTED IF
^^KONTRL \\IS LESS THAN OR EQUAL TO ZERO.
.SKIP
.INDENT -9
^^VALUE##=#\\INPUT CONTAINING THE REAL VALUE TO BE REPRESENTED IF
^^KONTRL \\IS GREATER THAN ZERO.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE RIGHTMOST LOCATION IN THE ^^IBUFFR
\\ARRAY WHICH CAN BE USED BY THIS ROUTINE FOR THE RETURN OF
CHARACTERS IN THE REPRESENTATION OF THE NUMBER. ^THE REPRESENTATION
OF THE NUMBER WILL USE FEWER LOCATIONS IN THE ^^IBUFFR \\ARRAY IF
POSSIBLE.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT IS USED BOTH FOR INPUT TO THIS ROUTINE AND
FOR OUTPUT TO THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KOUNT##=#\\INPUT CONTAINING THE SUBSCRIPT OF THE RIGHTMOST
(HIGHEST SUBSCRIPT VALUE) ^^IBUFFR \\ARRAY LOCATION WHICH IS
CURRENTLY IN USE AND WHICH MUST BE PRESERVED. ^THE REPRESENTATION OF
THE NUMBER WILL BE RETURNED STARTING IN ^^IBUFFR(KOUNT+1) \\AND
EXTENDING THROUGH ^^IBUFFR(MAXBFR) \\IF NECESSARY.
.INDENT -2
=#RETURNED CONTAINING THE SUBSCRIPT OF THE RIGHTMOST ^^IBUFFR
\\ARRAY LOCATION IN WHICH A CHARACTER OF THE REPRESENTATION OF THE
NUMBER IS RETURNED. ^THE PORTION OF THE ^^IBUFFR \\ARRAY TO THE
RIGHT OF THE REPRESENTATION AND EXTENDING THROUGH ^^IBUFFR(MAXBFR)
\\IS RETURNED UNDEFINED, BUT POSSIBLY CHANGED.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR OUTPUT. ^THEIR INPUT
VALUES ARE IGNORED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IBUFFR#=#\\ARRAY IN WHICH THE CHARACTERS WHICH FORM THE
REPRESENTATION OF THE NUMBER ARE RETURNED AS THOUGH READ BY A
MULTIPLE OF AN ^A1 FORMAT SPECIFICATION OR AS THOUGH DEFINED BY
SEVERAL 1^H FIELDS. ^THE LEFTMOST CHARACTER OF THE REPRESENTATION IS
RETURNED IN ^^IBUFFR(KOUNT+1). KOUNT \\IS RETURNED CONTAINING THE
SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION CONTAINING THE RIGHTMOST
CHARACTER OF THE REPRESENTATION OF THE NUMBER.
.SKIP
.INDENT -9
^^IERR###=#-1, \\RETURNED IF THE FIELD STARTING WITH
^^IBUFFR(KOUNT+1) \\AND EXTENDING THROUGH ^^IBUFFR(MAXBFR) \\WAS TOO
SHORT TO CONTAIN THE REPRESENTATION OF THE NUMBER. ^THIS FIELD IS
RETURNED CONTAINING ASTERISKS, AND ^^KOUNT \\IS RETURNED SET EQUAL
TO ^^MAXBFR. I\F KONTRL \\IS GREATER THAN ZERO, THEN THE FIELD WAS
TOO SHORT TO CONTAIN EVEN THE REPRESENTATION OF THE REAL NUMBER IN
SCIENTIFIC NOTATION.
.INDENT -3
#=#0, RETURNED IF ^^KONTRL \\IS LESS THAN OR EQUAL TO ZERO AND THE
INTEGER VALUE COULD BE SHOWN, OR IF ^^KONTRL \\IS GREATER THAN ZERO
AND THE REAL VALUE WAS REPRESENTED IN FLOATING POINT FORM.
.INDENT -3
#=#1 OR GREATER, RETURNED IF ^^KONTRL \\IS INPUT GREATER THAN ZERO
SELECTING THE REPRESENTATION OF THE REAL NUMBER WHICH WAS INPUT AS
THE ARGUMENT NAMED ^^VALUE, \\AND THIS VALUE WAS REPRESENTED IN
SCIENTIFIC NOTATION. ^^IERR \\IS THE NUMBER OF DIGITS WHICH WOULD BE
SHOWN TO THE LEFT OF THE EXPONENT IF THE RIGHTMOST OF THESE DIGITS
IS NONZERO. ^ZEROES WHICH ARE TO THE RIGHT OF THE DECIMAL POINT AND
WHICH DO NOT HAVE A NONZERO DIGIT TO THEIR RIGHT ARE NOT SHOWN BUT
ARE INCLUDED IN THE VALUE OF ^^IERR. I\\F THIS ROUTINE IS BEING
CALLED TO APPEND THE REPRESENTATION OF A NUMBER TO A LINE OF TEXT
WHICH ALREADY CONTAINS OTHER INFORMATION, THEN THE CALLING PROGRAM
CAN TEST THE RETURNED VALUE OF ^^IERR \\TO DETERMINE WHETHER THERE
WAS ENOUGH ROOM AT THE END OF THE LINE FOR THE NUMBER TO BE
REPRESENTED WITH SUFFICIENT ACCURACY.
.LEFT MARGIN 0
.PAGE
.LEFT MARGIN 0
.CENTER
^DEMONSTRATION ^PROGRAM TO ^INTERACTIVELY ^TEST ^^DASHOW A\\RGUMENTS
.CENTER
------------- ------- -- ------------- ---- ------ ---------
.SKIP
^THE USER OF THE PROGRAM LISTED BELOW TYPES A PAIR OR PAIRS OF INPUT
ARGUMENT NAMES AND VALUES. ^^DASHOW \\IS CALLED AT THE END OF EACH
INPUT LINE, OR WHENEVER A SEMICOLON IS FOUND.
.SKIP
.NOFILL
      ^^DIMENSION IBUFFR(60),JBUFFR(60),KNTLTR(9),IWORD(53),
     1NUMTYP(9)
      DATA IWORD/                 1HK,1HO,1HN,1HT,1HR,1HL,
     1  1HM,1HI,1HN,1HD,1HE,1HC,  1HM,1HA,1HX,1HD,1HE,1HC,
     2  1HM,1HI,1HN,1HS,1HI,1HG,  1HM,1HA,1HX,1HS,1HI,1HG,
     3  1HI,1HD,1HE,1HC,1HM,1HL,  1HI,1HV,1HA,1HL,1HU,1HE,
     4  1HV,1HA,1HL,1HU,1HE,      1HM,1HA,1HX,1HB,1HF,1HR/
      DATA KONTRL,MINDEC,MAXDEC,MINSIG,MAXSIG,IDECML,IVALUE,
     1VALUE,MAXBFR/0,0,0,0,0,0,0,0.0,60/,ITTY,JTTY/5,5/,
     2KNTLTR/6,6,6,6,6,6,6,5,6/,NUMTYP/0,0,0,0,0,0,0,1,0/
      KIND=0
    1 WRITE(JTTY,2)KONTRL,MINDEC,MAXDEC,MINSIG,MAXSIG,
     1IDECML,MAXBFR,IVALUE,VALUE
    2 FORMAT(8H  KONTRL,I3,7H MINDEC,I3,7H MAXDEC,I3,
     17H MINSIG,I3,7H MAXSIG,I3,7H IDECML,I3/8H  MAXBFR,I3,
     27H IVALUE,I13,7H  VALUE,1E13.4)
    3 WRITE(JTTY,4)
    4 FORMAT(2H *,$)
      READ(ITTY,5)JBUFFR
    5 FORMAT(60A1)
      LOWBFR=1
C     OBTAIN NEXT USER SPECIFICATION OF ARGUMENT VALUE
    6 CALL DALEAD(-2,-3,1,1,53,
     1IWORD,1,9,KNTLTR,NUMTYP,2,1,
     2IWORD,2,1,KNTLTR,JBUFFR,60,LOWBFR,
     3KIND,KOMAND,KWRDID,KCNTID,LOCAL,LWRDID,LCNTID,
     4INITAL,JVALUE,AVALUE,IFLOAT)
      GO TO(8,8,3,6,7,6,6,6,8,3,6,7,6,6,6),KIND
    7 IF(KOMAND.EQ.1)KONTRL=JVALUE
      IF(KOMAND.EQ.2)MINDEC=JVALUE
      IF(KOMAND.EQ.3)MAXDEC=JVALUE
      IF(KOMAND.EQ.4)MINSIG=JVALUE
      IF(KOMAND.EQ.5)MAXSIG=JVALUE
      IF(KOMAND.EQ.6)IDECML=JVALUE
      IF(KOMAND.EQ.7)IVALUE=JVALUE
      IF(KOMAND.EQ.8)VALUE =AVALUE
      IF(KOMAND.EQ.9)MAXBFR=JVALUE
      GO TO 6
C     REPORT REPRESENTATION OF NUMBER IN SPECIFIED FORMAT
    8 KOUNT=0
      CALL DASHOW(KONTRL,MINDEC,MAXDEC,MINSIG,MAXSIG,
     1    IDECML,IVALUE,VALUE ,MAXBFR,KOUNT ,IBUFFR,IERR  )
      IF(KOUNT.GT.0)WRITE(JTTY,9)IERR,(IBUFFR(I),I=1,KOUNT)
    9 FORMAT(3H  (,1I2,2H) ,60A1)
      IF(KIND.EQ.1)GO TO 1
      GO TO 6
      END
.NOFILL
.PAGE
T\\YPICAL ^DIALOG ^BETWEEN ^^DASHOW D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
 ^^KONTRL  0 MINDEC  0 MAXDEC  0 MINSIG  0 MAXSIG  0 IDECML  0
 MAXBFR 60 IVALUE            0  VALUE   0.0000E+00
*KONTRL 1 MAXD 2 MAXS 6 VAL 12.03;VAL 12.003;VAL 12.006
 ( 0) 12.03
 ( 0) 12
 ( 0) 12.01
 KONTRL  1 MINDEC  0 MAXDEC  2 MINSIG  0 MAXSIG  6 IDECML  0
 MAXBFR 60 IVALUE            0  VALUE   0.1201E+02
*VAL -0.03;VAL -0.003;VAL -.006;MINS 4;IDEC 3
 ( 0) -.03
 ( 0) -0
 ( 0) -.01
 ( 1) -6E-3
 ( 4) -6E-3
 KONTRL  1 MINDEC  0 MAXDEC  2 MINSIG  4 MAXSIG  6 IDECML  3
 MAXBFR 60 IVALUE            0  VALUE  -0.6000E-02
*VAL 12345.6;VAL 1234.56;VAL 123.456;VAL 12.3456;VAL 1.23456
 ( 0) 12345.6
 ( 0) 1234.56
 ( 0) 123.46
 ( 0) 12.35
 ( 4) 1.235
 KONTRL  1 MINDEC  0 MAXDEC  2 MINSIG  4 MAXSIG  6 IDECML  3
 MAXBFR 60 IVALUE            0  VALUE   0.1235E+01
*MAXS 4 MINS 4 MIND 2 VA 9.994;VA 9.996;VA 99.994;VA 99.996
 ( 4) 9.994
 ( 0) 10
 ( 0) 99.99
 ( 4) 1E2
 KONTRL  1 MINDEC  2 MAXDEC  2 MINSIG  4 MAXSIG  4 IDECML  3
 MAXBFR 60 IVALUE            0  VALUE   0.1000E+03
*MAXS 0 MAXB 7 VAL 0.001234;MAXB 6;MAXB 5;MAXB 4;MAXB 3
 ( 3) 1.23E-3
 ( 2) 1.2E-3
 ( 1) 1E-3
 ( 1) 1E-3
 (-1) ***
 KONTRL  1 MINDEC  2 MAXDEC  2 MINSIG  4 MAXSIG  0 IDECML  3
 MAXBFR  3 IVALUE            0  VALUE   0.1234E-02
*MAXS 0 MAXB 7 VAL -0.001234;MAXB 6;MAXB 5;MAXB 4;MAXB 3
 ( 2) -1.2E-3
 ( 1) -1E-3
 ( 1) -1E-3
 (-1) ****
 (-1) ***
 KONTRL  1 MINDEC  2 MAXDEC  2 MINSIG  4 MAXSIG  0 IDECML  3
 MAXBFR  3 IVALUE            0  VALUE  -0.1234E-02
.SUBTITLE ^^DASITE, R\\OUTINE TO ^LOCATE ^SIMULATED ^ARRAY ^ITEM IN ^BUFFER
.PAGE
.LEFT MARGIN 0
.NOFILL
  ^^DDDDD          AAA    SSSSSS  IIIIII  TTTTTTTT  EEEEEEEE
  DD   DD       AAAA  SS          II       TT     EE
  DD    DD     AA AA  SS          II       TT     EE
  DD    DD    AA  AA    SSSS      II       TT     EEEEE
  DD    DD   AAAAAAA        SS    II       TT     EE
  DD   DD   AA    AA        SS    II       TT     EE
  DDDDD    AA     AA  SSSSSS    IIIIII     TT     EEEEEEEE
.SKIP 3
.FILL
.CENTER
DASITE, R\\OUTINE TO ^LOCATE ^SIMULATED ^ARRAY ^ITEM IN ^BUFFER
.CENTER
------##------- -- ------ --------- ----- ---- -- ------
.SKIP
^^DASITE \\RETURNS THE POSITION WITHIN A SINGLY SUBSCRIPTED BUFFER
OF A SINGLE ITEM OF A POSSIBLY MULTIPLY SUBSCRIPTED ARRAY
EQUIVALENCED WITH OR OTHERWISE LOADED INTO PART OR ALL OF THE SINGLY
SUBSCRIPTED BUFFER (AS DEFINED PERHAPS BY THE DICTIONARY CONSTRUCTED
BY THE ^^DALOAD \\ROUTINE). ^THERE IS NO UPPER LIMIT TO THE NUMBER
OF SUBSCRIPTS OF THE ARRAYS SIMULATED IN THE BUFFER (OTHER THAN THE
OBVIOUS RESTRICTIONS IMPOSED BY THE LENGTHS OF THE ^^NOWSUB \\AND
^^NUMSTR \\ARRAYS AND BY THE LENGTH OF THE BUFFER ITSELF). ^THE
RANGE OF VALUES OF ANY SUBSCRIPT CAN START AT ANY VALUE AND CAN BE
EITHER INCREASING OR DECREASING. ^THIS CONVERSION IS THE OPPOSITE OF
THAT PERFORMED BY ^^DANAME.
.SKIP
F\\OR EXAMPLE, IF THE FIRST STATEMENT READ DURING THE CONSTRUCTION
OF THE DICTIONARY BY ^^DALOAD \\WAS
.SKIP
.NOFILL
      ^^DIMENSION FIRST(10),SECOND(10,10),THIRD(10,10,10)
.FILL
.SKIP
\\AND IF IT IS ASSUMED THAT THE FIRST (LEFT) SUBSCRIPT OF EACH
SIMULATED ARRAY VARIES THE MOST RAPIDLY (THE USUAL ^^FORTRAN
\\CONVENTION FOR ARRAY NAMES APPEARING WITHOUT SUBSCRIPTS IN ^^READ
\\AND ^^WRITE \\STATEMENTS) THEN THE SIMULATED ARRAY LOCATION
^^THIRD(3,2,1) \\WOULD BE EQUIVALENT TO THE SINGLY SUBSCRIPTED
BUFFER LOCATION HAVING THE SUBSCRIPT 123. ^THE ARRAY NAME AND ITS
SUBSCRIPTS ARE CONVERTED BY ^^DASITE \\TO THE BUFFER LOCATION
SUBSCRIPT BY DETERMINING THAT THE LOCATIONS BELOW THE DESIRED
LOCATION INCLUDE
.SKIP
.LEFT MARGIN 5
.INDENT -3
A.#ALL 10 LOCATIONS OF THE ^^FIRST \\ARRAY
.SKIP
.INDENT -3
B.#ALL 100 LOCATIONS OF THE ^^SECOND \\ARRAY
.SKIP
.INDENT -3
C.#THE 10 LOCATIONS ^^THIRD(1,1,1) \\THROUGH ^^THIRD(10,1,1)
.SKIP
.INDENT -3
\\D.#THE 2 LOCATIONS ^^THIRD(1,2,1) \\AND ^^THIRD(2,2,1)
.LEFT MARGIN 0
.PAGE
.CENTER
T\H\E DASITE A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DASITE \I\S
.SKIP
.NOFILL
      SUBROUTINE DASITE(IRAPID,KOUNT ,LOWSUB,KNTSUB,NOWSUB,
     1    IEXTRA,LRGNUM,NUMUSD,NUMSTR,LSTKNT,NUMINI,INITAL,
     2    LOCATN)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION NOWSUB(KNTSUB),NUMSTR(NUMUSD)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED AS INPUT ONLY AND ARE RETURNED
UNCHANGED
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^IRAPID#=#0, \\THE SIMULATED ARRAYS, IF MULTIPLY SUBSCRIPTED, HAVE
THEIR LEFT SUBSCRIPTS VARYING THE MOST RAPIDLY. ^THIS IS THE NORMAL
^^FORTRAN \\CONVENTION FOR ^^READ\\S OR ^^WRITE\\S IN WHICH THE NAME
OF THE ARRAY IS USED WITHOUT ANY SUBSCRIPTS.
.INDENT -2
=#1, THE SIMULATED ARRAYS, IF MULTIPLY SUBSCRIPTED, HAVE THEIR RIGHT
SUBSCRIPTS VARYING THE MOST RAPIDLY.
.SKIP
.INDENT -9
^^KOUNT##=#\\SEQUENCE NUMBER OF THE DESIRED ARRAY AMONG ALL ARRAYS
IN THE BUFFER. ^THE FIRST ARRAY WOULD BE SELECTED BY ^^KOUNT=1,
\\THE SECOND BY ^^KOUNT=2 \\AND SO ON.
.SKIP
.INDENT -9
^^LOWSUB#=#\\SUBSCRIPT OF THE ^^NOWSUB \\ARRAY LOCATION CONTAINING
THE FIRST SIMULATED SUBSCRIPT OF THE POSSIBLY MULTIPLY SUBSCRIPTED
ARRAY LOCATION BEING FOUND WITHIN THE SINGLY SUBSCRIPTED BUFFER.
.SKIP
.INDENT -9
^^KNTSUB#=#\\SUBSCRIPT OF THE ^^NOWSUB \\ARRAY LOCATION CONTAINING
THE FINAL SIMULATED SUBSCRIPT OF THE POSSIBLY MULTIPLY SUBSCRIPTED
ARRAY LOCATION BEING FOUND WITHIN THE SINGLY SUBSCRIPTED BUFFER. ^IF
THE LOWER PORTION OF THE ^^NOWSUB \\ARRAY IS USED, THEN ^^LOWSUB
\\WILL HAVE THE VALUE 1 AND ^^KNTSUB \\WILL BE THE NUMBER OF
SIMULATED SUBSCRIPTS OF THE POSSIBLY MULTIPLY SUBSCRIPTED ARRAY.
.SKIP
.INDENT -9
^^NOWSUB#=#\\ARRAY CONTAINING THE SIMULATED SUBSCRIPTS OF THE
POSSIBLY MULTIPLY SUBSCRIPTED ARRAY LOCATION BEING FOUND WITHIN THE
SINGLY SUBSCRIPTED BUFFER. ^^NOWSUB(LOWSUB) \\THROUGH
^^NOWSUB(KNTSUB) \\CONTAIN THE VALUES OF THE SIMULATED SUBSCRIPTS.
.SKIP
.INDENT -9
^^IEXTRA#=#0, \\FOR EACH SIMULATED ARRAY, THE ^^NUMSTR \\ARRAY
CONTAINS ONLY THE NUMBER OF SUBSCRIPTS AND THE SUBSCRIPT LIMITS.
.INDENT -2
=#GREATER THAN ZERO, ^^NUMSTR(LRGNUM) \\CONTAINS THE FIRST OF
^^IEXTRA \\WORDS WHICH APPEAR BEFORE THE FIRST SUBSCRIPT
DESCRIPTION. ^THEREAFTER, ^^IEXTRA \\EXTRA WORDS ARE TO BE IGNORED
BETWEEN DESCRIPTIONS OF CONSECUTIVE SIMULATED ARRAYS.
.INDENT -2
=#-1, THE DESCRIPTION OF THE SUBSCRIPT RANGES FOR EACH OF THE
SIMULATED ARRAYS IS PRECEDED BY A VARIABLE NUMBER OF WORDS TO BE
IGNORED. ^EACH SECTION TO BE IGNORED STARTS WITH A WORD CONTAINING
THE NUMBER OF WORDS EXCLUSIVE OF ITSELF WHICH ARE TO BE IGNORED
BEFORE THE NEXT SUBSCRIPT COUNT IS FOUND. ^^NUMSTR(LRGNUM) \\THEN
CONTAINS THE NUMBER OF WORDS EXCLUSIVE OF ITSELF WHICH ARE TO BE
IGNORED BEFORE THE FIRST SUBSCRIPT COUNT AND RANGE DESCRIPTIONS.
.INDENT -2
=#-2, THE CONTENTS OF THE ^^NUMSTR \\ARRAY WERE DEFINED BY THE
^^DALOAD \\ROUTINE. ^THE DESCRIPTION OF THE SUBSCRIPT RANGES FOR
EACH OF THE SIMULATED ARRAYS IS PRECEDED BY 2 EXTRA WORDS. ^^LRGNUM
\\CAN CONTAIN THE SUBSCRIPT OF THE START OF THE DESCRIPTION OF A
LOGICAL GROUP OF ARRAYS, OR CAN CONTAIN THE SUBSCRIPT OF THE START
OF THE DESCRIPTION OF THE FIRST ARRAY IN THE LOGICAL GROUP. ^IF
^^NUMSTR(LRGNUM) \\IS LESS THAN OR EQUAL TO ZERO THEN THE SUBSEQUENT
ARRAY DESCRIPTION IS THE FIRST WHICH CAN BE MATCHED BY THIS ROUTINE,
AND THE DICTIONARY IS EFFECTIVELY TERMINATED PRIOR TO THE NEXT ARRAY
DESCRIPTION WHICH DOES NOT START WITH A VALUE GREATER THAN ZERO. ^IF
^^NUMSTR(LRGNUM) \\IS GREATER THAN ZERO, THEN THE ARRAY DESCRIPTION
STARTING WITH ^^NUMSTR(LRGNUM) \\IS THE FIRST WHICH CAN BE MATCHED
BY THIS ROUTINE, AND THE DICTIONARY IS EFFECTIVELY TERMINATED PRIOR
TO THE FIRST ARRAY DESCRIPTION WHICH DOES NOT START WITH A VALUE
GREATER THAN ZERO.
.SKIP
.INDENT -9
^^LRGNUM#=#\I\F IEXTRA \\IS GREATER THAN -2, OR ELSE IF ^^IEXTRA=-2
\\AND ^^NUMSTR(LRGNUM) \\IS GREATER THAN ZERO, THEN ^^LRGNUM \I\S
\\THE SUBSCRIPT OF THE ^^NUMSTR \\ARRAY LOCATION CONTAINING THE
START OF THE DESCRIPTION OF THE SIMULATED ARRAY WHICH WOULD BE
SELECTED IF ^^KOUNT=1.
.INDENT -2
=#\I\F IEXTRA=-2 \\AND IF ^^NUMSTR(LRGNUM) \\IS LESS THAN OR EQUAL
TO ZERO, THEN ^^NUMSTR(LRGNUM) \\IS THE FIRST LOCATION IN THE
DESCRIPTION OF THE LOGICAL GROUP OF ARRAYS CONTAINING THE ARRAY TO
BE IDENTIFIED, AND THE SUBSEQUENT DESCRIPTION IS OF THE ARRAY WHICH
WOULD BE SELECTED IF ^^KOUNT=1.
.SKIP
.INDENT -9
NUMUSD#=#\\SUBSCRIPT OF THE ^^NUMSTR \\ARRAY LOCATION CONTAINING THE
END OF THE DESCRIPTION OF THE FINAL SIMULATED ARRAY.
.SKIP
.INDENT -9
^^NUMSTR#=#\\ARRAY DESCRIBING THE SUBSCRIPT LIMITS OF THE POSSIBLY
MULTIPLY SUBSCRIPTED ARRAYS SIMULATED IN THE SINGLY SUBSCRIPTED
BUFFER. ^THE CONTENTS OF THE ^^NUMSTR \\ARRAY ARE, FOR EACH ARRAY
SIMULATED IN THE BUFFER, THE NUMBER OF SUBSCRIPTS OF THE SIMULATED
ARRAY FOLLOWED BY LEFT AND RIGHT LIMITING VALUES OF THESE SUBSCRIPTS
(VALUES WHICH THE SUBSCRIPTS WOULD HAVE IF THE ARRAYS SIMULATED IN
THE BUFFER WERE ACTUALLY INCLUDED IN ^^DIMENSION \\STATEMENTS). ^IF
THE ITEM IN THE BUFFER WOULD BE SUBSCRIPTED AT 1, OR WOULD NOT
SUBSCRIPTED, THEN A SINGLE 0 CAN BE USED IN PLACE OF THE SEQUENCE
1,1,1. IT SHOULD BE NOTED THAT THE RIGHT LIMIT CAN BE EITHER GREATER
THAN, EQUAL TO OR LESS THAN THE LEFT LIMIT.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED AS BOTH INPUT AND OUTPUT
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LSTKNT#=#\\SHOULD BE SET TO ZERO BY THE CALLING PROGRAM BEFORE
^^DASITE \\IS FIRST CALLED AND WHENEVER THE DICTIONARY CORRESPONDING
TO THE BUFFER CHANGES.
.INDENT -2
=#RETURNED CONTAINING THE INPUT VALUE OF ^^KOUNT. T\\HE SUBSEQUENT
CALL TO THIS ROUTINE WILL USE THE INPUT VALUES OF ^^LSTKNT, NUMINI
\\AND ^^INITAL \\RATHER THAN RECOMPUTE THESE FOR THE SIMULATED
ARRAYS EARLIER IN THE DICTIONARY IF THE NEW VALUE OF ^^KOUNT \I\S
\\GREATER THAN OR EQUAL TO ^^LSTKNT.
.SKIP
.INDENT -9
NUMINI#=#\\INPUT VALUE IS IGNORED IF ^^LSTKNT \\IS ZERO OR IF
^^LSTKNT \\IS GREATER THAN ^^KOUNT. NUMINI \\IS SET BY EACH CALL TO
^^DASITE \\AND SHOULD NEVER BE SET BY THE CALLING PROGRAM.
.INDENT -2
=#IF ^^LSTKNT \\IS INPUT GREATER THAN ZERO, THEN THE VALUE OF
^^NUMINI, \\AS RETURNED BY THE PREVIOUS CALL TO THIS ROUTINE, IS THE
SUBSCRIPT OF THE ^^NUMSTR \\ARRAY LOCATION CONTAINING THE START OF
THE DESCRIPTION OF THE ARRAY HAVING AS ITS SEQUENCE NUMBER THE VALUE
OF ^^LSTKNT. I\F IEXTRA=0, \\THEN ^^NUMSTR(NUMINI) \\CONTAINS THE
SUBSCRIPT COUNT AT THE START OF THE DESCRIPTION.
.INDENT -2
=#RETURNED CONTAINING THE SUBSCRIPT OF THE ^^NUMSTR \\ARRAY LOCATION
CONTAINING THE START OF THE DESCRIPTION OF THE ARRAY HAVING AS ITS
SEQUENCE NUMBER THE INPUT VALUE OF ^^KOUNT.
.SKIP
.INDENT -9
INITAL#=#\\INPUT VALUE IS IGNORED IF ^^LSTKNT \\IS INPUT CONTAINING
ZERO OR IF ^^LSTKNT \\IS INPUT GREATER THAN ^^KOUNT. INITAL \I\S
\\SET BY EACH CALL TO ^^DASITE \\AND SHOULD NEVER BE SET BY THE
CALLING PROGRAM.
.INDENT -2
=#IF ^^LSTKNT \\IS INPUT GREATER THAN ZERO, THEN THE VALUE OF
^^INITAL, \\AS RETURNED BY THE PREVIOUS CALL TO THIS ROUTINE, IS THE
SUBSCRIPT WITHIN THE SINGLY SUBSCRIPTED BUFFER OF THE LOCATION
CONTAINING THE START OF THE SIMULATED ARRAY HAVING AS ITS SEQUENCE
NUMBER THE INPUT VALUE OF ^^LSTKNT.
.INDENT -2
=#\\RETURNED CONTAINING THE SUBSCRIPT WITHIN THE SINGLY SUBSCRIPTED
BUFFER OF THE LOCATION CONTAINING THE START OF THE SIMULATED ARRAY
HAVING AS ITS SEQUENCE NUMBER THE INPUT VALUE OF ^^KOUNT.
.SKIP
.LEFT MARGIN 0
T\\HE FOLLOWING ARGUMENT IS RETURNED AS OUTPUT. ^ITS INPUT VALUE IS
IGNORED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LOCATN#=#\\IF RETURNED GREATER THAN ZERO, ^^LOCATN \\IS THE
SUBSCRIPT OF THE LOCATION WITHIN THE SINGLY SUBSCRIPTED BUFFER WHICH
CORRESPONDS TO THE SIMULATED ARRAY LOCATION WHICH IS SELECTED BY THE
INPUT VALUE OF ^^KOUNT \\AND BY THE SUBSCRIPTS CONTAINED IN THE
^^NOWSUB \\ARRAY.
.INDENT -2
=#0, RETURNED IF ONE OR MORE OF THE THE SUBSCRIPTS CONTAINED IN THE
^^NOWSUB \\ARRAY ARE NOT IN THE RANGES PREDICTED BY THE ^^NUMSTR
\\ARRAY.
.INDENT -2
=#-1, RETURNED IF THE ^^NOWSUB \\ARRAY CONTAINS A DIFFERENT NUMBER
OF SUBSCRIPTS THAN INDICATED BY THE ^^NUMSTR \\ARRAY.
.INDENT -2
=#-2, RETURNED IF THE ^^NUMSTR \\ARRAY CONTAINS THE DESCRIPTIONS OF
LESS SIMULATED ARRAYS THAN THE INPUT VALUE OF ^^KOUNT. T\\HIS VALUE
OF ^^LOCATN \\IS ALSO RETURNED IF AN ERROR IS DETECTED IN THE
^^NUMSTR \\ARRAY.
.SKIP
.LEFT MARGIN 0
^FOR EXAMPLE, IF THE SINGLY SUBSCRIPTED BUFFER CONTAINS THE VALUES
OF THE ARRAYS ^A, ^B AND ^E SUBSCRIPTED
.SKIP
.INDENT 5
^^A(1/3,1/5), B(1/5,1/6), E(1/10,1/10)
.SKIP
(\\THIS SPECIFICATION MEANS THAT THE LEFT SUBSCRIPT OF ARRAY ^A CAN
RANGE FROM 1 THROUGH 3 AND THAT THE SECOND SUBSCRIPT CAN RANGE FROM
1 THROUGH 5) AND CONTAINS NONSUBSCRIPTED ITEMS ^C AND ^D IN THE ORDER
.SKIP
.INDENT 5
^^A,B,C,D,E
.SKIP
\\THEN THE CONTENTS OF THE ^^NUMSTR \\ARRAY WOULD BE (FOR ^^IEXTRA=0)
.SKIP
.INDENT 5
2,1,3,1,5,2,1,5,1,6,0,0,2,1,10,1,10
.SKIP
\O\R
.SKIP
.INDENT 5
2,1,3,1,5,2,1,5,1,6,1,1,1,1,1,1,2,1,10,1,10
.SKIP
I\F KOUNT \\HAS THE VALUE 2 AND IF THE ^^NOWSUB \\ARRAY CONTAINS THE
VALUES 4 AND 3 SELECTING ^B(4,3) AND IF ^^IRAPID \\HAS THE VALUE 0,
SO THAT ALL OF ARRAY ^A, ^B(1,1) THROUGH ^B(5,1), ^B(1,2) THROUGH
^B(5,2), AND ^B(1,3) THROUGH ^B(3,3) WOULD BE BELOW ^B(4,3) THEN
^^LOCATN \\WOULD BE RETURNED AS 15+5+5+3+1=29.
.SKIP
^IF ^^IRAPID=0, \\THEN THE ORDER OF THE ^A ARRAY IN THE SINGLY
SUBSCRIPTED BUFFER WOULD BE (READING ACROSS EACH LINE FROM LEFT TO
RIGHT)
.SKIP
.NOFILL
.LEFT MARGIN 5
.TEST PAGE 3
^^A(1,1),A(2,1),A(3,1),A(1,2),A(2,2),A(3,2),
A(1,3),A(2,3),A(3,3),A(1,4),A(2,4),A(3,4),
A(1,5),A(2,5),A(3,5)
.SKIP
.FILL
.LEFT MARGIN 0
I\F IRAPID=1, \\THEN THE ORDER OF THE ^A ARRAY IN THE SINGLY
SUBSCRIPTED BUFFER WOULD BE
.SKIP
.NOFILL
.LEFT MARGIN 5
.TEST PAGE 3
^^A(1,1),A(1,2),A(1,3),A(1,4),A(1,5)
A(2,1),A(2,2),A(2,3),A(2,4),A(2,5)
A(3,1),A(3,2),A(3,3),A(3,4),A(3,5)
.SKIP
.LEFT MARGIN 0
.FILL
I\\F THE ^Z ARRAY IS EFFECTIVELY SUBSCRIPTED ^Z(4/3,-1/1) THEN ITS
REPRESENTATION IN THE ^^NUMSTR \\ARRAY WOULD BE
.SKIP
.INDENT 5
2,4,3,-1,1
.SKIP
AND IF ^^IRAPID=0, \\THEN ITS ORDER IN THE SINGLY SUBSCRIPTED BUFFER
WOULD BE
.SKIP
.INDENT 5
^^Z(4,-1),Z(3,-1),Z(4,0),Z(3,0),Z(4,1),Z(3,1)
.SKIP
.LEFT MARGIN 0
I\\F INSTEAD ^^IRAPID=1, \\THEN THE ORDER OF THE ^Z ARRAY IN THE
SINGLY SUBSCRIPTED BUFFER WOULD BE
.SKIP
.INDENT 5
^^Z(4,-1),Z(4,0),Z(4,1),Z(3,-1),Z(3,0),Z(3,1)
.SKIP 3
.TEST PAGE 7
.LEFT MARGIN 0
.FILL
.CENTER
U\\SE OF ^^DASITE \\WITH THE ^NAMED ^ARRAY ^MANIPULATION ^ROUTINES
.CENTER
--- -- ------ ---- --- ----- ----- ------------ --------
.SKIP
^IF THE ^^DALOAD \\ROUTINE WAS USED TO CONSTRUCT THE DICTIONARY THE
NUMERIC PORTION OF WHICH IS CONTAINED IN THE ^^NUMSTR \\ARRAY, AND
IF THE ^^DAPICK \\ROUTINE HAS BEEN CALLED PRIOR TO ^^DASITE \T\O
\\IDENTIFY THE LOCATION WITHIN THE BUFFER CORRESPONDING TO THE START
OF THE POSSIBLY MULTIPLY SUBSCRIPTED ARRAY EQUIVALENCED WITH OR
OTHERWISE LOADED INTO PART OR ALL OF THE BUFFER, THEN ^^DASITE
\\DOES NOT NEED TO CALCULATE THE SIZES OF THE ARRAYS BELOW THE
IDENTIFIED ARRAY, BUT ^^DASITE \\MUST CALCULATE THE ADDITIONAL
OFFSET REQUIRED IN THE BUFFER TO OBTAIN THE LOCATION CORRESPONDING
TO A PARTICULAR SET OF SUBSCRIPTS. ^THIS SET OF SUBSCRIPTS WILL HAVE
BEEN CONSTRUCTED BY THE ^^DAROLL \O\R DALOOP \\ROUTINE, AND WILL
HAVE BEEN BASED UPON THE SUBSCRIPT RANGES RETURNED BY ^^DAPICK.
W\\HEN ^^DASITE \\IS CALLED SUBSEQUENT TO ^^DAPICK \\AND ^^DAROLL
(\O\R DALOOP), \\THE ARGUMENTS ^^KOUNT, KNTSUB, LRGNUM, NUMINI \\AND
^^INITAL \\SHOULD ALL BE INPUT TO ^^DASITE \\CONTAINING THE VALUES
ASSIGNED TO THE ARGUMENTS OF THE SAME NAMES BY ^^DAPICK, \\AND
^^LSTKNT \\SHOULD BE SET EQUAL TO THE VALUE OF ^^KOUNT \\RETURNED BY
^^DAPICK. IEXTRA \\SHOULD BE SET TO -2, ^^LOWSUB \\SHOULD BE SET TO
1, AND THE ^^NOWSUB \\ARRAY SHOULD BE AS PRODUCED BY THE ^^DAROLL
\O\R DALOOP \\ROUTINE.
.SUBTITLE ^^DASPAN, R\\OUTINE TO ^EVALUATE ^RANGE ^SPECIFICATIONS
.PAGE
.NOFILL
.LEFT MARGIN 0
 ^^DDDDD          AAA    SSSSSS  PPPPPP        AAA  NN    NN
 DD   DD       AAAA  SS        PP    PP     AAAA  NNN   NN
 DD    DD     AA AA  SS        PP    PP    AA AA  NNNN  NN
 DD    DD    AA  AA    SSSS    PPPPPP     AA  AA  NN NN NN
 DD    DD   AAAAAAA        SS  PP        AAAAAAA  NN  NNNN
 DD   DD   AA    AA        SS  PP       AA    AA  NN   NNN
 DDDDD    AA     AA  SSSSSS    PP      AA     AA  NN    NN
.SKIP 3
.FILL
.CENTER
DASPAN, R\\OUTINE TO ^EVALUATE ^RANGE ^SPECIFICATIONS
.CENTER
------##------- -- -------- ----- --------------
.SKIP
^^DASPAN \\EVALUATES RANGE SPECIFICATIONS TYPED BY THE USER AND READ
BY THE CALLING PROGRAM WITH A MULTIPLE OF AN ^A1 FORMAT. ^SUCH RANGE
SPECIFICATIONS CAN CONSIST OF A SINGLE NUMBER, OR OF 2 NUMBERS
SEPARATED BY AN ASTERISK, OR OF EITHER 2 OR 3 NUMBERS SEPARATED BY
SLASHES OR BY COLONS (THE 2 CHARACTERS ARE EQUIVALENT). ^THE
ASTERISK NOTATION IS MEANT TO INDICATE THAT THE VALUE TO THE RIGHT
OF THE ASTERISK IS TO BE REPEATED THE NUMBER OF TIMES INDICATED BY
THE NUMBER TO THE LEFT OF THE ASTERISK. ^NUMBERS SPECIFIED IN THE
SLASH OR COLON NOTATION CAN BE INTERPRETED AS THE LOWER AND UPPER
BOUNDS OF A RANGE IF 2 NUMBERS ARE PRESENT, OR AS THE LOWER BOUND,
THE INCREMENT, AND THE UPPER BOUND, IF 3 NUMBERS ARE INCLUDED.
.SKIP
^^DASPAN \\REPORTS TO THE CALLING PROGRAM WHETHER THE NUMBERS ARE
PRESENT IN THE SERIES SPECIFICATION, AS WELL AS THE VALUES OF THOSE
NUMBERS WHICH ARE PRESENT. ^THE CALLING PROGRAM WILL HAVE TO ASSIGN
DEFAULT VALUES FOR ANY NUMBERS WHICH ARE MISSING. ^THE RANGE
SPECIFICATION /2/10 OR :2:10 INDICATES THAT THE RANGE IS TO EXTEND
FROM THE DEFAULT LOWER BOUND WITH AN INCREMENT OF 2 THROUGH THE
UPPER BOUND OF 10. ^EACH OF THE RANGE SPECIFICATIONS 1/10 OR 1:10 OR
1//10 OR 1::10 IS TAKEN TO MEAN THAT THE RANGE IS TO EXTEND FROM 1
THROUGH 10 WITH THE DEFAULT INCREMENT. ^IF THE NUMBERS SPECIFY THE
VALUES OF A SUBSCRIPT OF AN ARRAY, THEN A MISSING LOWER BOUND MIGHT
BE TAKEN TO INDICATE THAT THE SUBSCRIPT BEING VARIED STARTS AT ITS
MINIMUM POSSIBLE VALUE (USUALLY 1), WHILE A MISSING UPPER BOUND
MIGHT INDICATE THAT THE SUBSCRIPT IS TO TERMINATE AT ITS MAXIMUM
POSSIBLE VALUE.
.SKIP
^THE ONLY PRINTING DELIMITER CHARACTER ALLOWED BETWEEN SERIES
SPECIFICATIONS IS THE COMMA. ^TWO COMMAS WITH NO OTHER PRINTING
CHARACTERS BETWEEN THEM ARE TAKEN TO INDICATE A MISSING SERIES
SPECIFICATION. ^THE CALLING PROGRAM IS INFORMED IF A SEMICOLON IS
ENCOUNTERED IN THE TEXT BEING EVALUATED BY THIS ROUTINE. ^THE
SEMICOLON MIGHT BE TYPED BY THE USER TO SIGNAL THAT THE CALLING
PROGRAM IS TO TERMINATE ITS REQUESTS FOR DATA FROM THE USER. ^AN
EXCLAMATION POINT AND ANY CHARACTERS TO ITS RIGHT ARE TAKEN TO BE A
COMMENT AND ARE OTHERWISE IGNORED. ^AN AMPERSAND AND THE CHARACTERS
TO ITS RIGHT ARE SIMILARLY CONSIDERED TO FORM A COMMENT, BUT THE
CALLING PROGRAM IS INFORMED THAT AN AMPERSAND WAS FOUND. ^SUCH AN
AMPERSAND MIGHT BE TYPED BY THE USER TO INDICATE THAT THE INPUT TEXT
IS TO BE CONTINUED ON THE FOLLOWING LINE.
.SKIP
^TWO VERSIONS OF THE ROUTINE ARE SUPPLIED. ^^DASPAN \\CAN EVALUATE
REAL NUMBERS AS WELL AS INTEGERS INCLUDING ^E, ^K AND ^M NOTATIONS
FOR SPECIFYING EITHER OF THESE. ^IF THE CALLING PROGRAM DOES NOT
OTHERWISE REFERENCE THE FREE FORMAT INPUT ROUTINE ^^DAHEFT, \\IF THE
EVALUATION OF REAL AND OCTAL NUMBERS IS NOT NEEDED, AND IF INTEGERS
CAN BE SPECIFIED WITHOUT RESORTING TO THE ^E, ^K AND ^M NOTATIONS,
THEN THE ROUTINE ^^DAISPN \\SHOULD BE USED INSTEAD OF ^^DASPAN.
N\\UMBERS EVALUATED BY ^^DAISPN \\MUST CONSIST ONLY OF DIGITS
FOLLOWING THE OPTIONAL SIGN. ^^DAISPN \\TREATS THE CHARACTERS ., %,
^K AND ^M AS ILLEGAL CHARACTERS.
.SKIP 3
.TEST PAGE 8
.CENTER
^THE ^^DASPAN \\AND ^^DAISPN A\\RGUMENT ^LISTS
.CENTER
--- ------ --- ------ -------- -----
.SKIP
^THE ARGUMENT LISTS OF ROUTINES ^^DASPAN \\AND ^^DAISPN \\ARE
.SKIP
.NOFILL
      ^^SUBROUTINE DASPAN(KONTRL,KONECT,IBUFFR,MAXBFR,LOWBFR,
     1    MANY  ,KIND  ,INIGOT,INCGOT,LMTGOT,INIVAL,INCVAL,
     2    LMTVAL,VALINI,VALINC,VALLMT)
.SKIP
\\AND
.SKIP
      ^^SUBROUTINE DAISPN       (KONECT,IBUFFR,MAXBFR,LOWBFR,
     1    MANY  ,KIND  ,INIGOT,INCGOT,LMTGOT,INIVAL,INCVAL,
     2    LMTVAL)
.SKIP
\\BOTH WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE ORDERING OF THE ARGUMENTS IS THE SAME FOR BOTH ROUTINES, BUT
THE FIRST ARGUMENT OF ^^DASPAN, \\AND THE LAST 3 ARGUMENTS OF
^^DASPAN \\ARE NOT INCLUDED IN THE ^^DAISPN \\ARGUMENT LIST. ^THE
ARGUMENT DEFINITIONS FOR ^^DAISPN \\ARE IDENTICAL TO THOSE OF
^^DASPAN \\WITH THE EXCEPTION THAT THE RANGE SPECIFICATION IS ALWAYS
RETURNED IN INTEGER FORM FOR ^^DAISPN.
.SKIP
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT ONLY AND ARE RETURNED
UNCHANGED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KONTRL#=#-1, \\THE NUMBER IN THE ^^IBUFFR \\ARRAY IS AN OCTAL
NUMBER. ^THE NUMBER CAN BE TYPED WITH A DECIMAL POINT AND/OR WITH AN
EXPONENT. ^HOWEVER, THE NUMBER FOLLOWING THE LETTER ^E OF THE
EXPONENT IS EVALUATED IN DECIMAL. ^THE VALUE OF THE OCTAL NUMBER IS
RETURNED AS ONE OF THE ARGUMENTS ^^INIVAL, INCVAL \O\R LMTVAL. I\T
\\MUST BE NOTED THAT NUMBERS EVALUATED AS NEGATIVE OCTAL INTEGERS
HAVE THE NEGATIVE OCTAL INTEGER AS THEIR VALUE, NOT AS THEIR BIT
REPRESENTATION IN COMPUTER STORAGE. ^FOR EXAMPLE, ON A 36 BIT TWOS
COMPLEMENT COMPUTER, THE OCTAL NUMBER -400000000000 (WHICH COULD
ALSO BE TYPED AS -4^E11 OR -4^E+11 WHERE THE 11 AFTER THE ^E IS IN
DECIMAL) IS REPRESENTED AS BIT PATTERN HAVING OCTAL NOTATION
400000000000 AND THE OCTAL NUMBER -377777777777 IS REPRESENTED BY
THE BIT PATTERN 400000000001.
.INDENT -2
=#0, THE NUMBER IN THE ^^IBUFFR \\ARRAY IS A DECIMAL INTEGER. ^THE
NUMBER CAN BE TYPED WITH A DECIMAL POINT (FOR EXAMPLE 1.23^K OR
1.23^E3 EQUALS 1230), BUT IS STORED AS AN INTEGER IN ^^DAHEFT, \\AND
IS OUTPUT AS ONE OF THE ARGUMENTS ^^INIVAL, INCVAL \O\R LMTVAL.
A\\NY DECIMAL INTEGER WHICH THE COMPUTER CAN REPRESENT CAN BE
EVALUATED. ^THIS INCLUDES, ON TWOS COMPLEMENT COMPUTERS, THE LARGEST
NEGATIVE NUMBER THE ABSOLUTE VALUE OF WHICH CANNOT BE STORED. ^ON
THE ^^PDP-10, \\A 36 BIT COMPUTER WITH TWOS COMPLEMENT NOTATION, THE
RANGE OF DECIMAL INTEGERS IS -34359738368 THROUGH 34359738367 (THE
OCTAL NOTATION OF THE BIT PATTERNS BEING 400000000000 THROUGH
377777777777).
.INDENT -2
=#1 OR GREATER, THE NUMBER IN THE ^^IBUFFR \\ARRAY IS A REAL NUMBER.
^IF POSSIBLE, THE REAL NUMBER WILL BE ACCUMULATED AS AN INTEGER,
THEN BE CONVERTED TO REAL AND SHIFTED IF NECESSARY. ^^KONTRL \I\S
\\THEN THE MAXIMUM NUMBER OF DIGITS IN THE INTEGER. ^THE VALUE IS
OUTPUT AS ONE OF THE ARGUMENTS ^^VALINI, VALINC \O\R VALLMT. I\F
\\THE ITEM HAS MORE THAN ^^KONTRL \\DIGITS, THEN THE ENTIRE
EVALUATION IS DONE IN REAL MODE. ^THE ADVANTAGE OF CALCULATING THE
REAL VALUES IN INTEGER AS LONG AS THE PRECISION OF THE COMPUTER IS
NOT OVERFLOWED IS THAT THE CALCULATION OF THE PORTION OF THE NUMBER
RIGHT OF THE DECIMAL POINT IS MORE EXACT. ^AS AN EXAMPLE, IF
^^KONTRL \\IS GREATER THAN OR EQUAL TO 4, THEN THE NUMBER 33.33 CAN
BE STORED AS THE INTEGER 3333, THEN BE CONVERTED TO THE REAL VALUE
3333.0 AND DIVIDED BY 100.0 TO OBTAIN THE FINAL ANSWER. ^IF IT MAKES
NO DIFFERENCE WHETHER THE NUMBER TYPED AS 33.33 HAS VALUE 33.33 OR
33.32999... THEN ^^KONTRL \\CAN BE GIVEN THE VALUE 1.
.SKIP
.INDENT -9
^^KONECT#=#-1, \\ONCE A SLASH, A COLON, AN ASTERISK OR A NUMBER IS
FOUND IN THE ^^IBUFFR \\ARRAY, THE SERIES SPECIFICATION WILL EXTEND
TO THE NEXT SPACE OR TAB CHARACTER, OR TO ANY CHARACTER OTHER THAN A
SLASH OR A COLON OR AN ASTERISK WHICH IMMEDIATELY FOLLOWS A NUMBER
IN THE SERIES SPECIFICATION. ^IF ^^KONECT=-1, \\THEN THE TEXT
.SKIP
.INDENT 5
1/2+3/4 5/6+7/+8
.SKIP
WOULD CONTAIN THE RANGE SPECIFICATIONS 1 TO 2, 3 TO 4, 5 TO 6, AND 7
TO 8.
.INDENT -2
=#0, SPACES AND/OR TAB CHARACTERS CAN APPEAR BETWEEN THE NUMBERS OF
A SERIES IN ADDITION TO SLASHES OR COLONS OR ASTERISK. ^THE SLASHES
OR COLONS OR THE ASTERISK ARE, HOWEVER, REQUIRED.
.INDENT -2
=#1, SPACES AND/OR TAB CHARACTERS CAN APPEAR BETWEEN THE NUMBERS OF
A SERIES IN ADDITION TO OR IN PLACE OF SLASHES OR COLONS OR
ASTERISKS. ^IF ^^KONECT=1, \\THEN THE TEXT
.SKIP
.INDENT 5
1 2 3,4/5 6,7 8/9,10 / 11 12
.SKIP
IS EXACTLY EQUIVALENT, EXCEPT FOR THE VALUE OF ^^KIND \\RETURNED FOR
THE FIRST SERIES, TO THE TEXT
.SKIP
.INDENT 5
1/2/3,4/5/6,7/8/9,10/11/12
.SKIP
^THE FIRST SERIES (1 2 3) IN THE FIRST EXAMPLE WOULD RETURN ^^KIND=5
\\INDICATING A SERIES IN WHICH NEITHER A SLASH NOR A COLON NOR AN
ASTERISK APPEARED, WHILE THE CORRESPONDING SERIES SPECIFICATION IN
THE SECOND EXAMPLE WOULD RETURN ^^KIND=6 \\INDICATING THAT AT LEAST
1 SLASH OR AT LEAST 1 COLON WAS ENCOUNTERED IN THE SERIES
SPECIFICATION.
.SKIP
.INDENT -9
^^IBUFFR#=#\\INPUT BUFFER ARRAY CONTAINING CHARACTERS TYPED BY THE
USER, AS READ BY A MULTIPLE OF AN ^A1 FORMAT, WHICH IS TO BE
SEARCHED FOR SERIES SPECIFICATIONS. ^^IBUFFR \\THEN CONTAINS ONE
CHARACTER PER COMPUTER STORAGE LOCATION.
.SKIP
.INDENT -9
^^MAXBFR#=#\\MAXIMUM SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATIONS TO
BE SEARCHED
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED AS BOTH INPUT AND OUTPUT.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LOWBFR#=#\\INPUT CONTAINING THE SUBSCRIPT WITHIN THE ^^IBUFFR
\\ARRAY OF THE FIRST (LEFTMOST) CHARACTER WHICH CAN BE SCANNED FOR A
SERIES SPECIFICATION. ^^LOWBFR \\WILL BE RETURNED POINTING TO THE
NEXT CHARACTER BEYOND THE SERIES SPECIFICATION. ^^LOWBFR \\AND
^^MANY \\MUST BE SET BY THE CALLING PROGRAM BEFORE ANYTHING IS
PROCESSED IN THE CURRENT CONTENTS OF THE ^^IBUFFR \\ARRAY, BUT THEN
SHOULD NOT BE MODIFIED BY THE CALLING PROGRAM UNTIL THE ENTIRE
CONTENTS OF THE ^^IBUFFR \\ARRAY HAVE BEEN PROCESSED.
.SKIP
^IF ^^KONECT \\IS LESS THAN OR EQUAL TO 0, FORCING A SERIES
SPECIFICATION TO CONTAIN EITHER A SLASH OR A COLON OR AN ASTERISK
BETWEEN THE NUMBERS OF A SERIES, AND IF A SECOND NUMBER IMMEDIATELY
FOLLOWS A FIRST WITHOUT A SEPARATING SLASH OR COLON OR ASTERISK,
THEN ^^LOWBFR \\WILL BE RETURNED POINTING TO THE FIRST CHARACTER OF
THE SECOND NUMBER. ^IF ^^KONECT \\IS -1 AND IF EITHER A SPACE OR A
TAB CHARACTER FOLLOWS A SERIES SPECIFICATION, THEN ^^LOWBFR \\WILL
BE RETURNED POINTING TO THE SPACE OR TAB CHARACTER. ^IF ^^KONECT
\\IS GREATER THAN OR EQUAL TO 0, ALLOWING SPACES AND TAB CHARACTERS
TO APPEAR WITHIN A SERIES SPECIFICATION, THEN ^^LOWBFR \\WILL BE
RETURNED POINTING TO THE FIRST CHARACTER TO THE RIGHT OF THE SERIES
AND WHICH IS NOT ITSELF A SPACE, A TAB CHARACTER, A SLASH, A COLON
OR AN ASTERISK AND WHICH CANNOT APPEAR WITHIN A NUMBER. ^IF THERE
ARE NO PRINTING CHARACTERS AT OR TO RIGHT OF ^^LOWBFR, \\THEN
^^LOWBFR \\WILL BE RETURNED CONTAINING ^^MAXBFR+1 \\AND ^^KIND
\\WILL BE RETURNED CONTAINING ONE.
.SKIP
.INDENT -9
^^MANY###=#\\SHOULD BE INPUT CONTAINING ZERO EACH TIME THIS ROUTINE
IS CALLED TO BEGIN PROCESSING OF A NEW LOGICAL SECTION OF TEXT, AS
FOR EXAMPLE WHEN BEGINNING PROCESSING OF A LINE OF TEXT NOT TIED TO
THE PREVIOUS LINE BY AN AMPERSAND AT THE END OF THE PREVIOUS LINE,
OR WHEN PROCESSING THE TEXT TO THE RIGHT OF A SEMICOLON. ^THE
INITIAL ZEROING OF THIS ARGUMENT MUST BE DONE BY THE CALLING
PROGRAM, BUT THEREAFTER THE VALUE RETURNED BY THE PREVIOUS CALL TO
THIS ROUTINE CAN USUALLY BE USED. ^^MANY \\IS RETURNED SET TO ZERO
EACH TIME A SEMICOLON (^^KIND=2) \\IS FOUND, AND EACH TIME AN END OF
LINE NOT TIED TO THE FOLLOWING LINE BY AN AMPERSAND (^^KIND=1) \I\S
\\FOUND. ^^MANY \\IS RETURNED CONTAINING ONE PLUS ITS INPUT ABSOLUTE
VALUE EACH TIME A DESCRIPTION OF A SERIES SPECIFICATION IS RETURNED
BY THIS ROUTINE, EACH TIME AN ERRONEOUS SERIES SPECIFICATION IS
FOUND, EACH TIME AN UNKNOWN CHARACTER IS FOUND, OR EACH TIME AN
INDICATION OF A MISSING SERIES SPECIFICATION IS FOUND. ^^KIND \I\S
\\RETURNED CONTAINING THE VALUE 3 AND ^^MANY \\IS RETURNED
CONTAINING THE NEGATIVE OF THE NUMBER OF ITEMS FOUND IF THE NEXT
PRINTING CHARACTER FOLLOWING A COMMA IS AN AMPERSAND. ^^MANY
\\SHOULD NOT BE CHANGED BY THE CALLING PROGRAM IF AN AMPERSAND
(^^KIND \\BEING RETURNED=3) IS FOUND INDICATING THAT THE SUBSEQUENT
CALL TO THIS ROUTINE IS TO PROCESS TEXT WHICH IS TO BE TREATED AS
THOUGH IT APPEARED IN PLACE OF THE AMPERSAND AND THE CHARACTERS TO
ITS RIGHT. ^THE EFFECT IS NOT QUITE THE SAME AS IF THE USER HAD
TYPED ALL OF THE TEXT ON A SINGLE LINE SINCE A SINGLE SERIES
SPECIFICATION CANNOT BE SPLIT ACROSS THE LINE BOUNDARY.
.SKIP
^IF ^^MANY \\IS INPUT CONTAINING ZERO, THEN AN INITIAL COMMA IN THE
INPUT TEXT BUFFER IS TAKEN TO INDICATE AN INITIAL MISSING ITEM, AND
^^MANY \\IS THEN RETURNED CONTAINING 1. ^IF ^^MANY \\IS INPUT
GREATER THAN ZERO, THEN AN INITIAL COMMA IS IGNORED IF FOLLOWED BY A
SERIES SPECIFICATION. ^IF ^^MANY \\IS INPUT GREATER THAN ZERO, THEN
AN INITIAL COMMA FOLLOWED BY NO OTHER PRINTING CHARACTERS, BY A
SEMICOLON, OR BY AN EXCLAMATION POINT INDICATES A MISSING ITEM. ^IF
^^MANY \\IS INPUT GREATER THAN ZERO, THEN AN INITIAL COMMA FOLLOWED
BY AN AMPERSAND WILL CAUSE THE REMAINING CHARACTERS IN THE BUFFER TO
BE IGNORED, AND ^^MANY \\WILL BE RETURNED CONTAINING THE NEGATIVE OF
ITS INPUT VALUE. ^IF ^^MANY \\IS INPUT NEGATIVE, THEN IT IS ASSUMED
THAT THE CONTENTS OF THE CURRENT BUFFER CONTINUE A PREVIOUS LINE
WHICH TERMINATED WITH A COMMA FOLLOWED BY AN AMPERSAND, AND ^^MANY
\\IS RETURNED GREATER THAN ZERO.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR OUTPUT.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KIND###=#\\RETURNED DESCRIBING THE KIND OF ITEM LOCATED IN THE
^^IBUFFR \\ARRAY.
.INDENT -2
=#1, EITHER NO PRINTING CHARACTERS OR ELSE AN EXCLAMATION POINT AS
THE FIRST PRINTING CHARACTER (MARKING THE REST OF THE LINE AS A
COMMENT) WAS FOUND AT OR TO THE RIGHT OF ^^IBUFFR(LOWBFR). T\H\E
\\CALLING PROGRAM SHOULD READ A NEW LINE INTO ^^IBUFFR. MANY,
INIGOT, INCGOT \\AND ^^LMTGOT \\ARE EACH RETURNED WITH THE VALUE ZERO.
.INDENT -2
=#2, A SEMICOLON WAS FOUND AS THE FIRST PRINTING CHARACTER AT OR TO
THE RIGHT OF ^^IBUFFR(LOWBFR). LOWBFR \\IS RETURNED POINTING TO THE
NEXT CHARACTER BEYOND THE LOCATION OF THE SEMICOLON. ^IT IS ASSUMED
THE CALLING PROGRAM WILL TREAT THE APPEARANCE OF THE SEMICOLON AS
MARKING THE END OF A STATEMENT. ^^MANY \\IS RETURNED SET TO ZERO.
.LEFT MARGIN 9
.INDENT -2
=#3, AN AMPERSAND WAS FOUND AS THE FIRST PRINTING CHARACTER AT OR TO
THE RIGHT OF ^^IBUFFR(LOWBFR). T\\HE TEXT TO THE RIGHT OF THE
AMPERSAND IS TAKEN AS A COMMENT SO ^^LOWBFR \\IS RETURNED POINTING
BEYOND THE RIGHT END OF THE BUFFER. ^IT IS ASSUMED THAT THE CALLING
PROGRAM WILL READ IN THE CONTENTS OF A NEW BUFFER, THEN AGAIN
REQUEST A NEW SERIES EVALUATION FROM THIS ROUTINE. ^THE VALUE OF
^^MANY \\MUST NOT BE CHANGED BY THE CALLING PROGRAM PRIOR TO THIS
FOLLOWING CALL. ^THE EFFECT IS NOT QUITE THE SAME AS IF THE USER HAD
TYPED ALL OF THE TEXT ON A SINGLE LINE SINCE A SERIES SPECIFICATION
CANNOT BE SPLIT ACROSS A LINE BOUNDARY.
.INDENT -2
=#4, A NUMBER OR SERIES SPECIFICATION WAS NOT FOUND, BUT A COMMA WAS
FOUND INDICATING A MISSING SERIES SPECIFICATION. ^^INIGOT, INCGOT
\\AND ^^LMTGOT \\ARE EACH RETURNED WITH THE VALUE ZERO SO ^^KIND=4
\\CAN BE CONSIDERED EQUIVALENT TO ^^KIND=5 \\IF SUCH IS APPROPRIATE
TO THE APPLICATION FOR WHICH THIS ROUTINE IS BEING USED.
.INDENT -2
=#5, A SINGLE NUMBER WITH NEITHER A SLASH NOR A COLON NOR AN
ASTERISK WAS FOUND IN THE INPUT BUFFER. ^BOTH ^^INIGOT \\AND
^^LMTGOT \\ARE RETURNED CONTAINING 1, AND THE VALUE OF THE NUMBER IS
RETURNED EITHER IN BOTH ^^INIVAL \\AND ^^LMTVAL \\OR IN BOTH
^^VALINI \\AND ^^VALLMT, \\WHICHEVER IS APPROPRIATE. ^^INCGOT \I\S
\\RETURNED CONTAINING ZERO.
.INDENT -2
=#6, EITHER 2 OR 3 NUMBERS WERE FOUND, BUT WITHOUT SLASHES OR COLONS
OR ASTERISKS. ^THE VALUE OF THE LEFT NUMBER IS RETURNED IN EITHER
^^INIVAL \O\R VALINI, \\OF THE RIGHT IN EITHER ^^LMTVAL \O\R VALLMT,
\\AND OF THE MIDDLE, IF PRESENT, IN EITHER ^^INCVAL \O\R VALINC,
\\WHICHEVER IS APPROPRIATE. ^^INIGOT \\AND ^^LMTGOT \\ARE EACH
RETURNED CONTAINING 1. ^^INCGOT \\IS RETURNED CONTAINING 1 ONLY IF 3
NUMBERS WERE FOUND. ^^KONECT \\WOULD HAVE TO BE INPUT AS 1 FOR
^^KIND \\TO BE RETURNED AS 6.
.INDENT -2
=#7, A SERIES SPECIFICATION CONTAINING ONE OR MORE SLASHES AND/OR
COLONS WAS FOUND. ^THE LOCATION OF THE SLASH OR SLASHES OR COLON OR
COLONS RELATIVE TO THE NUMBERS, IF ANY, IN THE SERIES SPECIFICATION
IS INDICATED BY THE RETURNED VALUES OF ^^INIGOT, INCGOT \\AND
^^LMTGOT.
.INDENT -2
=#8, \\A SERIES SPECIFICATION CONTAINING A SINGLE ASTERISK WAS
FOUND. ^^INCGOT \\IS RETURNED CONTAINING ZERO. ^THE LOCATION OF THE
ASTERISK RELATIVE TO THE NUMBERS, IF ANY, IN THE SERIES
SPECIFICATION IS INDICATED BY THE RETURNED VALUES OF ^^INIGOT \\AND
^^LMTGOT.
.INDENT -2
=#9, \\A SERIES SPECIFICATION WAS FOUND WHICH INCLUDED TOO MANY
NUMBERS, TOO MANY SLASHES, TOO MANY COLONS OR TOO MANY ASTERISKS.
^^INIGOT, INCGOT \\AND ^^LMTGOT \\ARE EACH RETURNED CONTAINING ZERO.
.INDENT -2
=#10, THE FIRST PRINTING CHARACTER (OTHER THAN A POSSIBLE COMMA IF
^^MANY \\WAS INPUT GREATER THAN ZERO) IN OR TO RIGHT OF
^^IBUFFR(LOWBFR) \\WAS NOT A CHARACTER WHICH COULD APPEAR IN A
NUMBER OR NUMBER RANGE, AND WAS NOT A COMMA, SEMICOLON, EXCLAMATION
POINT OR AMPERSAND. ^^LOWBFR \\IS RETURNED POINTING TO THE NEXT
CHARACTER BEYOND THIS INITIAL PRINTING CHARACTER. ^THE CALLING
PROGRAM MUST DECREMENT ^^LOWBFR \\BY 1 IF THE UNKNOWN CHARACTER IS
TO BE IDENTIFIED BY OTHER ROUTINES IN THIS PACKAGE.
.SKIP
.INDENT -9
^^INIGOT#=#0, \\RETURNED IF THE CHARACTERS IN THE BUFFER DO NOT
REPRESENT A SERIES SPECIFICATION WHICH INCLUDES AN INITIAL NUMBER.
^^INIVAL \O\R VALINI, \\WHICHEVER IS APPROPRIATE, IS RETURNED
UNDEFINED, BUT PROBABLY CHANGED.
.INDENT -2
=#1, RETURNED IF THE CHARACTERS IN THE BUFFER REPRESENT A SERIES
SPECIFICATION WHICH INCLUDES AN INITIAL NUMBER. ^THIS INITIAL NUMBER
WOULD PROBABLY BE INTERPRETED AS THE START OF A RANGE IF PRECEDING A
SLASH OR A COLON, OR AS THE NUMBER OF TIMES THE FOLLOWING NUMBER IS
TO BE REPEATED IF PRECEDING AN ASTERISK. ^^INIVAL \O\R VALINI,
\\WHICHEVER IS APPROPRIATE, IS RETURNED CONTAINING THIS INITIAL
NUMBER.
.SKIP
.INDENT -9
^^INCGOT#=#0, \\RETURNED IF THE CHARACTERS IN THE BUFFER DO NOT
REPRESENT A SERIES SPECIFICATION WHICH INCLUDES A MIDDLE NUMBER.
^^INCGOT \\IS ALWAYS RETURNED CONTAINING ZERO FOR A SERIES SPECIFIED
IN ASTERISK NOTATION, SINCE SUCH A SERIES SPECIFICATION CANNOT
INCLUDE A MIDDLE NUMBER. ^^INCVAL \O\R VALINC, \\WHICHEVER IS
APPROPRIATE, IS RETURNED UNDEFINED, BUT PROBABLY CHANGED.
.INDENT -2
=#1, RETURNED IF THE CHARACTERS IN THE BUFFER REPRESENT A SERIES
SPECIFICATION WHICH INCLUDES A MIDDLE NUMBER. ^THIS MIDDLE NUMBER
WOULD PROBABLY BE INTERPRETED AS THE INCREMENT BY WHICH THE INITIAL
NUMBER IS TO BE VARIED UNTIL IT REACHES THE FINAL NUMBER. ^^INCVAL
\O\R VALINC, \\WHICHEVER IS APPROPRIATE, IS RETURNED CONTAINING THIS
INCREMENT.
.SKIP
.INDENT -9
^^LMTGOT#=#0, \\RETURNED IF THE CHARACTERS IN THE BUFFER DO NOT
REPRESENT A SERIES SPECIFICATION WHICH INCLUDES A FINAL NUMBER.
^^LMTVAL \O\R VALLMT, \\WHICHEVER IS APPROPRIATE, IS RETURNED
UNDEFINED, BUT PROBABLY CHANGED.
.INDENT -2
=#1, RETURNED IF THE CHARACTERS IN THE BUFFER REPRESENT A SERIES
SPECIFICATION WHICH INCLUDES A FINAL NUMBER. ^THIS FINAL NUMBER
WOULD PROBABLY BE INTERPRETED AS THE END OF A RANGE IF FOLLOWING A
SLASH OR A COLON, OR IF FOLLOWING AN ASTERISK AS THE NUMBER WHICH IS
TO BE REPEATED THE NUMBER OF TIMES INDICATED BY THE NUMBER PRECEDING
THE ASTERISK. ^^LMTVAL \O\R VALLMT, \\WHICHEVER IS APPROPRIATE, IS
RETURNED CONTAINING THIS FINAL NUMBER. ^IF MERELY A SINGLE NUMBER IS
FOUND WITH NEITHER ASTERISK NOR SLASH NOR COLON, THEN ^^INCGOT \I\S
\\RETURNED CONTAINING ZERO, BOTH ^^INIGOT \\AND ^^LMTGOT \\ARE
RETURNED CONTAINING 1, AND THE NUMBER IS RETURNED EITHER IN BOTH
^^INIVAL \\AND ^^LMTVAL \\OR IN BOTH ^^VALINI \\AND ^^VALLMT.
.SKIP
.LEFT MARGIN 7
T\\HE FOLLOWING ILLUSTRATION SHOWS THE RETURNED VALUES OF ^^INIGOT,
INCGOT \\AND ^^LMTGOT \\FOR VARIOUS SERIES SPECIFICATIONS. ^COLONS
COULD APPEAR IN PLACE OF ANY OR ALL SLASHES SHOWN IN THE EXAMPLES.
^THOSE SERIES SPECIFICATIONS CONTAINING SPACES IN PLACE OF SLASHES
OR ASTERISKS WOULD REQUIRE ^^KONECT=1 \\FOR THEIR EVALUATION AS
SINGLE RANGE SPECIFICATIONS. ^IT IS ASSUMED THAT ^^KONTRL=0 \S\O
\\THAT THE EVALUATED NUMBERS ARE RETURNED IN ^^INIVAL, INCVAL \\AND
^^LMTVAL. T\\HE LETTER U IN PLACE OF A RETURNED VALUE INDICATES THAT
THE CORRESPONDING ARGUMENT IS RETURNED UNDEFINED BUT PROBABLY CHANGED.
.NOFILL
.LEFT MARGIN 7
.SKIP
.TEST PAGE 17
                                               ^^LMTVAL
                                             INCVAL !
                                           INIVAL ! !
                                       LMTGOT   ! ! !
                                     INCGOT !   ! ! !
                                   INIGOT ! !   ! ! !
\\EMPTY  OR  /      OR  //     OR  *      0 0 0   U U U
///    OR  5///9  OR  5 2 2 9           0 0 0   U U U
**     OR  5*2*9  OR  5*2/9  OR 5/2*9   0 0 0   U U U
/9     OR  //9    OR  *9                0 0 1   U U 9
/2/                                     0 1 0   U 2 U
/2/9   OR  /2 9                         0 1 1   U 2 9
5/     OR  5//    OR  5*                1 0 0   5 U U
5                                       1 0 1   5 U 5
5/9    OR  5//9   OR  5 9    OR  5*9    1 0 1   5 U 9
5/2/   OR  5 2/                         1 1 0   5 2 U
5/2/9  OR  5 2/9  OR  5/2 9  OR  5 2 9  1 1 1   5 2 9
.LEFT MARGIN 9
.FILL
.SKIP
.INDENT -9
^^INIVAL#=#\\RETURNED CONTAINING THE NUMBER AT THE START OF THE
RANGE SPECIFICATION IF THIS IS EVALUATED AS AN OCTAL OR DECIMAL
INTEGER (^^KONTRL \\INPUT LESS THAN OR EQUAL TO ZERO AND ^^INIGOT
\\RETURNED = 1).
.SKIP
.INDENT -9
^^INCVAL#=#\\RETURNED CONTAINING THE MIDDLE NUMBER IN THE RANGE
SPECIFICATION IF THIS IS EVALUATED AS AN OCTAL OR DECIMAL INTEGER
(^^KONTRL \\INPUT LESS THAN OR EQUAL TO ZERO AND ^^INCGOT \\RETURNED
= 1).
.SKIP
.INDENT -9
^^LMTVAL#=#\\RETURNED CONTAINING THE NUMBER AT THE END OF THE RANGE
SPECIFICATION IF THIS IS EVALUATED AS AN OCTAL OR DECIMAL INTEGER
(^^KONTRL \\INPUT LESS THAN OR EQUAL TO ZERO AND ^^LMTGOT \\RETURNED
= 1).
.SKIP
.INDENT -9
^^VALINI#=#\\RETURNED CONTAINING THE NUMBER AT THE START OF THE
RANGE SPECIFICATION IF THIS IS EVALUATED AS A REAL NUMBER (^^KONTRL
\\INPUT GREATER THAN ZERO AND ^^INIGOT \\RETURNED = 1).
.SKIP
.INDENT -9
^^VALINC#=#\\RETURNED CONTAINING THE MIDDLE NUMBER IN THE RANGE
SPECIFICATION IF THIS IS EVALUATED AS A REAL NUMBER (^^KONTRL
\\INPUT GREATER THAN ZERO AND ^^INCGOT \\RETURNED = 1).
.SKIP
.INDENT -9
^^VALLMT#=#\\RETURNED CONTAINING THE NUMBER AT THE END OF THE RANGE
SPECIFICATION IF THIS IS EVALUATED AS A REAL NUMBER (^^KONTRL
\\INPUT GREATER THAN ZERO AND ^^LMTGOT \\RETURNED = 1).
.PAGE
.LEFT MARGIN 0
.FILL
.CENTER
^DEMONSTRATION ^PROGRAM TO ^INTERACTIVELY ^TEST ^^DASPAN
.CENTER
------------- ------- -- ------------- ---- ------
.SKIP
T\\HE PROGRAM LISTED ON THE FOLLOWING PAGES ACCEPTS A LINE OF TEXT
FROM THE USER, THEN REPORTS EACH PUNCTUATION MARK, EACH SINGLE
VALUE, AND EACH RANGE TOGETHER WITH THE PORTION OF THE TEXT BY WHICH
THESE ARE SPECIFIED. ^A SAMPLE DIALOG BETWEEN THE PROGRAM AND THE
USER IS PRESENTED FOLLOWING THE LISTING OF THE PROGRAM.
.SKIP
.NOFILL
^^C     PROGRAM TO DEMONSTRATE DASPAN ROUTINE
C
      DIMENSION IBUFFR(60),JBUFFR(60),LEGEND(28)
      DATA LEGEND/1HI,1HN,1HI,1HT,1HI,1HA,1HL,1H ,
     11H,,1H ,1HI,1HN,1HC,1HR,1HE,1HM,1HE,1HN,1HT,1H ,
     21H,,1H ,1HL,1HI,1HM,1HI,1HT,1H /
      DATA ITTY,JTTY/5,5/
      DATA MAXBFR,MAXOUT/60,60/
      DATA IGREAT,IBLANK/1H>,1H /
      WRITE(JTTY,1)
    1 FORMAT(1X,37HPROGRAM TO DEMONSTRATE DASPAN ROUTINE/
     124H TEST DAISPN (Y OR N) = ,$)
      READ(ITTY,2)IANS
    2 FORMAT(1A1)
      KONTRL=0
      IF(IANS.EQ.1HY)GO TO 4
      WRITE(JTTY,3)
    3 FORMAT(10H KONTRL = ,$)
      READ(ITTY,6)KONTRL
    4 IRADIX=10
      IF(KONTRL.LT.0)IRADIX=8
      WRITE(JTTY,5)
    5 FORMAT(10H KONECT = ,$)
      READ(ITTY,6)KONECT
    6 FORMAT(1I)
      MANY=0
C
C     READ TEXT TYPED BY USER
    7 WRITE(JTTY,8)
    8 FORMAT(1X,1H*,$)
      READ(ITTY,9)IBUFFR
    9 FORMAT(60A1)
      LOWBFR=1
   10 INIBFR=LOWBFR
      IF(IANS.EQ.1HY)
     1  CALL DAISPN(       KONECT,IBUFFR,MAXBFR,LOWBFR,
     2MANY  ,KIND  ,INIGOT,INCGOT,LMTGOT,INIVAL,INCVAL,
     3LMTVAL)
      IF(IANS.NE.1HY)
     1  CALL DASPAN(KONTRL,KONECT,IBUFFR,MAXBFR,LOWBFR,
     2MANY  ,KIND  ,INIGOT,INCGOT,LMTGOT,INIVAL,INCVAL,
     3LMTVAL,VALINI,VALINC,VALLMT)
      IF(LOWBFR.LE.INIBFR)GO TO 12
      J=LOWBFR-1
      WRITE(JTTY,11)(IBUFFR(I),I=INIBFR,J),IGREAT
   11 FORMAT(1X,1H<,100A1)
   12 GO TO(13,15,17,19,25,25,25,25,21,23),KIND
C
C     REPORT IF OTHER THAN SINGLE NUMBER OR CORRECT SERIES
   13 WRITE(JTTY,14)
   14 FORMAT(6H EMPTY)
      GO TO 7
   15 WRITE(JTTY,16)
   16 FORMAT(17H END OF STATEMENT)
      GO TO 10
   17 WRITE(JTTY,18)
   18 FORMAT(10H AMPERSAND)
      GO TO 7
   19 WRITE(JTTY,20)MANY
   20 FORMAT(8H MISSING,I3)
      GO TO 10
   21 WRITE(JTTY,22)
   22 FORMAT(15H TOO MANY ITEMS)
      GO TO 10
   23 WRITE(JTTY,24)
   24 FORMAT(18H ILLEGAL DELIMITER)
      GO TO 10
C
C     REPORT SINGLE NUMBER OR CORRECT SERIES
   25 KOUNT=1
      JBUFFR(1)=IBLANK
      DO 37 IPASS=1,3
      GO TO(26,29,32),IPASS
   26 IF(INIGOT.EQ.0)GO TO 37
      DO 27 I=1,8
      KOUNT=KOUNT+1
   27 JBUFFR(KOUNT)=LEGEND(I)
      IF(KONTRL.GT.0)GO TO 28
      NUMBER=INIVAL
      GO TO 34
   28 VALUE=VALINI
      GO TO 36
   29 IF(INCGOT.EQ.0)GO TO 37
      J=11
      IF(KOUNT.GT.1)J=9
      DO 30 I=J,20
      KOUNT=KOUNT+1
   30 JBUFFR(KOUNT)=LEGEND(I)
      IF(KONTRL.GT.0)GO TO 31
      NUMBER=INCVAL
      GO TO 34
   31 VALUE=VALINC
      GO TO 36
   32 IF(LMTGOT.EQ.0)GO TO 37
      J=23
      IF(KOUNT.GT.1)J=21
      DO 33 I=J,28
      KOUNT=KOUNT+1
   33 JBUFFR(KOUNT)=LEGEND(I)
      IF(KONTRL.GT.0)GO TO 35
      NUMBER=LMTVAL
   34 LFTCOL=KOUNT
      CALL DANUMB(0,NUMBER,IRADIX,JBUFFR,
     1KOUNT,LFTCOL,MAXOUT)
      GO TO 37
   35 VALUE=VALLMT
   36 LFTCOL=KOUNT
      CALL DARITE(VALUE,-1,0,0,0,
     1-3,0,10,-1,-2,6,6,
     2-1,0,5,0,0,0,LFTCOL,
     3MAXOUT,JBUFFR,KOUNT,IERR)
   37 CONTINUE
      IF(KIND.EQ.5)WRITE(JTTY,38)MANY,(JBUFFR(I),I=1,KOUNT)
   38 FORMAT(8H NUMBER ,I3,1H ,100A1)
      IF(KIND.EQ.6)WRITE(JTTY,39)MANY,(JBUFFR(I),I=1,KOUNT)
   39 FORMAT(8H SERIES ,I3,1H ,100A1)
      IF(KIND.EQ.7)WRITE(JTTY,40)MANY,(JBUFFR(I),I=1,KOUNT)
   40 FORMAT(8H SERIES ,I3,1H/,100A1)
      IF(KIND.EQ.8)WRITE(JTTY,41)MANY,(JBUFFR(I),I=1,KOUNT)
   41 FORMAT(8H SERIES ,I3,1H*,100A1)
      GO TO 10
      END
.SKIP 3
.TEST PAGE 10
T\\YPICAL ^DIALOG ^BETWEEN ^^DASPAN D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
^^PROGRAM TO DEMONSTRATE DASPAN ROUTINE
TEST DAISPN (Y OR N) = N
KONTRL = 4
KONECT = -1
*10-20 30 -40,50 , -60  ,  70 , _&COMMA ALSO STARTS NEXT LINE
<10>
NUMBER   1  INITIAL 10, LIMIT 10
<-20>
NUMBER   2  INITIAL -20, LIMIT -20
< 30>
NUMBER   3  INITIAL 30, LIMIT 30
< -40>
NUMBER   4  INITIAL -40, LIMIT -40
<,50>
NUMBER   5  INITIAL 50, LIMIT 50
< , -60>
NUMBER   6  INITIAL -60, LIMIT -60
<  ,  70>
NUMBER   7  INITIAL 70, LIMIT 70
< , _&COMMA ALSO STARTS NEXT LINE >
AMPERSAND
*,10/20-30/40 -50/60  ,  -70/80,_&COMMA ONLY BEFORE AMPERSAND
MISSING  8
<,10/20>
SERIES   9/ INITIAL 10, LIMIT 20
<-30/40>
SERIES  10/ INITIAL -30, LIMIT 40
< -50/60>
SERIES  11/ INITIAL -50, LIMIT 60
<  ,  -70/80>
SERIES  12/ INITIAL -70, LIMIT 80
<,_&COMMA ONLY BEFORE AMPERSAND >
AMPERSAND
*3*-16.01  ,  ,   //77K   ;  ,  /87.2/   _&COMMA ON NEXT LINE
<3*-16.01>
SERIES  13* INITIAL 3, LIMIT -16.01
<  ,  >
MISSING 14
<,   //77K>
SERIES  15/ LIMIT 77000
<   ;>
END OF STATEMENT
<  >
MISSING  1
<,  /87.2/>
SERIES   2/ INCREMENT 87.2
<   _&COMMA ON NEXT LINE >
AMPERSAND
*, / , // , *  _&COMMA ON NEITHER LINE
<, />
SERIES   3/
< , //>
SERIES   4/
< , *>
SERIES   5*
<  _&COMMA ON NEITHER LINE                        >
AMPERSAND
*/9 , //9 , *9  !COMMENT NOT MARKING A CONTINUATION
</9>
SERIES   6/ LIMIT 9
< , //9>
SERIES   7/ LIMIT 9
< , *9>
SERIES   8* LIMIT 9
<  !COMMENT NOT MARKING A CONTINUATION          >
EMPTY
*/2/
</2/>
SERIES   1/ INCREMENT 2
<                                                         >
EMPTY
*/2/9
</2/9>
SERIES   1/ INCREMENT 2, LIMIT 9
<                                                        >
EMPTY
*5/ , 5// , 5*
<5/>
SERIES   1/ INITIAL 5
< , 5//>
SERIES   2/ INITIAL 5
< , 5*>
SERIES   3* INITIAL 5
<                                               >
EMPTY
* 5
< 5>
NUMBER   1  INITIAL 5, LIMIT 5
<                                                          >
EMPTY
*5/9 , 5//9 , 5*9
<5/9>
SERIES   1/ INITIAL 5, LIMIT 9
< , 5//9>
SERIES   2/ INITIAL 5, LIMIT 9
< , 5*9>
SERIES   3* INITIAL 5, LIMIT 9
<                                            >
EMPTY
*5/2/
<5/2/>
SERIES   1/ INITIAL 5, INCREMENT 2
<                                                        >
EMPTY
*5/2/9
<5/2/9>
SERIES   1/ INITIAL 5, INCREMENT 2, LIMIT 9
<                                                       >
EMPTY
*/// , 5///9 , /2/2/ , 5//2/ , ** , 5*2*9 , 5*2/9 , 5/2*9
<///>
TOO MANY ITEMS
< , 5///9>
TOO MANY ITEMS
< , /2/2/>
TOO MANY ITEMS
< , 5//2/>
TOO MANY ITEMS
< , **>
TOO MANY ITEMS
< , 5*2*9>
TOO MANY ITEMS
< , 5*2/9>
TOO MANY ITEMS
< , 5/2*9>
TOO MANY ITEMS
<    >
EMPTY
.SUBTITLE ^^DASWAP, S\\WAPS ^ADJACENT ^REGIONS IN ^BUFFER
.PAGE
.LEFT MARGIN 0
.NOFILL
^^DDDDDDD      AAA     SSSSSSS  WWW    WWW    AAA    PPPPPPPPP
DDD   DDD  AAA AAA  SSS       WWW    WWW  AAA AAA  PPP   PPP
DDD   DDD AAA   AAA  SSSSSSS  WWW WW WWW AAA   AAA PPPPPPPPP
DDD   DDD AAAAAAAAA       SSS WWWW  WWWW AAAAAAAAA PPP
DDDDDDD   AAA   AAA SSSSSSSS  WWW    WWW AAA   AAA PPP
.FILL
.SKIP 3
.CENTER
DASWAP, S\\WAPS ^ADJACENT ^REGIONS IN ^BUFFER
.CENTER
------##----- -------- ------- -- ------
.SKIP
^^DASWAP \\IS A ^^FORTRAN \\ROUTINE WHICH INTERCHANGES 2 ADJACENT
REGIONS IN THE INPUT ARRAY WITHOUT THE USE OF A TEMPORARY STORAGE
ARRAY. ^THE SWAP IS PERFORMED BY MOVING THE VALUES DIRECTLY TO THE
LOCATIONS WHICH THEY ARE TO OCCUPY IN THE RESULT. ^THIS OPERATION IS
OFTEN USEFUL FOR THE MANIPULATION OF CHARACTERS READ 1 TO A COMPUTER
STORAGE LOCATION BY A MULTIPLE OF AN ^A1 FORMAT OR ELSE DEFINED BY
OTHER ROUTINES WITHIN THIS PACKAGE.
.SKIP 2
.CENTER
^THE ^^DASWAP A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DASWAP \I\S
.SKIP
.NOFILL
      SUBROUTINE DASWAP(IARRAY,LOW,MID,MAX)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IARRAY(MAX)
.SKIP
.FILL
IARRAY \\IS USED FOR BOTH INPUT TO AND OUTPUT FROM THIS ROUTINE.
^THE REST OF THE ARGUMENTS ARE USED FOR INPUT ONLY AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IARRAY#=#\\THE ARRAY WHICH IS INPUT CONTAINING IN LOCATIONS
^^IARRAY(LOW) \\THROUGH ^^IARRAY(MID) \\THE LOWER SECTION OF TEXT
WHICH IS TO BE SWAPPED WITH THE UPPER SECTION OF TEXT IN LOCATIONS
^^IARRAY(MID+1) \\THROUGH ^^IARRAY(MAX). E\\ACH ^^IARRAY \\LOCATION
CONTAINS A SINGLE CHARACTER AS THOUGH READ BY AN ^A1 FORMAT OR
DEFINED BY A 1^H FIELD.
.SKIP
.INDENT -9
^^LOW####=#\\THE SUBSCRIPT WITHIN THE ^^IARRAY \\ARRAY OF THE LOWEST
LOCATION WITHIN THE LOWER REGION.
.SKIP
.INDENT -9
^^MID####=#\\THE SUBSCRIPT WITHIN THE ^^IARRAY \\ARRAY OF THE
HIGHEST LOCATION WITHIN THE LOWER REGION.
.SKIP
.INDENT -9
^^MAX####=#\\THE SUBSCRIPT WITHIN THE ^^IARRAY \\ARRAY OF THE
HIGHEST LOCATION WITHIN THE HIGHER REGION.
.PAGE
.LEFT MARGIN 0
.CENTER
^DEMONSTRATION OF ^MANNER IN WHICH ^REGIONS ARE ^SWAPPED
.CENTER
------------- -- ------ -- ----- ------- --- -------
.SKIP
.NOFILL
#^^A B C D 1 2   I\\LLUSTRATION AT LEFT DEMONSTRATES HOW REGIONS
#. <-------<   OF  4  ITEMS,  LETTERS  ^A THROUGH ^D, AND OF 2
#. >---> . .   ITEMS, DIGITS 1 AND 2,  ARE  SWAPPED.   2  IS
#. . . >--->   MOVED INTO LOCATION HOLDING ^B, WHICH IS MOVED
#<-------< .   INTO LOCATION HOLDING  ^D,  WHICH  IS  FINALLY
#>---> . . .   MOVED  INTO  LOCATION  ORIGINALLY  HOLDING 2.
#. . >---> .   ^THIS SWAPPED HALF OF ITEMS SO  SAME  SEQUENCE
#1 2 ^^A B C D   \\IS PERFORMED WITH ITEMS AT 1, ^A AND ^C.
.SKIP
.FILL
.LEFT MARGIN 1
.RIGHT MARGIN 60
^ON THIS AND THE FOLLOWING PAGE ARE SHOWN ALL PAIRS OF REGIONS FOR
WHICH THE SUMS OF THE REGION SIZES VARY FROM 2 THROUGH 8, EXCEPT FOR
THOSE CASES IN WHICH 1 REGION HAS A ZERO LENGTH.
.SKIP
.LEFT MARGIN 0
.NOFILL
#SUM=2      SUM=3                SUM=4
#
#^^A 1        A 1 2   A B 1        A 1 2 3   A B 1 2   A B C 1
#<-<        . <-<   <---<        . . <-<   . <---<   <-----<
#>->        <-< .   >-> .        . <-< .   . >--->   >-> . .
#1 A        >--->   . >->        <-< . .   <---< .   . >-> .
#           1 2 A   1 A B        >----->   >---> .   . . >->
#                                1 2 3 A   1 2 A B   1 A B C
#\\SUM=5
#
#^^A 1 2 3 4   A B 1 2 3   A B C 1 2   A B C D 1
#. . . <-<   . . <---<   . <-----<   <-------<
#. . <-< .   <---< . .   . >---> .   >-> . . .
#. <-< . .   >-----> .   <-----< .   . >-> . .
#<-< . . .   . <---< .   >---> . .   . . >-> .
#>------->   . >----->   . . >--->   . . . >->
#1 2 3 4 A   1 2 3 A B   1 2 A B C   1 A B C D
#
#\\SUM=6
#
#^^A 1 2 3 4 5   A B 1 2 3 4   A B C 1 2 3   A B C D 1 2
#. . . . <-<   . . . <---<   . . <-----<   . <-------<
#. . . <-< .   . <---< . .   . . >----->   . >---> . .
#. . <-< . .   . >------->   . <-----< .   . . . >--->
#. <-< . . .   . . <---< .   . >-----> .   <-------< .
#<-< . . . .   <---< . . .   <-----< . .   >---> . . .
#>--------->   >-------> .   >-----> . .   . . >---> .
#1 2 3 4 5 A   1 2 3 4 A B   1 2 3 A B C   1 2 A B C D
#
#A B C D E 1
#<---------<
#>-> . . . .
#. >-> . . .
#. . >-> . .
#. . . >-> .
#. . . . >->
#1 A B C D E
.PAGE
#I\\LLUSTRATIONS SHOWN BELOW DEMONSTRATE SUMS OF 7 AND 8.
.SKIP
#^^A 1 2 3 4 5 6   A B 1 2 3 4 5   A B C 1 2 3 4
#. . . . . <-<   . . . . <---<   . . . <-----<
#. . . . <-< .   . . <---< . .   <-----< . . .
#. . . <-< . .   <---< . . . .   >-------> . .
#. . <-< . . .   >---------> .   . <-----< . .
#. <-< . . . .   . . . <---< .   . >-------> .
#<-< . . . . .   . <---< . . .   . . <-----< .
#>----------->   . >--------->   . . >------->
#1 2 3 4 5 6 A   1 2 3 4 5 A B   1 2 3 4 A B C
#
#A B C D 1 2 3   A B C D E 1 2   A B C D E F 1
#. . <-------<   . <---------<   <-----------<
#. . >-----> .   . >---> . . .   >-> . . . . .
#. <-------< .   . . . >---> .   . >-> . . . .
#. >-----> . .   <---------< .   . . >-> . . .
#<-------< . .   >---> . . . .   . . . >-> . .
#>-----> . . .   . . >---> . .   . . . . >-> .
#. . . >----->   . . . . >--->   . . . . . >->
#1 2 3 A B C D   1 2 A B C D E   1 A B C D E F
#
#A 1 2 3 4 5 6 7   A B 1 2 3 4 5 6   A B C 1 2 3 4 5
#. . . . . . <-<   . . . . . <---<   . . . . <-----<
#. . . . . <-< .   . . . <---< . .   . <-----< . . .
#. . . . <-< . .   . <---< . . . .   . >---------> .
#. . . <-< . . .   . >----------->   . . . <-----< .
#. . <-< . . . .   . . . . <---< .   <-----< . . . .
#. <-< . . . . .   . . <---< . . .   >---------> . .
#<-< . . . . . .   <---< . . . . .   . . <-----< . .
#>------------->   >-----------> .   . . >--------->
#1 2 3 4 5 6 7 A   1 2 3 4 5 6 A B   1 2 3 4 5 A B C
#
#A B C D 1 2 3 4   A B C D E 1 2 3   A B C D E F 1 2
#. . . <-------<   . . <---------<   . <-----------<
#. . . >------->   . . >-----> . .   . >---> . . . .
#. . <-------< .   <---------< . .   . . . >---> . .
#. . >-------> .   >-----> . . . .   . . . . . >--->
#. <-------< . .   . . . >-----> .   <-----------< .
#. >-------> . .   . <---------< .   >---> . . . . .
#<-------< . . .   . >-----> . . .   . . >---> . . .
#>-------> . . .   . . . . >----->   . . . . >---> .
#1 2 3 4 A B C D   1 2 3 A B C D E   1 2 A B C D E F
#
#A B C D E F G 1
#<-------------<
#>-> . . . . . .
#. >-> . . . . .
#. . >-> . . . .
#. . . >-> . . .
#. . . . >-> . .
#. . . . . >-> .
#. . . . . . >->
#1 A B C D E F G
.FILL
.LEFT MARGIN 0
.SUBTITLE ^^DATALL, T\\IME ^SERIES ^PLOT ^ROUTINE FOR ^PRINTER
.PAGE
.NOFILL
.LEFT MARGIN 0
.RIGHT MARGIN 60
 ^^DDDDD          AAA  TTTTTTTT      AAA  LL        LL
 DD   DD       AAAA     TT        AAAA  LL        LL
 DD    DD     AA AA     TT       AA AA  LL        LL
 DD    DD    AA  AA     TT      AA  AA  LL        LL
 DD    DD   AAAAAAA     TT     AAAAAAA  LL        LL
 DD   DD   AA    AA     TT    AA    AA  LL        LL
 DDDDD    AA     AA     TT   AA     AA  LLLLLLLL  LLLLLLLL
.FILL
.SKIP 3
.CENTER
DATALL, T\\IME ^SERIES ^PLOT ^ROUTINE FOR ^PRINTER
.CENTER
------##---- ------ ---- ------- --- -------
.SKIP
^^DATALL \\IS A ^^FORTRAN \\SUBROUTINE WHICH CONSTRUCTS PRINTABLE
PLOTS WITH A VERTICAL AXIS REPRESENTING TIME (OR ANY OTHER VARIABLE
WHICH HAS A CONSTANT INCREMENT BETWEEN SAMPLES) EXTENDING ONTO AS
MANY LINES AND PAGES AS ARE NECESSARY TO REPRESENT THE DATA. ^THE
POINTS WHICH REPRESENT A PARTICULAR DATA ITEM IN CONSECUTIVE TIME
PERIODS CAN BE CONNECTED WITH LINE SEGMENTS TO FORM A CURVE. ^A
CURVE DOES NOT NEED TO EXTEND ACROSS ALL TIME PERIODS. ^THE SECTIONS
OF A CURVE WHICH ARE OUTSIDE THE PLOT AREA ARE NOT REPRESENTED. ^A
MAXIMUM OF 26 CURVES ARE DISTINGUISHABLE BY BEING PLOTTED WITH
DIFFERENT LETTERS, BUT THERE IS NO LIMIT TO THE TOTAL NUMBER OF
CURVES WHICH CAN BE INCLUDED IN THE PLOT OF A PARTICULAR TIME PERIOD
OR IN THE PLOT OF ALL TIME PERIODS. ^OVERLAPPING SECTIONS OF CURVES
REPRESENTED BY DIFFERENT LETTERS ARE INDICATED BY AMPERSANDS.
.SKIP
^^DATALL \\IS CALLED ONCE FOR EACH TIME PERIOD TO APPEND A
REPRESENTATION OF THE DATA FOR THAT TIME PERIOD TO THE PLOT OF THE
DATA FOR THE PREVIOUS TIME PERIOD. ^ARRAYS INPUT TO ^^DATALL
\\SPECIFY THE HORIZONTAL OR NON-TIME COORDINATE OF EACH POINT FOR
THE TIME PERIOD, THE LETTERS WITH WHICH THESE POINTS ARE TO BE
PLOTTED, AND THE LETTERS WITH WHICH THE POINTS ARE TO BE CONNECTED
WITH THE POINTS FOR THE PREVIOUS TIME PERIOD. ^THE SEGMENT OF THE
PLOT REPRESENTING A SINGLE TIME PERIOD CAN CONTAIN SEVERAL POINTS
AND/OR LINES. ^IT IS OPTIONAL WHETHER THE PLOT SEGMENT REPRESENTING
A TIME PERIOD IS RULED WITH A GRID LINE AND IS IDENTIFIED BY A SCALE
NUMBER.
.SKIP
^^DATALL \\IS A RELATIVELY SHORT ROUTINE WHICH RELIES UPON ^^DAPLAT
\\FOR ITS PLOTTING CAPABILITIES. ^THE ROUTINES ^^DARITE \\AND
^^PLTCUT \\MUST ALSO BE LOADED AS THESE ARE CALLED BY ^^DAPLAT.
DAPLAT \\MUST NOT BE CALLED BY ANY OTHER PROGRAM UNTIL THE PLOTTING
OF ALL TIME PERIODS HAS BEEN COMPLETED SINCE ^^DAPLAT \\HAS INTERNAL
STORAGE WHICH IS USED BY ^^DATALL. I\\F THE USER'S PROGRAM CALLS
^^DAPLAT \\TO DO OTHER PLOTTING AFTER THE PLOTTING OF THE DATA FOR
ALL TIME PERIODS HAS BEEN COMPLETED, THEN THIS SUBSEQUENT CALL TO
^^DAPLAT \\MUST USE NON-ZERO VALUES FOR THE ARGUMENTS ^^MAXWID,
MAXHIH, MSHWID \\AND ^^MSHHIH \\SINCE THE DEFAULT VALUES OF THESE
^^DAPLAT \\ARGUMENTS ARE CHANGED BY ^^DATALL. T\\HE CHARACTER SET
USED FOR PLOTS PRODUCED BY ^^DATALL \\CAN BE MANIPULATED AS
DESCRIBED IN THE INSTRUCTION MANUAL FOR ^^DAPLAT. T\\HE MAXIMUM PLOT
SIZE LIMITATION FOR ^^DAPLAT \\APPLIES TO EACH TIME PERIOD, NOT TO
THE ENTIRE PLOT OF ALL TIME PERIODS, AND SO SHOULD BE OF NO CONCERN
TO THE USER.
.SKIP 3
.CENTER
^THE ^^DATALL A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DATALL \I\S
.SKIP
.NOFILL
      SUBROUTINE DATALL(LSTLIN,MRKLIN,MAXWID,IFLTTR,LETTER,
     1    IFCNCT,KONECT,XPOINT,MINSUB,MAXSUB, XLEFT,YVALUE,
     2    XRIGHT, IGRID, IEDGE,MARGIN,MSHWID,MSHHIH,LTROFF,
     3    LINPRT, IDISK,IRESET,LSTORE,XSTORE)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION      LETTER(MAXSUB),KONECT(MAXSUB),
     1XPOINT(MAXSUB),LSTORE(MAXSUB),XSTORE(MAXSUB)
.SKIP 2
.FILL
.CENTER
A\\RGUMENTS ^USED TO ^INPUT ^VALUES TO ^^DATALL
.CENTER
--------- ---- -- ----- ------ -- ------
.SKIP
T\\HE FOLLOWING ARGUMENTS ARE USED TO INPUT VALUES TO ^^DATALL.
.SKIP
.LEFT MARGIN 9
.INDENT -9
LSTLIN#=#0, \\THE CURRENT TIME PERIOD IS THE FINAL TIME PERIOD TO BE
REPRESENTED IN THE PLOT. ^SCALE NUMBERS RANGING IN VALUE FROM THAT
OF ^^XLEFT \\THROUGH THAT OF ^^XRIGHT \\ARE TO BE WRITTEN BELOW THE
REPRESENTATION OF THE CURRENT TIME PERIOD, AND THE INTERNAL STORAGE
IN ^^DATALL \\AND ^^DAPLAT \\IS THEN TO BE CLEARED.
.INDENT -2
=#GREATER THAN ZERO, THE CURRENT TIME PERIOD IS NOT THE FINAL TIME
PERIOD IN THE PLOT. ^SUBSEQUENT CALLS TO ^^DATALL \\WILL ADD
ADDITIONAL SEGMENTS TO THE CURRENT PLOT. ^THE VALUE OF ^^LSTLIN \I\S
\\IGNORED OTHER THAN TO DETERMINE WHETHER IT IS GREATER THAN ZERO.
^IF THE MAIN PROGRAM KNOWS THE TOTAL NUMBER OF TIME PERIODS, IT CAN
COUNT ^^LSTLIN \\DOWN TO ZERO. ^IF THE MAIN PROGRAM DOES NOT KNOW
THE TOTAL NUMBER OF TIME PERIODS, IT IS SUFFICIENT TO SET ^^LSTLIN
\\TO 1 UNTIL THE FINAL TIME PERIOD.
.SKIP
.INDENT -9
^^MRKLIN#=#0, \\THE CURRENT VALUE OF ^^YVALUE \\CAN BE PRINTED TO
THE LEFT OF THE BOTTOM LINE IN THE REPRESENTATION OF THE CURRENT
TIME PERIOD AND A LINE CAN BE RULED THROUGH THIS BOTTOM LINE.
^WHETHER THE VALUE OF ^^YVALUE \\WILL ACTUALLY BE PRINTED TO THE
LEFT OF THE THE BOTTOM LINE WILL DEPEND UPON THE VALUE OF ^^IEDGE.
W\\HETHER A LINE WILL ACTUALLY BE RULED THROUGH THE BOTTOM LINE WILL
DEPEND UPON THE VALUES OF ^^IGRID \\AND OF ^^IEDGE, \\AND UPON
WHETHER THE CURRENT LINE IS AT EITHER THE TOP OR THE BOTTOM OF THE
ENTIRE PLOT.
.INDENT -2
=#GREATER THAN ZERO, A SCALE NUMBER IS NOT BE BE PLACED BESIDE THE
BOTTOM LINE IN THE REPRESENTATION OF THE CURRENT TIME PERIOD AND
THIS BOTTOM LINE CANNOT BE RULED AS A GRID LINE. ^THE VALUE OF
^^MRKLIN \\IS IGNORED OTHER THAN TO DETERMINE WHETHER IT IS GREATER
THAN ZERO. ^IF THE VALUE OF ^^YVALUE \\IS TO BE PRINTED BESIDE SOME
BUT NOT ALL TIME PERIODS (FOR EXAMPLE, PERHAPS BESIDE EVERY THIRD
TIME PERIOD), THEN ^^MRKLIN \\CAN BE COUNTED DOWN TO ZERO BY THE
MAIN PROGRAM, AND WHEN EQUAL TO ZERO CAN BE RESET BACK TO ITS
INITIAL VALUE AFTER ^^DATALL \\HAS BEEN CALLED.
.SKIP
.INDENT -9
^^MAXWID#=#\\WIDTH OF THE PLOT STATED AS THE NUMBER OF COLUMNS OF
CHARACTERS FORMING THE PLOTTING AREA UPON WHICH DATA CAN BE PLOTTED.
^^MAXWID \\IS NORMALLY 1 PLUS A MULTIPLE OF ^^MSHWID. T\\HE MAXIMUM
EFFECTIVE VALUE OF ^^MAXWID \I\S 131. I\\T SHOULD BE NOTED THAT AN
ADDITIONAL 12 CHARACTERS ALONG THE LEFT SIDE OF THE PLOT ARE USED
FOR THE SCALE NUMBERS AND THE CARRIAGE CONTROL CHARACTER.
.INDENT -2
=#0, USE THE LAST NONZERO VALUE SPECIFIED FOR ^^MAXWID \\EITHER TO
^^DATALL \\OR TO ^^DAPLAT \\AS THE WIDTH OF THE PLOT, OR USE THE
VALUE 101 IF A NONZERO VALUE OF ^^MAXWID \\HAS NOT BEEN SPECIFIED.
.SKIP
.INDENT -9
^^IFLTTR#=#\\SELECTS WHETHER THE POINTS ARE TO BE REPRESENTED USING
ALPHABETIC LETTERS WHICH ARE IDENTIFIED BY THE ^^LETTER \\ARRAY OR
WHICH ARE IDENTIFIED BY THE LOCATIONS OF THE COORDINATES OF THE
POINTS IN THE ^^XPOINT \\ARRAY.
.INDENT -2
=#0, THE ^^LETTER \\ARRAY IDENTIFIES THE CHARACTERS TO BE PLOTTED AT
THE POINTS.
.INDENT -2
=#1, THE POINTS ARE PLOTTED USING THE LETTERS HAVING THE SAME
SEQUENCE NUMBERS IN THE ALPHABET AS THE SUBSCRIPTS OF THE LOCATIONS
IN THE ^^XPOINT \\ARRAY CONTAINING THE COORDINATES. ^THE POINT
HAVING ITS HORIZONTAL COORDINATE IN ^^XPOINT(3) \\WOULD BE
REPRESENTED BY THE LETTER ^C, THE 3RD LETTER IN THE ALPHABET.
^POINTS HAVING SUBSCRIPTS GREATER THAN 26 ARE REPRESENTED BY
ASTERISKS WHICH WILL REPLACE ANY OTHER CHARACTERS ALREADY IN THE
PLOT AT THESE LOCATIONS. ^THE CONTENTS OF THE ^^LETTER \\ARRAY ARE
IGNORED.
.SKIP
.INDENT -9
^^LETTER#=#\\AN ARRAY IDENTIFYING THE LETTERS TO BE USED TO
REPRESENT THE POINTS HAVING THEIR HORIZONTAL COORDINATES IN THE
^^XPOINT \\ARRAY LOCATIONS HAVING THE SAME SUBSCRIPTS AS THE
^^LETTER \\ARRAY. ^^LETTER \\ARRAY VALUES OF -1 INDICATE THAT THE
CORRESPONDING POINTS ARE NOT TO BE PLOTTED. ^^LETTER \\ARRAY VALUES
OF ZERO INDICATE THAT THE CORRESPONDING POINTS ARE TO BE PLOTTED
WITH ASTERISKS. ^VALUES GREATER THAN ZERO ARE THE SEQUENCE NUMBERS
WITHIN THE ALPHABET OF THE LETTERS TO BE USED TO REPRESENT THE
POINTS. ^IF AN ALPHABETIC LETTER AND AN ASTERISK SELECTED BY A ZERO
VALUE IN THE ^^LETTER \\ARRAY ARE TO OCCUPY THE SAME PRINTING
CHARACTER POSITION ON THE PLOT, THEN THE LETTER APPEARS. ^IF
DIFFERENT LETTERS ARE TO OCCUPY THE SAME PRINTING CHARACTER POSITION
ON THE PLOT, THEN AN AMPERSAND APPEARS INSTEAD. ^VALUES IN THE
^^LETTER \\ARRAY WHICH ARE GREATER THAN 26 SELECT ASTERISKS WHICH
WILL REPLACE ANY OTHER CHARACTERS ALREADY IN THE PLOT AT THESE
LOCATIONS. ^IF ^^IFLTTR \\IS NON-ZERO, THEN THE ^^LETTER \\ARRAY IS
NOT USED AND NEED NOT BE DIMENSIONED.
.SKIP
.INDENT -9
^^IFCNCT#=#\\SELECTS WHETHER THE CHARACTERS TO BE PLOTTED ALONG THE
LINE SEGMENTS CONNECTING POINTS ARE TO BE IDENTIFIED BY THE ^^KONECT
\\ARRAY OR ARE TO BE THE SAME AS THOSE USED TO REPRESENT THE POINTS.
.INDENT -2
=#-1, POINTS IN THE CURRENT TIME PERIOD ARE NOT TO BE CONNECTED TO
THE POINTS OF THE PREVIOUS TIME PERIOD. ^THE CONTENTS OF THE
^^KONECT \\ARRAY ARE IGNORED.
.INDENT -2
=#0, THE ^^KONECT \\ARRAY IDENTIFIES THE CHARACTERS TO BE PLOTTED
ALONG THE LINE SEGMENTS.
.INDENT -2
=#1, THE LINE SEGMENTS ARE TO BE FORMED OF THE SAME CHARACTERS AS
ARE USED TO PLOT THE POINTS IN THE CURRENT PERIOD. ^THE CONTENTS OF
THE ^^KONECT \\ARRAY ARE IGNORED.
.SKIP
.INDENT -9
^^KONECT#=#\\AN ARRAY IDENTIFYING THE CHARACTERS WITH WHICH TO
CONNECT POINTS OF THE CURRENT TIME PERIOD WITH POINTS OF THE
PREVIOUS TIME PERIOD WHICH HAD THEIR COORDINATES IN ^^XPOINT \\ARRAY
LOCATIONS WITH THE SAME SUBSCRIPTS. ^IF ^^XPOINT \\ARRAY LOCATIONS
HAVING THE SAME SUBSCRIPTS DID NOT SPECIFY COORDINATES TO BE PLOTTED
BOTH IN THE CURRENT TIME PERIOD AND IN THE PREVIOUS TIME PERIOD,
THEN THE VALUE IN THE ^^KONECT \\ARRAY IS IGNORED. ^LETTERS ARE
SELECTED BY THE ^^KONECT \\ARRAY IN THE SAME MANNER AS BY THE
^^LETTER \\ARRAY, WITH THE EXCEPTION THAT A ^^KONECT \\ARRAY VALUE
OF -1 CAUSES THE CORRESPONDING POINTS, IF ANY, TO NOT BE CONNECTED.
^IF ^^IFCNCT \\IS NON-ZERO, THEN THE ^^KONECT \\ARRAY IS NOT USED
AND NEED NOT BE DIMENSIONED.
.SKIP
.INDENT -9
^^XPOINT#=#\\AN ARRAY CONTAINING THE HORIZONTAL OR NON-TIME
COORDINATES OF THE POINTS TO BE PLOTTED FOR THE CURRENT TIME PERIOD.
^THE COORDINATE SYSTEM USED FOR THE ^^XPOINT \\ARRAY MUST BE THE
SAME AS THAT USED FOR THE ARGUMENTS ^^XLEFT \\AND ^^XRIGHT \\WHICH
SELECT THE COORDINATES TO BE PLACED AT THE LEFT EDGE AND AT THE
RIGHT EDGE OF THE PLOT RESPECTIVELY. ^ONLY VALUES OF ^^LETTER,
KONECT \\AND ^^XPOINT \\HAVING SUBSCRIPTS IN THE RANGE STARTING WITH
^^MINSUB \\AND EXTENDING THROUGH ^^MAXSUB \\ARE USED.
.SKIP
.INDENT -9
^^MINSUB#=#\\SUBSCRIPT OF THE ^^LETTER, KONECT \\AND ^^XPOINT
\\ARRAY LOCATIONS CONTAINING THE INFORMATION ABOUT THE FIRST POINT
TO BE PLOTTED. ^THE SUBSCRIPT RANGES CAN VARY FROM ONE TIME PERIOD
TO THE NEXT, AND NEED NOT EVEN OVERLAP.
.SKIP
.INDENT -9
^^MAXSUB#=#\\SUBSCRIPT OF THE ^^LETTER, KONECT \\AND ^^XPOINT
\\ARRAY LOCATIONS CONTAINING THE INFORMATION ABOUT THE FINAL POINT
TO BE PLOTTED. ^THE SUBSCRIPT RANGES CAN VARY FROM ONE TIME PERIOD
TO THE NEXT, AND NEED NOT EVEN OVERLAP. ^IF NO DATA IS TO BE PLOTTED
FOR THE CURRENT TIME PERIOD, THEN ^^MAXSUB \\CAN BE LESS THAN
^^MINSUB. I\\T SHOULD BE NOTED THAT EMPTY TIME PERIODS AT THE START
OF THE TIME SERIES PLOT ARE DISCARDED, BUT THAT ONCE A NON-EMPTY
TIME PERIOD HAS BEEN ENCOUNTERED, THEN ALL REMAINING TIME PERIODS
ARE PLOTTED WHETHER EMPTY OR NOT. ^THIS DOES NOT, OF COURSE, INSURE
THAT SOMETHING WILL ACTUALLY BE PLOTTED IN THE FIRST TIME PERIOD
SHOWN, SINCE ALL OF THE POINTS MIGHT BE OUTSIDE THE WINDOW DEFINED
BY ^^XLEFT \\AND ^^XRIGHT, \\BUT ONLY THAT AN ATTEMPT IS MADE TO
PLOT SOMETHING IN THE FIRST TIME PERIOD SHOWN. ^THE ARRAYS ^^XSTORE
\\AND ^^LSTORE \\MUST ALSO BE DIMENSIONED TO AT LEAST THE MAXIMUM
VALUE OF ^^MAXSUB.
.SKIP
.INDENT -9
XLEFT##=#\\THE HORIZONTAL OR NON-TIME DATA COORDINATE TO BE PLACED
IN THE CENTER OF THE CHARACTER COLUMN AT THE LEFT EDGE OF THE PLOT.
^IF A SCALE NUMBER IS PRINTED BELOW THE LEFT COLUMN OF THE PLOT,
THEN THIS SCALE NUMBER WILL HAVE A VALUE EQUAL TO THAT OF ^^XLEFT.
O\\NLY THE PORTION OF THE CURVES IN THE ^^XPOINT \\ARRAY HAVING
VALUES IN THE RANGE ^^XLEFT-((XRIGHT-XLEFT)/(2*(MAXWID-1))) \T\O
XRIGHT+ ((XRIGHT-XLEFT)/(2*(MAXWID-1))) \\WILL BE SHOWN ON THE PLOT.
^IF A LINE SEGMENT CROSSES THE PLOT, THEN THE PORTION OF THE LINE
SEGMENT WHICH IS OUTSIDE THE PLOT AREA WILL NOT BE REPRESENTED. ^THE
DATA COORDINATES CAN EITHER INCREASE OR DECREASE FROM LEFT TO RIGHT.
.SKIP
.INDENT -9
^^YVALUE#=#\\NUMBER IDENTIFYING THE CURRENT TIME PERIOD. ^THIS VALUE
MUST CHANGE FROM ONE CALL TO ^^DATALL \\TO THE NEXT, BUT CAN EITHER
INCREASE OR DECREASE. ^IF THE CURRENT VALUE OF ^^MRKLIN \\IS ZERO,
THEN THE VALUE OF ^^YVALUE \\CAN BE PRINTED TO THE LEFT OF THE
LOWEST LINE OF THE CURRENT PLOT SEGMENT.
.SKIP
.INDENT -9
^^XRIGHT#=#\\THE HORIZONTAL OR NON-TIME DATA COORDINATE TO BE PLACED
IN THE CENTER OF THE CHARACTER COLUMN AT THE RIGHT EDGE OF THE PLOT.
^IF A SCALE NUMBER IS PRINTED BELOW THE RIGHT COLUMN OF THE PLOT,
THEN THIS SCALE NUMBER WILL HAVE A VALUE EQUAL TO THAT OF ^^XRIGHT.
.SKIP
.INDENT -9
IGRID##=#0, \\THE PLOT WILL SHOW AN INTERNAL GRID. ^THIS INTERNAL
GRID WILL BE RULED VERTICALLY EVERY ^^MSHWID \\CHARACTERS AND, IF
^^MRKLIN \\IS EQUAL TO ZERO, HORIZONTALLY EVERY ^^MSHHIH \\LINES.
.INDENT -2
=#1, THE PLOT WILL SHOW THE INTERSECTIONS OF THE LINES OF AN
INTERNAL GRID, BUT WILL NOT SHOW THE GRID LINES THEMSELVES. ^THE
INTERNAL GRID WOULD, IF SHOWN, HAVE VERTICAL LINES EVERY ^^MSHWID
\\CHARACTERS ACROSS THE WIDTH OF THE PLOT AND WOULD, IF ^^MRKLIN
\\IS EQUAL TO ZERO, HAVE HORIZONTAL LINES ON THE BOTTOM LINE OF EACH
PLOT SEGMENT. ^EACH PLOT SEGMENT CONSISTS OF ^^MSHHIH \\LINES, SO
GRID INTERSECTIONS CAN BE SHOWN EVERY ^^MSHHIH \\LINES IF ^^MRKLIN
\\IS ALWAYS ZERO.
.INDENT -2
=#2, THE PLOT WILL NOT SHOW AN INTERNAL GRID.
.INDENT -2
=#GREATER THAN 2, THE DECIMAL DIGITS FORMING THE VALUE OF ^^IGRID
\\SELECT MODIFICATION OF THE GRID FORMAT AS DESCRIBED IN THE
DOCUMENTATION OF THE ^^DAPLAT \\ROUTINE.
.SKIP
.INDENT -9
^^IEDGE##=#\\PLACE NUMBERS BOTH TO THE LEFT OF AND BELOW THE PLOT TO
IDENTIFY THE COORDINATE RANGES.
.INDENT -2
=#1, PLACE NUMBERS TO THE LEFT OF THE PLOT, BUT DO NOT PLACE NUMBERS
BELOW THE PLOT.
.INDENT -2
=#2, PLACE NUMBERS BELOW THE PLOT, BUT NOT TO THE LEFT OF THE PLOT.
^UNLESS INCREASED BY THE ^^MARGIN \\ARGUMENT, THE DISTANCE BETWEEN
THE CARRIAGE CONTROL CHARACTER IN COLUMN 1 AND THE LEFT EDGE OF THE
PLOT WILL BE JUST LARGE ENOUGH TO ALLOW A SCALE NUMBER IMMEDIATELY
BELOW THE LEFT EDGE OF THE PLOT.
.INDENT -2
=#3, DO NOT PLACE NUMBERS EITHER TO THE LEFT OF OR BELOW THE PLOT.
^UNLESS PREVENTED BY THE ^^MARGIN \\ARGUMENT, NO CHARACTERS WILL
APPEAR BETWEEN THE CARRIAGE CONTROL CHARACTER IN COLUMN 1 AND THE
LEFT EDGE OF THE PLOT.
.SKIP
.INDENT -9
^^MARGIN#=#\\THE LOWER LIMIT TO THE NUMBER OF CHARACTERS WHICH MUST
APPEAR IN THE OUTPUT BETWEEN THE CARRIAGE CONTROL CHARACTER IN
COLUMN 1 AND THE LEFT EDGE OF THE PLOT. ^^MARGIN \\IS USED TO FORCE
THE PLOT TO REMAIN A FIXED DISTANCE FROM THE CARRIAGE CONTROL
CHARACTER IN COLUMN 1 EVEN IF A NONZERO VALUE OF ^^IEDGE \\HAS
DESELECTED SCALE NUMBERS. ^^MARGIN \\IS ASSUMED TO BE AT LEAST 11 IF
^^IEDGE \\IS ZERO OR 1.
.SKIP
.INDENT -9
^^MSHWID#=#\\WIDTH OF THE GRID DIVISIONS STATED AS THE NUMBER OF
COLUMNS OF CHARACTERS. ^^MSHWID=10 \\WOULD GIVE THE VERTICAL GRID
LINES EVERY 10 CHARACTERS ACROSS THE WIDTH OF THE PLOT AREA.
.INDENT -2
=#0, USE THE LAST NONZERO VALUE SPECIFIED FOR ^^MSHWID \\EITHER TO
^^DATALL \\OR TO ^^DAPLAT \\AS THE GRID DIVISION WIDTH, OR USE THE
VALUE 10 IF A NONZERO VALUE OF ^^MSHWID \\HAS NOT BEEN SPECIFIED.
.SKIP
.INDENT -9
^^MSHHIH#=#\\THE NUMBER OF LINES OF PRINTING TO BE INCLUDED IN THE
PLOT SEGMENT REPRESENTING THE CURRENT TIME PERIOD. ^IF THE POINTS
FOR SUCCESSIVE TIME PERIODS ARE BEING CONNECTED BY LINE SEGMENTS,
THEN THESE LINE SEGMENTS WILL EXTEND ACROSS THESE LINES OF PRINTING.
^THE POINTS THEMSELVES ARE REPRESENTED IN THE BOTTOM LINE OF THE
PLOT SEGMENT.
.INDENT -2
=#0, ASSUME THAT ^^MSHHIH=1 \\IS MEANT. ^EACH TIME PERIOD WILL BE
REPRESENTED BY A SINGLE LINE IN THE TIME SERIES PLOT.
.SKIP
.INDENT -9
^^LTROFF#=#\\NUMBER OF COLUMNS OF CHARACTERS BY WHICH THE LEFTMOST
GRID LINE IS OFFSET FROM THE LEFT BORDER OF THE PLOT. ^^LTROFF \\CAN
BE IN THE RANGE ZERO UP TO BUT NOT INCLUDING ^^MSHWID. I\F LTROFF
\\IS NEGATIVE, THEN IT IS ASSUMED TO HAVE THE VALUE ^^MSHWID+LTROFF
\\INSTEAD. ^IF ^^LTROFF \\IS NONZERO, THEN THE LEFT BORDER OF THE
PLOT WILL BE RULED WITH EXCLAMATION POINTS. ^THE RIGHT BORDER IS
SIMILARLY RULED IF IT DOES NOT BEAR A GRID LINE.
.SKIP
.INDENT -9
^^LINPRT#=#-1, \\DO NOT INCLUDE A CARRIAGE CONTROL CHARACTER TO THE
LEFT OF EACH LINE OF THE PLOT. ^SINCE THE MINUS SIGN OF A NEGATIVE
SCALE NUMBER CAN THEN APPEAR IN COLUMN 1, THE RESULTING OUTPUT MUST
NOT BE TREATED AS THOUGH THE LEFT COLUMN CONTAINS CARRIAGE CONTROL
CHARACTERS.
.INDENT -2
=#0, THE PLOT WILL BE VIEWED BY THE USER ON A TERMINAL, EITHER TYPED
DIRECTLY WITH ^^IDISK \\BEING GIVEN THE TERMINAL UNIT NUMBER, OR
TYPED BY THE USER AFTER THIS ROUTINE HAS WRITTEN THE PLOT INTO A
FILE ON THE UNIT THE NUMBER OF WHICH IS CONTAINED IN ^^IDISK. A
\\BLANK OR SPACE WILL BE USED AS CARRIAGE CONTROL CHARACTER TO GIVE
SINGLE SPACING.
.INDENT -2
=#1, THE PLOT WILL BE PRINTED ON THE LINE PRINTER BY THE USER AFTER
THE PROGRAM HAS WRITTEN THE PLOT INTO A FILE. ^AN ASTERISK WILL BE
USED AS CARRIAGE CONTROL CHARACTER TO GIVE SINGLE SPACING WITH
SUPPRESSION OF SKIPPING EXTRA LINES AT THE PAGE BOUNDARIES. ^ON THE
^^PDP-10, \\AN ASTERISK AS THE CARRIAGE CONTROL CHARACTER GIVES
OVERPRINTING ON THE TERMINAL AS OPPOSED TO SINGLE SPACING.
.SKIP
.INDENT -9
^^IDISK##=#\\THE UNIT NUMBER OF THE DEVICE ONTO WHICH THE PLOTS ARE
TO BE WRITTEN. ^THIS ROUTINE WILL ONLY GENERATE THE PLOT. ^IT IS THE
RESPONSIBILITY OF THE CALLING PROGRAM TO OPEN THE OUTPUT FILE AND TO
WRITE THE CAPTIONS, THE FORM FEEDS AND/OR THE SEPARATING LINES.
.SKIP 2
.LEFT MARGIN 0
.TEST PAGE 5
.CENTER
^ARGUMENT ^USED ^INITIALLY FOR ^INPUT, BUT THEN ^RETURNED ^CHANGED
.CENTER
-------- ---- --------- --- -----##--- ---- -------- -------
.SKIP
^THE FOLLOWING ARGUMENT MUST BE DEFINED BY THE CALLING PROGRAM
BEFORE THIS ROUTINE IS FIRST CALLED. ^THIS ARGUMENT IS RETURNED BY
THIS ROUTINE SET TO -1, AND THIS -1 VALUE SHOULD BE SENT UNCHANGED
TO ANY SUBSEQUENT CALLS TO THIS ROUTINE.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^IRESET#=#\\USED TO IDENTIFY THE FIRST CALL TO ^^DATALL \\SO THAT
STORAGE INSIDE ^^DATALL \\CAN BE PROPERLY INITIALIZED. ^HOWEVER,
UNLESS ^^DATALL \\IS USED UPON A COMPUTER WHICH DOES NOT ALLOW THE
TESTING OF THE VALUE OF A VARIABLE WHICH HAS NOT YET BEEN DEFINED,
HAVING ^^IRESET \\ALWAYS SET TO -1 WILL PRODUCE THE EXPECTED RESULTS
SINCE ONE OF THE VARIABLES SET WITHIN THE ROUTINE IS TESTED AT THE
START OF THE ROUTINE TO DETERMINE WHETHER THE INTERNAL STORAGE HAS
BEEN INITIALIZED.
.INDENT -2
=#-1, THIS IS NOT THE FIRST CALL TO ^^DATALL.
.INDENT -2
=#0, DAPLAT \\HAS ALREADY BEEN CALLED, BUT ^^DATALL \\HAS NOT
PREVIOUSLY BEEN CALLED. ^^IRESET \\IS RETURNED SET TO -1.
.INDENT -2
=#1 (OR GREATER), NEITHER ^^DAPLAT \\NOR ^^DATALL \\HAVE PREVIOUSLY
BEEN CALLED. ^^IRESET \\VALUES GREATER THAN 1, AS DESCRIBED IN THE
DOCUMENTATION OF THE ^^DAPLAT \\ARGUMENT ALSO NAMED ^^IRESET,
\\CAUSE ^^DAPLAT \\TO PRESERVE SELECTED VALUES IN ITS OWN INTERNAL
STORAGE WHICH HAVE BEEN INITIALIZED INSTEAD BY THE CALLING PROGRAM.
^^IRESET \\IS RETURNED SET TO -1.
.SKIP
.LEFT MARGIN 0
.CENTER
^ARGUMENTS ^USED ^ONLY BY ^^DATALL F\O\R I\\NTERMEDIATE ^DATA ^STORAGE
.CENTER
--------- ---- ---- -- ------ --- ------------ ---- -------
.SKIP
^THE VALUES INITIALLY IN THE ARRAY ARGUMENTS ^^LSTORE \\AND ^^XSTORE
\\ARE IGNORED AND ARE DESTROYED. ^THESE ARRAYS ARE USED BY ^^DATALL
\\TO STORE THE NUMBERS IDENTIFYING THE LETTERS USED TO PLOT THE
POINTS AND TO STORE THE HORIZONTAL COORDINATES OF THESE POINTS SO
THAT THE SUBSEQUENT CALL TO ^^DATALL \\CAN EXTEND LINE SEGMENTS FROM
THE POINTS OF THE TIME PERIOD PREVIOUS TO IT. ^THE CALLING PROGRAM
MUST NOT MODIFY THE CONTENTS OF THESE ARRAYS WHILE A TIME SERIES
PLOT IS BEING GENERATED. ^BOTH ARRAYS MUST BE DIMENSIONED TO AT
LEAST THE MAXIMUM VALUE OF ^^MAXSUB. T\\HIS ARRAY SPACE CAN BE USED
FOR OTHER PURPOSES BY THE CALLING PROGRAM AFTER ^^DATALL \\HAS BEEN
CALLED WITH ^^LSTLIN \\EQUAL TO ZERO.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LSTORE#=#\\USED TO STORE THE CONTENTS OF THE ^^LETTER \\ARRAY.
^THE DIMENSION OF THE ^^LSTORE \\ARRAY MUST AT LEAST BE EQUAL TO THE
MAXIMUM VALUE OF ^^MAXSUB \\ENCOUNTERED WHILE ^^IFLTTR \\IS ZERO.
^IF ^^IFLTTR \\IS ALWAYS 1, THEN ^^LSTORE \\IS NEVER USED AND NEED
NOT BE DIMENSIONED.
.SKIP
.INDENT -9
^^XSTORE#=#\\USED TO STORE THE CONTENTS OF THE ^^XPOINT \\ARRAY.
.LEFT MARGIN 0
.PAGE
.LEFT MARGIN 0
.FILL
.CENTER
AN ^EXAMPLE OF THE ^USE OF ^^DATALL
.CENTER
-- ------- -- --- --- -- ------
.SKIP
A\\S AN EXAMPLE OF THE USE OF THIS ROUTINE, THE FOLLOWING PROGRAM
GENERATED THE PLOTS SHOWN ON THE FOLLOWING PAGES.
.SKIP
.NOFILL
      ^^DIMENSION XMATRX(11,3),XPOINT(3),LETTER(3),
     1KONECT(3),XSTORE(3),LSTORE(3)
      DATA ((XMATRX(I,J),I=1,11),J=1,3)/
     112.,14.,15.,16.,16.,16.,15.,14.,14.,11.,10.,
     214.,16.,20.,20.,24.,20.,18.,17., 0., 0., 0.,
     3 0., 0.,12.,13.,14.,16.,20.,22.,22.,21.,20./
      DATA IDISK/1/
      IRESET=1
      DO 7 KPASS=1,4
      IGRID=(100*KPASS)-99
      WRITE(IDISK,1)IGRID
    1 FORMAT(7H IGRID=,1I4)
      MSHHIH=2
      DO 6 JPASS=1,2
      DO 4 IPASS=1,4
      IF(IPASS.EQ.2)MRKLIN=1
      IF(IPASS.EQ.3)MRKLIN=0
      LSTLIN=10
      IF(IPASS.GE.3)LSTLIN=6
      IF(KPASS.GE.2)LSTLIN=2
      IF(JPASS.EQ.2)LSTLIN=1
      INDEX=0
    2 INDEX=INDEX+1
      YVALUE=INDEX
      IF(IPASS.EQ.1)MRKLIN=1
      IF(IPASS.EQ.4)MRKLIN=0
C     TRANSFER MATRIX INTO SINGLE DIMENSION ARRAY
C     X COORDINATE OF 0 IS TAKEN AS NO POINT
      DO 3 I=1,3
      XPOINT(I)=XMATRX(INDEX,I)
      LETTER(I)=I
      IF(XPOINT(I).EQ.0.0)LETTER(I)=-1
    3 KONECT(I)=I
C     MAXWID=31  IFLTTR=0   IFCNCT=0   MINSUB=1    MAXSUB=3
C      XLEFT=10. XRIGHT=25.  IGRID=1    IEDGE=300  MARGIN=0
C     MSHWID=10  LTROFF=0   LINPRT=1
      CALL DATALL(LSTLIN,MRKLIN,31,0,LETTER,
     10,KONECT,XPOINT,1,3,10.0,YVALUE,
     225.0,IGRID,300,0,10,MSHHIH,0,
     31,IDISK,IRESET,LSTORE,XSTORE)
      MRKLIN=1-MRKLIN
      LSTLIN=LSTLIN-1
      IF(LSTLIN.GE.0)GO TO 2
    4 WRITE(IDISK,5)
    5 FORMAT(1X)
    6 MSHHIH=1
    7 CONTINUE
      STOP
      END
.SKIP
 IGRID=   1
*           !   A   B                     !
*           !    AA  BB                   !
*           !      AA  BBB                !
*           !        A    BBBB            !
*           !   C     A       BBB         !
*           !    C     A        B         !
*           !     C     A       BB        !
*           !      C    A         BBBB    !
*           !       C   A             BBB !
*           !        CC A          BBBB   !
*           !          C_&C      BBB       !
*           !          A  CCCCBB          !
*           !         A     BBCCC         !
*           !        A     B     CC       !
*           !       A     B        CC     !
*           !       A               C     !
*           !      AA               C     !
*           !   AAA                C      !
*           ! AA                  C       !
*           !A                   C        !
*           A                   C         !
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   A   B                     !
*           !    AA  BB                   !
*        2 -+      AA +BBB      +         +
*           !        A    BBBB            !
*           !   C     A       BBB         !
*           !    C     A        B         !
*        4 -+     C   + A       BB        +
*           !      C    A         BBBB    !
*           !       C   A             BBB !
*           !        CC A          BBBB   !
*        6 -+         +C_&C      BBB       +
*           !          A  CCCCBB          !
*           !         A     BBCCC         !
*           !        A     B     CC       !
*        8 -+       A +   B     +  CC     +
*           !       A               C     !
*           !      AA               C     !
*           !   AAA                C      !
*       10 -+ AA      +         + C       +
*           !A                   C        !
*           A                   C         !
*           !         !         !         !
*          10        15        20        25
.PAGE
*        1 -+---A---B-+---------+---------+
*           !    AA  BB                   !
*           !      AA  BBB                !
*           !        A    BBBB            !
*        3 -+   C     A       BBB         +
*           !    C     A        B         !
*           !     C     A       BB        !
*           !      C    A         BBBB    !
*        5 -+       C + A       +     BBB +
*           !        CC A          BBBB   !
*           !          C_&C      BBB       !
*           !          A  CCCCBB          !
*        7 -+---------A-----BBCCC---------+
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+---A---B-+---------+---------+
*           !    AA  BB                   !
*        2 -+      AA +BBB      +         +
*           !        A    BBBB            !
*        3 -+   C     A       BBB         +
*           !    C     A        B         !
*        4 -+     C   + A       BB        +
*           !      C    A         BBBB    !
*        5 -+       C + A       +     BBB +
*           !        CC A          BBBB   !
*        6 -+         +C_&C      BBB       +
*           !          A  CCCCBB          !
*        7 -+---------A-----BBCCC---------+
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   AA  BB                    !
*           !     AAA BBB                 !
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   AA  BB                    !
*        2 -+-----AAA-BBB-------+---------+
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+---AA--BB+---------+---------+
*           !     AAA BBB                 !
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+---AA--BB+---------+---------+
*        2 -+-----AAA-BBB-------+---------+
*           !         !         !         !
*          10        15        20        25
.PAGE
 IGRID= 101
*           !   A   B                     !
*           !    AA  BB                   !
*           !      AA  BBB                !
*           !        A    BBBB            !
*           !   C     A       BBB         !
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   A   B                     !
*           !    AA  BB                   !
*        2 -+      AA +BBB      +         +
*           !        A    BBBB            !
*           !   C     A       BBB         !
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+   A   B +         +         +
*           !    AA  BB                   !
*           !      AA  BBB                !
*           !        A    BBBB            !
*        3 -+---C-----A-------BBB---------+
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+   A   B +         +         +
*           !    AA  BB                   !
*        2 -+      AA +BBB      +         +
*           !        A    BBBB            !
*        3 -+---C-----A-------BBB---------+
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   AA  BB                    !
*           !     AAA BBB                 !
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   AA  BB                    !
*        2 -+-----AAA-BBB-------+---------+
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+   AA  BB+         +         +
*           !     AAA BBB                 !
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+   AA  BB+         +         +
*        2 -+-----AAA-BBB-------+---------+
*           !         !         !         !
*          10        15        20        25
.PAGE
 IGRID= 201
*           !   A   B                     !
*           !    AA  BB                   !
*           !      AA  BBB                !
*           !        A    BBBB            !
*           !   C     A       BBB         !
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   A   B                     !
*           !    AA  BB                   !
*        2 -+      AA +BBB      +         +
*           !        A    BBBB            !
*           !   C     A       BBB         !
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+---A---B-+---------+---------+
*           !    AA  BB                   !
*           !      AA  BBB                !
*           !        A    BBBB            !
*        3 -+   C     A       BBB         +
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+---A---B-+---------+---------+
*           !    AA  BB                   !
*        2 -+      AA +BBB      +         +
*           !        A    BBBB            !
*        3 -+   C     A       BBB         +
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   AA  BB                    !
*           !     AAA BBB                 !
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   AA  BB                    !
*        2 -+     AAA BBB       +         +
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+---AA--BB+---------+---------+
*           !     AAA BBB                 !
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+---AA--BB+---------+---------+
*        2 -+     AAA BBB       +         +
*           !         !         !         !
*          10        15        20        25
.PAGE
 IGRID= 301
*           !   A   B                     !
*           !    AA  BB                   !
*           !      AA  BBB                !
*           !        A    BBBB            !
*           !   C     A       BBB         !
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   A   B                     !
*           !    AA  BB                   !
*        2 -+      AA +BBB      +         +
*           !        A    BBBB            !
*           !   C     A       BBB         !
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+   A   B +         +         +
*           !    AA  BB                   !
*           !      AA  BBB                !
*           !        A    BBBB            !
*        3 -+   C     A       BBB         +
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+   A   B +         +         +
*           !    AA  BB                   !
*        2 -+      AA +BBB      +         +
*           !        A    BBBB            !
*        3 -+   C     A       BBB         +
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   AA  BB                    !
*           !     AAA BBB                 !
*           !         !         !         !
*          10        15        20        25
.SKIP
*           !   AA  BB                    !
*        2 -+     AAA BBB       +         +
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+   AA  BB+         +         +
*           !     AAA BBB                 !
*           !         !         !         !
*          10        15        20        25
.SKIP
*        1 -+   AA  BB+         +         +
*        2 -+     AAA BBB       +         +
*           !         !         !         !
*          10        15        20        25
.SUBTITLE ^^DATEAM, E\\VALUATES ^SEVERAL ^NUMBERS IN A ^SINGLE ^LINE OF ^TEXT
.PAGE
.LEFT MARGIN 0
.NOFILL
^^DDDDD         AAA  TTTTTTTT  EEEEEEEE        AAA  MM      MM
DD   DD      AAAA     TT     EE             AAAA  MMM    MMM
DD    DD    AA AA     TT     EE            AA AA  MMMM  MMMM
DD    DD   AA  AA     TT     EEEEE        AA  AA  MM MMMM MM
DD    DD  AAAAAAA     TT     EE          AAAAAAA  MM  MM  MM
DD   DD  AA    AA     TT     EE         AA    AA  MM      MM
DDDDD   AA     AA     TT     EEEEEEEE  AA     AA  MM      MM
.SKIP 2
.FILL
.CENTER
DATEAM, E\\VALUATES ^SEVERAL ^NUMBERS IN A ^SINGLE ^LINE OF ^TEXT
.CENTER
------##--------- ------- ------- -- - ------ ---- -- ----
.SKIP
^A SINGLE CALL TO ^^DATEAM \\INTERPRETS AN ARRAY READ BY THE CALLING
PROGRAM WITH A MULTIPLE OF AN ^A1 FORMAT AND RETURNS ALL OF THE
VALUES REPRESENTED IN THIS ARRAY. ^IF MORE VALUES ARE FOUND THAN CAN
BE STORED IN THE ARRAY PROVIDED FOR RETURNING THESE VALUES TO THE
CALLING PROGRAM, THEN ^^DATEAM \\CAN INDICATE THE FIRST CHARACTER OF
THE FIRST EXTRA NUMBER, OR CAN SCAN ACROSS AND POSSIBLY COUNT THE
EXCESS NUMBERS.
.SKIP
^NUMBERS CAN BE SEPARATED BY SPACES, BY TAB CHARACTERS AND/OR BY
COMMAS. ^EXCESS COMMAS ARE IGNORED AND DO NOT INDICATE EITHER
MISSING OR ZERO VALUES. ^THE EVALUATION IS TERMINATED WHEN A
SEMICOLON IS FOUND WITHIN THE CONTENTS OF THE INPUT TEXT BUFFER OR
ELSE WHEN ALL OF THE CHARACTERS WITHIN THE INPUT TEXT BUFFER HAVE
BEEN INTERPRETED. ^AN EXCLAMATION POINT AND ANY CHARACTERS TO ITS
RIGHT ARE TAKEN TO FORM A COMMENT AND ARE OTHERWISE IGNORED. ^AN
AMPERSAND AND ANY CHARACTERS TO ITS RIGHT ARE SIMILARLY IGNORED, BUT
THE CALLING PROGRAM IS INFORMED THAT AN AMPERSAND WAS FOUND SO THAT
THE CALLING PROGRAM CAN READ NEW TEXT INTO THE INPUT BUFFER BEFORE
CALLING THIS ROUTINE AGAIN TO CONTINUE THE EVALUATION.
.SKIP 2
.CENTER
^THE ^^DATEAM A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DATEAM \I\S
.SKIP
.NOFILL
      SUBROUTINE DATEAM(KONTNU,KONTRL,ITRAIL,NUMMAX,MAXBFR,
     1    IBUFFR,LOWBFR,NUMKNT,KIND  ,NUMVAL,VALNUM)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION NUMVAL(NUMMAX),VALNUM(NUMMAX),
     1IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT ONLY AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KONTNU#=#-1, \\IF MORE VALUES ARE FOUND THAN CAN BE RETURNED IN
THE ^^NUMVAL \O\R VALNUM \\ARRAY, THEN ^^KIND \\IS RETURNED
CONTAINING 5 AND ^^LOWBFR \\IS RETURNED POINTING TO THE LEFT
CHARACTER OF THE FIRST EXCESS NUMBER. ^IF ^^KONTNU \\CONTAINS -1 AND
TOO MANY VALUES ARE FOUND, THEN IT IS EXPECTED THAT THIS ROUTINE
WILL BE CALLED TO CONTINUE PROCESSING OF THE CONTENTS OF THE INPUT
TEXT BUFFER AFTER THE CALLING PROGRAM HAS PROCESSED THE VALUES
RETURNED IN THE ^^NUMVAL \O\R VALNUM \\ARRAY AND HAS RESET ^^NUMKNT.
KIND \\CANNOT BE RETURNED CONTAINING 5 IF ^^KONTNU \\IS GREATER THAN
OR EQUAL TO ZERO.
.INDENT -2
=#0, IF MORE VALUES ARE FOUND THAN CAN BE RETURNED IN THE ^^NUMVAL
\O\R VALNUM \\ARRAY, THEN THE EXCESS VALUES ARE INTERPRETED AND
^^LOWBFR \\IS RETURNED POINTING BEYOND THE FINAL NUMBER, BUT
^^NUMKNT \\IS NOT INCREMENTED FOR THESE EXCESS VALUES AND THE EXCESS
VALUES ARE NOT RETURNED TO THE CALLING PROGRAM.
.INDENT -2
=#1, IF MORE VALUES ARE FOUND THAN CAN BE RETURNED IN THE ^^NUMVAL
\O\R VALNUM \\ARRAY, THEN THE EXCESS VALUES ARE INTERPRETED,
^^LOWBFR \\IS RETURNED POINTING BEYOND THE FINAL NUMBER, AND
^^NUMKNT \\IS INCREMENTED FOR EACH VALUE FOUND, BUT THE EXCESS
VALUES ARE NOT RETURNED TO THE CALLING PROGRAM.
.SKIP
.INDENT -9
^^KONTRL#=#\\IF THE REPRESENTATION OF A NUMBER IS FOUND, ^^KONTRL
\\SPECIFIES WHETHER THE VALUE IS TO BE RETURNED IN THE INTEGER ARRAY
WHICH IS NAMED ^^NUMVAL \\OR IN THE REAL ARRAY WHICH IS NAMED
^^VALNUM. T\\HE NUMBER CAN BE TYPED WITH A DECIMAL POINT AND/OR AN
EXPONENT REGARDLESS OF THE VALUE OF ^^KONTRL.
.INDENT -2
=#-1, \\THE VALUE IS CALCULATED AS AN OCTAL INTEGER AND IS RETURNED
IN THE ^^NUMVAL \\ARRAY. ^HOWEVER, THE NUMBER FOLLOWING THE LETTER
^E OF AN EXPONENT IS EVALUATED IN DECIMAL.
.INDENT -2
=#0, THE VALUE IS CALCULATED AS A DECIMAL INTEGER AND IS RETURNED IN
THE ^^NUMVAL \\ARRAY.
.INDENT -2
=#1 OR GREATER, THE VALUE IS RETURNED IN THE ^^VALNUM \\ARRAY. ^IF
POSSIBLE, THE REAL NUMBER WILL BE ACCUMULATED AS AN INTEGER, THEN BE
CONVERTED TO REAL AND SHIFTED AS NECESSARY. ^^KONTRL \\IS THE
MAXIMUM NUMBER OF DIGITS IN THE INTEGER.
.SKIP
.INDENT -9
^^ITRAIL#=#\\SELECTS WHETHER EXPONENTS ARE TO BE RECOGNIZED. ^IF
EXPONENTS ARE NOT TO BE RECOGNIZED BUT AN EXPONENT IS FOUND, THEN
THE EVALUATION OF THE CONTENTS OF THE INPUT TEXT BUFFER WILL BE
TERMINATED PRIOR TO THE EXPONENT AND THE FIRST CHARACTER OF THE
EXPONENT WILL BE TREATED THE SAME AS ANY OTHER UNKNOWN ALPHABETIC
CHARACTER. ^WHEN SUCH AN UNKNOWN CHARACTER IS FOUND, ^^KIND \I\S
\\RETURNED CONTAINING 4 AND ^^LOWBFR \\IS RETURNED POINTING TO THE
UNKNOWN CHARACTER.
.INDENT -2
=#-1, EXPONENTS EXPRESSED IN ^E NOTATION ARE TO BE RECOGNIZED, BUT
THE PERCENT SIGN AND THE LETTERS ^K AND ^M ARE TO BE TREATED THE
SAME AS ANY OTHER ALPHABETIC CHARACTERS.
.INDENT -2
=#0, NO EXPONENTS ARE TO BE RECOGNIZED. ^THE EVALUATION WILL BE
TERMINATED PRIOR TO PERCENT SIGNS OR TO THE LETTERS ^E OR ^K OR ^M.
.INDENT -2
=#1, PERCENT SIGNS, THE LETTERS ^K AND ^M, AND EXPONENTS EXPRESSED
IN ^E NOTATION ARE ALL TO BE RECOGNIZED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^NUMMAX#=#\\HIGHEST SUBSCRIPT OF THE ^^NUMVAL \O\R VALNUM \\ARRAY
LOCATIONS INTO WHICH CAN BE PLACED THE VALUES REPRESENTED BY THE
CHARACTERS IN THE ^^IBUFFR \\ARRAY. ^THE FIRST VALUE FOUND IS
RETURNED IN ^^NUMVAL(NUMKNT+1) \O\R VALNUM(NUMKNT+1). I\\F THE
AVAILABLE PORTION OF THE ^^NUMVAL \O\R VALNUM \\ARRAY IS FULL AND IF
AN ADDITIONAL VALUE IS ENCOUNTERED, THEN ^^KIND \\IS RETURNED SET TO
5 IF ^^KONTNU \\IS -1, OR ELSE THE EVALUATION OF ADDITIONAL NUMBERS
CONTINUES UNTIL A SEMICOLON OR THE END OF LINE IS REACHED IF
^^KONTNU \\IS GREATER THAN OR EQUAL TO ZERO. ^IF ^^KONTNU \\IS INPUT
GREATER THAN ZERO, THEN ^^NUMKNT \\CAN BE RETURNED GREATER THAN
^^NUMMAX, \\AND THE VALUE OF ^^NUMKNT \\MERELY INDICATES THE MAXIMUM
SUBSCRIPT OF THE ^^NUMVAL \O\R VALNUM \\ARRAY LOCATIONS WHICH WOULD
HAVE BEEN USED IF AVAILABLE BUT NO LOCATIONS ABOVE ^^NUMVAL(NUMMAX)
\O\R VALNUM(NUMMAX) \\ARE ACTUALLY USED BY THIS ROUTINE.
.SKIP
.INDENT -9
^^MAXBFR#=#\\SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION CONTAINING
THE RIGHTMOST (HIGHEST SUBSCRIPT) CHARACTER IN THE LINE OF TEXT
BEING INTERPRETED. ^^MAXBFR \\WOULD NORMALLY BE THE DIMENSION OF THE
^^IBUFFR \\ARRAY.
.SKIP
.INDENT -9
^^IBUFFR#=#\\THE INPUT BUFFER ARRAY CONTAINING THE CHARACTERS OF THE
LINE OF TEXT TO BE INTERPRETED, ONE CHARACTER PER ARRAY LOCATION, AS
READ BY A MULTIPLE OF AN ^A1 FORMAT. ^THE TEXT TO BE INTERPRETED
BEGINS WITH ^^IBUFFR(LOWBFR) \\AND EXTENDS UP TO THE NEXT UNKNOWN
CHARACTER OR THROUGH THE NEXT SEMICOLON OR THROUGH THE END OF THE
LINE IF AN AMPERSAND OR AN EXCLAMATION POINT IS FOUND.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED BOTH FOR INPUT TO THIS ROUTINE AND
FOR OUTPUT TO THE CALLING PROGRAM.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LOWBFR#=#\\INPUT CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY
LOCATION WHICH CONTAINS THE LEFTMOST (LOWEST SUBSCRIPT) CHARACTER
WHICH IS TO BE INTERPRETED BY THIS ROUTINE. ^^LOWBFR \\IS RETURNED
POINTING TO THE LEFTMOST CHARACTER NOT YET IDENTIFIED BY THIS
ROUTINE. ^^LOWBFR \\IS RETURNED CONTAINING THE SUBSCRIPT OF THE
^^IBUFFR \\ARRAY LOCATION CONTAINING AN UNKNOWN CHARACTER (^^KIND
\\BEING RETURNED CONTAINING 4) OR CONTAINING THE CHARACTER TO THE
RIGHT OF A SEMICOLON (^^KIND \\BEING RETURNED CONTAINING 2). ^IT IS
EXPECTED THAT SOME OTHER ROUTINE WILL BE CALLED TO EVALUATE AN
UNKNOWN CHARACTER, BUT IF THIS ROUTINE IS INSTEAD CALLED TO EVALUATE
THE TEXT TO THE RIGHT OF THE UNKNOWN CHARACTER THEN THE CALLING
PROGRAM MUST FIRST INCREMENT ^^LOWBFR \\BY ONE. ^IF ^^KONTNU \I\S
\\SET TO -1 AND IF MORE VALUES ARE FOUND THAN CAN BE STORED IN THE
AVAILABLE PORTION OF THE ^^NUMVAL \O\R VALNUM \\ARRAY, THEN ^^LOWBFR
\\IS RETURNED CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY
LOCATION WHICH CONTAINS THE FIRST CHARACTER OF THE FIRST VALUE WHICH
COULD NOT BE STORED. ^IF AN AMPERSAND OR AN EXCLAMATION POINT IS
FOUND OR IF ALL CHARACTERS IN THE INPUT TEXT BUFFER HAVE BEEN
INTERPRETED, THEN ^^LOWBFR \\IS RETURNED POINTING BEYOND THE RIGHT
END OF THE BUFFER.
.SKIP
.INDENT -9
^^NUMKNT#=#\\INPUT CONTAINING THE SUBSCRIPT OF THE HIGHEST LOCATION
IN THE ^^NUMVAL \O\R VALNUM \\ARRAY WHICH IS CURRENTLY IN USE AND
WHICH MUST THEREFORE BE RETURNED UNCHANGED. ^THE FIRST VALUE FOUND
BY THIS ROUTINE WILL BE STORED IN ^^NUMVAL(NUMKNT+1) \\OR IN
^^VALNUM(NUMKNT+1). I\F KONTNU \\IS LESS THAN OR EQUAL TO ZERO, OR
IF ^^KONTNU \\IS GREATER THAN ZERO BUT NO MORE THAN ^^NUMMAX-NUMKNT
\\VALUES ARE FOUND, THEN ^^NUMKNT \\IS RETURNED CONTAINING THE
SUBSCRIPT OF THE HIGHEST LOCATION IN THE ^^NUMVAL \O\R VALNUM
\\ARRAY WHICH WAS USED BY THIS ROUTINE FOR STORAGE OF VALUES
REPRESENTED BY THE TEXT IN THE ^^IBUFFR \\ARRAY. ^IF ^^KONTNU \I\S
\\GREATER THAN ZERO, BUT MORE THAN ^^NUMMAX-NUMKNT \\VALUES ARE
FOUND, THEN THE LOCATIONS ABOVE ^^NUMVAL(NUMMAX) \O\R VALNUM(NUMMAX)
\\ARE RETURNED UNCHANGED, BUT ^^NUMKNT \\IS RETURNED INCREMENTED AS
THOUGH THESE EXCESS VALUES HAD BEEN STORED.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR OUTPUT TO THE CALLING
PROGRAM. ^THEIR INPUT VALUES ARE IGNORED. ^HOWEVER, THE PORTION OF
THE ^^NUMVAL \O\R VALNUM \\ARRAY HAVING SUBSCRIPTS LESS THAN OR
EQUAL TO THE INPUT VALUE OF ^^NUMKNT \\AND THE PORTION HAVING
SUBSCRIPTS GREATER THAN ^^NUMMAX \\ARE RETURNED UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KIND###=#\\RETURNED DESCRIBING THE REASON FOR TRANSFER OF CONTROL
BACK TO THE CALLING PROGRAM. ^^KIND \\DOES NOT INDICATE WHETHER ANY
VALUES HAVE BEEN STORED IN THE ^^NUMVAL \O\R VALNUM \\ARRAY. ^THE
CALLING PROGRAM MUST COMPARE THE RETURNED VALUE OF ^^NUMKNT
\\AGAINST ITS ORIGINAL VALUE TO DETERMINE WHETHER ANY VALUES WERE
FOUND BY THIS ROUTINE. ^IF ^^KONTNU \\IS GREATER THAN ZERO, THEN THE
RETURNED VALUE OF ^^NUMKNT \\MUST SIMILARLY BE TESTED AGAINST
^^NUMMAX \\TO DETERMINE WHETHER ANY EXCESS VALUES WERE FOUND BUT NOT
RETURNED.
.INDENT -2
=#1, ALL CHARACTERS CURRENTLY WITHIN THE ^^IBUFFR \\ARRAY HAVE BEEN
INTERPRETED. ^IF AN EXCLAMATION POINT WAS FOUND, THEN THE CHARACTERS
TO THE RIGHT OF THE EXCLAMATION POINT HAVE BEEN IGNORED AND ^^LOWBFR
\\IS RETURNED CONTAINING ^^MAXBFR+1.
.INDENT -2
=#2, \\A SEMICOLON WAS FOUND. ^^LOWBFR \\IS RETURNED POINTING TO THE
CHARACTER TO THE RIGHT OF THE SEMICOLON. ^IF SEMICOLONS ARE TO BE
CONSIDERED AS EQUIVALENT TO SPACES, THEN THE CALLING PROGRAM SHOULD
AGAIN CALL THIS ROUTINE WITHOUT FIRST CHANGING THE VALUES OF ANY OF
THE ARGUMENTS.
.INDENT -2
=#3, AN AMPERSAND WAS FOUND. ^THE CHARACTERS TO THE RIGHT OF THE
AMPERSAND HAVE BEEN IGNORED AND ^^LOWBFR \\IS RETURNED CONTAINING
^^MAXBFR+1. I\\F THE AMPERSAND INDICATES THAT TEXT REPRESENTING
ADDITIONAL VALUES IS TO BE READ BY THE CALLING PROGRAM, THEN
^^LOWBFR \\SHOULD BE RESET TO POINT TO THE START OF THE NEW TEXT
BEFORE THIS ROUTINE IS CALLED AGAIN.
.INDENT -2
=#4, AN UNKNOWN CHARACTER WAS FOUND. ^^LOWBFR \\IS RETURNED
CONTAINING THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION CONTAINING
THIS UNKNOWN CHARACTER. ^IF THE UNKNOWN CHARACTER IS TO BE
CONSIDERED AS EQUIVALENT TO A SPACE, THEN ^^LOWBFR \\MUST BE
INCREMENTED BY ONE BEFORE THIS ROUTINE IS CALLED AGAIN.
.INDENT -2
=#5, ^^KONTNU \\CONTAINS -1 AND A VALUE WAS FOUND WHICH COULD NOT BE
STORED IN THE AVAILABLE PORTION OF THE ^^NUMVAL \O\R VALNUM \\ARRAY.
^^LOWBFR \\IS RETURNED POINTING TO THE LEFTMOST CHARACTER IN THE
REPRESENTATION OF THE NUMBER. ^THE CALLING PROGRAM MUST SUPPLY
ADDITIONAL SPACE IN THE ^^NUMVAL \O\R VALNUM \\ARRAY OR ELSE MUST
RESET ^^KONTNU \\TO BE ZERO OR GREATER BEFORE AGAIN CALLING THIS
ROUTINE TO PROCESS THE REMAINING TEXT IN THE ^^IBUFFR \\ARRAY.
.SKIP
.INDENT -9
^^NUMVAL#=#\\ARRAY INTO WHICH ARE STORED THE VALUES REPRESENTED BY
THE TEXT IN THE ^^IBUFFR \\ARRAY IF ^^KONTRL \\IS LESS THAN OR EQUAL
TO ZERO. ^THE LOCATIONS STARTING WITH ^^NUMVAL(NUMKNT+1) \\AND
EXTENDING THROUGH ^^NUMVAL(NUMMAX) \\CAN BE USED FOR RETURNING
INTEGER VALUES TO THE CALLING PROGRAM. ^^NUMKNT \\IS RETURNED
POINTING TO THE HIGHEST LOCATION IN THE ^^NUMVAL \\ARRAY WHICH IS
USED TO RETURN THESE VALUES, OR, IF ^^KONTNU \\IS GREATER THAN ZERO,
WHICH WOULD BE USED IF AVAILABLE.
.SKIP
.INDENT -9
^^VALNUM#=#\\ARRAY INTO WHICH ARE STORED THE VALUES REPRESENTED BY
THE TEXT IN THE ^^IBUFFR \\ARRAY IF ^^KONTRL \\IS GREATER THAN ZERO.
^THE LOCATIONS STARTING WITH ^^VALNUM(NUMKNT+1) \\AND EXTENDING
THROUGH ^^VALNUM(NUMMAX) \\CAN BE USED FOR RETURNING REAL VALUES TO
THE CALLING PROGRAM. ^^NUMKNT \\IS RETURNED POINTING TO THE HIGHEST
LOCATION IN THE ^^VALNUM \\ARRAY WHICH IS USED TO RETURN THESE
VALUES, OR, IF ^^KONTNU \\IS GREATER THAN ZERO, WHICH WOULD BE USED
IF AVAILABLE.
.SKIP 3
.LEFT MARGIN 0
.TEST PAGE 5
.CENTER
^AN ^EXAMPLE OF THE ^USE OF ^^DATEAM
.CENTER
-- ------- -- --- --- -- ------
.SKIP
T\\HE FOLLOWING PROGRAM CALLS ^^DATEAM \\TO STORE VALUES INTO
^^NUMVAL(11) \\THROUGH ^^NUMVAL(20) \\OR INTO ^^VALNUM(11) \\THROUGH
^^VALNUM(20). T\\HE USER IS ASKED TO SUPPLY THE VALUES OF THE
ARGUMENTS ^^KONTNU, KONTRL \\AND ^^ITRAIL, \\THEN IS PROMPTED WITH
AN ASTERISK TO TYPE THE FIRST LINE OF TEXT AND WITH AN AMPERSAND FOR
EACH CONTINUATION LINE IF ANY.
.SKIP
.NOFILL
      ^^DIMENSION NUMVAL(20),VALNUM(20),IBUFFR(60)
      DATA ITTY,JTTY,NUMLOW,NUMMAX,MAXBFR/5,5,10,20,60/
    1 WRITE(ITTY,2)
    2 FORMAT(24H KONTNU,KONTRL,ITRAIL = ,$)
      READ(JTTY,3)KONTNU,KONTRL,ITRAIL
    3 FORMAT(3I)
C
C     OBTAIN NEXT LINE OF TEXT TO BE EVALUATED
      WRITE(ITTY,4)
    4 FORMAT(2H *,$)
      NUMKNT=NUMLOW
      GO TO 7
    5 WRITE(ITTY,6)
    6 FORMAT(2H _&,$)
    7 READ(JTTY,8)IBUFFR
    8 FORMAT(60A1)
      LOWBFR=1
C
C     SEARCH FOR VALUES
    9 CALL DATEAM(KONTNU,KONTRL,ITRAIL,NUMMAX,MAXBFR,
     1IBUFFR,LOWBFR,NUMKNT,KIND,NUMVAL,VALNUM)
      IFOUND=NUMKNT-NUMLOW
      GO TO(10,12,5,20,14),KIND
C
C     REPORT RESULTS
   10 WRITE(ITTY,11)IFOUND
   11 FORMAT(14H  END OF LINE,,I3,14H NUMBERS FOUND)
      GO TO 16
   12 WRITE(ITTY,13)IFOUND
   13 FORMAT(14H  SEMICOLON,  ,I3,14H NUMBERS FOUND)
      GO TO 16
   14 WRITE(ITTY,15)IFOUND
   15 FORMAT(14H  OVERFLOW,   ,I3,14H NUMBERS FOUND)
   16 IF(IFOUND.LE.0)GO TO 19
      IF(NUMKNT.GT.NUMMAX)NUMKNT=NUMMAX
      J=NUMLOW+1
      IF(KONTRL.LE.0)WRITE(ITTY,17)(NUMVAL(I),I=J,NUMKNT)
      IF(KONTRL.GT.0)WRITE(ITTY,18)(VALNUM(I),I=J,NUMKNT)
   17 FORMAT(1X,5I12)
   18 FORMAT(1X,5E12.4)
   19 IF(KIND.EQ.1)GO TO 1
      NUMKNT=NUMLOW
      GO TO 9
   20 WRITE(ITTY,21)IBUFFR(LOWBFR)
   21 FORMAT(3H  ?,1A1,1H?)
      LOWBFR=LOWBFR+1
      GO TO 9
      END
.SKIP 3
.TEST PAGE 5
T\\YPICAL ^DIALOG ^BETWEEN ^USER AND ^^DATEAM D\\EMONSTRATION ^PROGRAM
------- ------ ------- ---- --- ------ ------------- -------
.SKIP
^^KONTNU,KONTRL,ITRAIL = -1 0 1
*1K 2K 3K 4K 5K 6K 7K 8K 9K 10K 11K 12K_&MORE THAN 10 VALUES
 OVERFLOW,    10 NUMBERS FOUND
        1000        2000        3000        4000        5000
        6000        7000        8000        9000       10000
_&13K;14K 15K 16K;;!2 GROUPS OF 3 FOLLOWED BY 2 EMPTY GROUPS
 SEMICOLON,    3 NUMBERS FOUND
       11000       12000       13000
 SEMICOLON,    3 NUMBERS FOUND
       14000       15000       16000
 SEMICOLON,    0 NUMBERS FOUND
 END OF LINE,  0 NUMBERS FOUND
.SKIP
KONTNU,KONTRL,ITRAIL = 0 1 1
*1.01 2.02 3.03 4.04 5.05 6.06 7.07 8.08 9.09 10.10 11.11_&
_&12.12 13.13;1 2 3 4 5 6 7 8 9 10 11 12 13;14
 SEMICOLON,   10 NUMBERS FOUND
  0.1010E+01  0.2020E+01  0.3030E+01  0.4040E+01  0.5050E+01
  0.6060E+01  0.7070E+01  0.8080E+01  0.9090E+01  0.1010E+02
 SEMICOLON,   10 NUMBERS FOUND
  0.1000E+01  0.2000E+01  0.3000E+01  0.4000E+01  0.5000E+01
  0.6000E+01  0.7000E+01  0.8000E+01  0.9000E+01  0.1000E+02
 END OF LINE,  1 NUMBERS FOUND
  0.1400E+02
.SKIP
KONTNU,KONTRL,ITRAIL = 1 1 1
*1.01 2.02 3.03 4.04 5.05 6.06 7.07 8.08 9.09 10.10 11.11_&
_&12.12 13.13;1 2 3 4 5 6 7 8 9 10 11 12 13;14
 SEMICOLON,   13 NUMBERS FOUND
  0.1010E+01  0.2020E+01  0.3030E+01  0.4040E+01  0.5050E+01
  0.6060E+01  0.7070E+01  0.8080E+01  0.9090E+01  0.1010E+02
 SEMICOLON,   13 NUMBERS FOUND
  0.1000E+01  0.2000E+01  0.3000E+01  0.4000E+01  0.5000E+01
  0.6000E+01  0.7000E+01  0.8000E+01  0.9000E+01  0.1000E+02
 END OF LINE,  1 NUMBERS FOUND
  0.1400E+02
.SUBTITLE ^^DATEXT, FORTRAN R\\OUTINE FOR ^LARGE ^PRINTABLE ^CHARACTERS
.PAGE
.LEFT MARGIN 0
.RIGHT MARGIN 60
.NOFILL
 ^^DDDDD          AAA  TTTTTTTT  EEEEEEEE  XX    XX  TTTTTTTT
 DD   DD       AAAA     TT     EE         XX  XX      TT
 DD    DD     AA AA     TT     EE          XXXX       TT
 DD    DD    AA  AA     TT     EEEEE        XX        TT
 DD    DD   AAAAAAA     TT     EE          XXXX       TT
 DD   DD   AA    AA     TT     EE         XX  XX      TT
 DDDDD    AA     AA     TT     EEEEEEEE  XX    XX     TT
.FILL
.SKIP 2
.CENTER
DATEXT, FORTRAN R\\OUTINE FOR ^LARGE ^PRINTABLE ^CHARACTERS
.CENTER
------##------- ------- --- ----- --------- ----------
.SKIP
^^DATEXT \\IS A ^^FORTRAN \\SUBROUTINE WHICH ENABLES THE CALLING
PROGRAM TO PRINT LARGE MULTIPLE LINE LETTERING SIMILAR TO THAT USED
FOR THE ABOVE TITLE. ^THE USER'S PROGRAM CALLS ^^DATEXT \\ONCE FOR
EACH LINE, SPECIFYING THE CHARACTERS TO BE REPRESENTED, AND
SUPPLYING A BUFFER ARRAY TO BE DEFINED BY ^^DATEXT \\WHICH CAN THEN
BE PRINTED BY THE CALLING PROGRAM WITH A ^^FORTRAN FORMAT
\\STATEMENT CONTAINING A MULTIPLE OF AN ALPHAMERIC ^A1 FIELD. ^THE
SPACING BETWEEN LETTERS CAN BE ADJUSTED TO EQUALIZE WHITE SPACE.
.SKIP
^^DATEXT \\LETTERS ACROSS THE WIDTH OF A PAGE. ^EACH CALL TO
^^DATEXT \\GENERATES A PORTION OF ALL OF THE CHARACTERS TO BE
REPRESENTED. ^^DATEXT \\RETURNS THE LINE HEIGHT OF THE LOADED FONT,
SO THE CALLING PROGRAM CAN DETERMINE HOW MANY TIMES ^^DATEXT \\MUST
BE CALLED. ^A SECOND VERSION OF THE ROUTINE, NAMED ^^DATURN, \I\S
\\ALSO SUPPLIED WHICH TURNS THE LETTERING 90 DEGREES, LETTERING FROM
THE TOP TO THE BOTTOM OF THE PAGE, AND ONTO SUBSEQUENT PAGES. ^EACH
CALL TO ^^DATURN \\CONSTRUCTS A SMALL PORTION OF A SINGLE CHARACTER.
^^DATURN \\SIGNALS THE CALLING PROGRAM WHEN THE FINAL CHARACTER HAS
BEEN COMPLETELY REPRESENTED. ^SINCE NEITHER ROUTINE HAS A ARGUMENT
LIST WHICH IS A SUBSET OF THE OTHER, THE DIFFERENCES IN THE ^^DATURN
\\ARGUMENT LIST ARE DESCRIBED AFTER THE ^^DATEXT \\DESCRIPTION.
.SKIP
^THESE ROUTINES MUST BE USED WITH A FONT CREATED BY THE PROGRAM
^^DAFONT. DAFONT \\CAN PRODUCE THE FONTS EITHER AS ^^SUBROUTINE\S
\\OR AS ^^BLOCK DATA \\ROUTINES. ^THE ^^SUBROUTINE \\FORMS OF THE
FONTS ARE SUPPLIED BUT CAN EASILY BE CONVERTED TO ^^BLOCK DATA
\\ROUTINES IF NECESSARY. ^THE FONT ^^SUBROUTINE\\S HAVE NAMES SUCH
AS ^^TEXT1 \\AND ^^TEXT2 \\AND WERE PRODUCED WHEN ^^DAFONT
\\PROCESSED THE DATA FILES WITH NAMES SUCH AS ^^TEXT1.DAT \\AND
^^TEXT2.DAT. T\\HESE DATA FILES ARE EASILY MODIFIED BY THE USER TO
DEFINE NEW CHARACTER SHAPES OR TO CHANGE THE SHAPES CURRENTLY
AVAILABLE.
.SKIP
^ONLY 1 OF THE FONTS SHOULD BE CALLED FROM THE USER'S PROGRAM SINCE
IT IS THE PRESENCE IN THE USER'S PROGRAM OF A CALL TO THE FONT
^^SUBROUTINE \\TO FORCE THE LOADING OF THE ^^SUBROUTINE \\WHICH IS
IMPORTANT, NOT THE EXECUTION OF THE CALL. ^IF THE FONT IS LOADED AS
A SEPARATE FILE, RATHER THAN IN LIBRARY SEARCH MODE, THEN IT NEED
NOT BE CALLED.
.SKIP
^A DOLLAR SIGN APPEARING IN THE TEXT TO BE REPRESENTED IS TAKEN TO
BE A CONTROL CHARACTER AND IS NOT ITSELF REPRESENTED IN THE OUTPUT.
^IF THE CHARACTER FOLLOWING THE INITIAL DOLLAR SIGN IS ALSO A DOLLAR
SIGN, THEN A SINGLE DOLLAR SIGN IS REPRESENTED. ^A SECOND CHARACTER
OTHER THAN A DOLLAR SIGN SELECTS SOME OPTION AND NEITHER CHARACTER
IS REPRESENTED. ^IF THE FONT CONTAINS MULTIPLE SHAPE SPECIFICATIONS
FOR SOME OR ALL CHARACTERS, THEN A DOLLAR SIGN FOLLOWED BY A DIGIT
CAUSES THE SUBSEQUENT CHARACTERS TO BE REPRESENTED BY THE SHAPE
SELECTED BY THE DIGIT. ^IF _$2 APPEARS IN THE TEXT BEING
REPRESENTED, THEN THE SUBSEQUENT CHARACTERS WOULD BE REPRESENTED BY
THE SECOND SPECIFICATIONS OF THEIR SHAPES. ^IF THE DIGIT FOLLOWING
THE DOLLAR SIGN SELECTS A NUMBER GREATER THAN THE NUMBER OF SHAPES
FOR A PARTICULAR CHARACTER, THEN THE LAST (HIGHEST VALUED) SHAPE FOR
THAT CHARACTER IS USED. ^EITHER $1 OR $= SELECTS THE FIRST SHAPE OF
EACH OF THE SUBSEQUENT CHARACTERS. $= ALSO REMOVES ANY OTHER
MODIFICATIONS OF THE LETTERING WHICH MIGHT HAVE BEEN SELECTED BY
PREVIOUS $-CHARACTER PAIRS. ^SEVERAL $-LETTER PAIRS ARE RECOGNIZED
AND ARE LISTED BELOW. ^IF A LEADING DOLLAR SIGN IS FOLLOWED BY ANY
CHARACTER OTHER THAN THOSE WHICH ARE LISTED HERE, THEN BOTH THE
DOLLAR SIGN AND THE FOLLOWING CHARACTER ARE IGNORED.
.SKIP
.LEFT MARGIN 0
$^H AND $^V ARE USED TO REFLECT AND INVERT THE CHARACTER
REPRESENTATIONS. ^THE LETTERING CAN BE READ FROM THE OTHER SIDE OF
THE PAPER IF THE SENTENCE IS SPELLED BACKWARDS AND IF BOTH $^H AND
$^V ARE APPLIED.
.SKIP
.LEFT MARGIN 6
.INDENT -4
$^H##(^HORIZONTAL REFLECTION) REFLECTS THE SUBSEQUENT CHARACTER
REPRESENTATIONS HORIZONTALLY SO THAT THE NORMAL LEFT EDGE IS AT THE
RIGHT. ^IF $^H IS ALREADY IN EFFECT, THEN A SECOND $^H IS IGNORED.
^A SUBSEQUENT $= WOULD RETURN THE CHARACTER REPRESENTATION TO NORMAL.
.SKIP
.INDENT -4
$^V##(^VERTICAL INVERSION) INVERTS THE SUBSEQUENT CHARACTER
REPRESENTATIONS VERTICALLY SO THAT THE NORMAL LOWER EDGE IS AT THE
TOP. ^IF $^V IS ALREADY IN EFFECT, THEN A SECOND $^V IS IGNORED. ^A
SUBSEQUENT $= WOULD RETURN THE CHARACTER REPRESENTATION TO NORMAL.
.LEFT MARGIN 0
.SKIP
$^A AND $^F SPECIFY WHETHER THE DISTANCE BETWEEN ADJACENT CHARACTER
REPRESENTATIONS IS TO BE KEPT CONSTANT OR WHETHER THE DISTANCE
BETWEEN CHARACTER REPRESENTATIONS IS TO BE ADJUSTED TO APPROXIMATELY
EQUALIZE WHITE SPACE.
.SKIP
.LEFT MARGIN 6
.INDENT -4
$^A##(^ADJUST), PROVIDED THAT THE ARGUMENT NAMED ^^MOVE \\EITHER
SELECTS THAT THE DISTANCE BETWEEN ADJACENT CHARACTER REPRESENTATIONS
IS TO BE KEPT CONSTANT (^^MOVE=0) \\OR ELSE SELECTS THAT THE
DISTANCE BETWEEN CHARACTER REPRESENTATIONS IS TO BE ADJUSTED TO
APPROXIMATELY EQUALIZE WHITE SPACE (^^MOVE=1), \\THEN THE DISTANCES
TO THE NEXT CHARACTER REPRESENTATION AND BETWEEN SUBSEQUENT
CHARACTER REPRESENTATIONS ARE TO BE ADJUSTED TO INCLUDE
APPROXIMATELY EQUAL WHITE SPACE BETWEEN THE CHARACTERS. ^A
SUBSEQUENT $^F, OR A SUBSEQUENT $= IF ^^MOVE \\HAS THE VALUE 0, WILL
CAUSE THE DISTANCES BETWEEN ADJACENT CHARACTER REPRESENTATIONS TO BE
KEPT CONSTANT. ^IF ^^MOVE \\HAS THE VALUE 1, THEN THE INCLUSION OF
THE $^A IN THE TEXT BEING REPRESENTED IS NOT NECESSARY UNLESS A $^F
HAS BEEN ENCOUNTERED. ^IF ^^MOVE \\IS LESS THAN ZERO, SELECTING THAT
NARROW CHARACTERS ARE CENTERED IN A WIDER FIELD, THEN BOTH $^A AND
$^F ARE IGNORED.
.SKIP
.INDENT -4
$^F##(^FIXED), PROVIDED THAT THE ARGUMENT NAMED ^^MOVE \\EITHER
SELECTS THAT THE DISTANCE BETWEEN ADJACENT CHARACTER REPRESENTATIONS
IS TO BE KEPT CONSTANT (^^MOVE=0) \\OR ELSE SELECTS THAT THE
DISTANCE BETWEEN CHARACTER REPRESENTATIONS IS TO BE ADJUSTED TO
APPROXIMATELY EQUALIZE WHITE SPACE (^^MOVE=1), \\THEN THE DISTANCES
TO THE NEXT CHARACTER REPRESENTATION AND BETWEEN SUBSEQUENT
CHARACTER REPRESENTATIONS ARE TO BE KEPT CONSTANT. ^A SUBSEQUENT
$^A, OR A SUBSEQUENT $= IF ^^MOVE \\HAS THE VALUE 1, WILL CAUSE THE
DISTANCES BETWEEN ADJACENT CHARACTER REPRESENTATIONS TO BE ADJUSTED
TO APPROXIMATELY EQUALIZE WHITE SPACE. ^IF ^^MOVE \\HAS THE VALUE 0,
THEN THE INCLUSION OF THE $^F IN THE TEXT BEING REPRESENTED IS NOT
NECESSARY UNLESS A $^A HAS BEEN ENCOUNTERED. ^IF ^^MOVE \\IS LESS
THAN ZERO, SELECTING THAT NARROW CHARACTERS ARE CENTERED IN A WIDER
FIELD, THEN BOTH $^A AND $^F ARE IGNORED.
.SKIP
.LEFT MARGIN 0
$^N AND $^W MODIFY THE NUMBER OF EMPTY COLUMNS (OR LINES FOR ROUTINE
^^DATURN) \\USED TO REPRESENT SPACE CHARACTERS.
.LEFT MARGIN 6
.SKIP
.INDENT -4
$^N##(^NARROW), SPACE CHARACTERS ARE TO BE REPRESENTED BY HALF OF
THE USUAL NUMBER OF EMPTY COLUMNS (OR LINES FOR ROUTINE ^^DATURN)
\\WHETHER OR NOT A PRECEDING $^W HAS BEEN ENCOUNTERED. ^IF THE
ARGUMENT NAMED ^^MOVE \\HAS THE VALUE -2, THEN THE WIDTH OF SPACES
IS TO BE HALF OF THE WIDTH OF THE WIDEST PRINTING CHARACTER IN THE
FONT. ^IF THE ARGUMENT NAMED ^^MOVE \\HAS A VALUE GREATER THAN -2,
THEN THE WIDTH OF SPACES IS TO BE HALF OF THE MOST COMMON WIDTH OF
PRINTING CHARACTERS IN THE FONT. ^A SUBSEQUENT $= WOULD CAUSE
SUBSEQUENT SPACES TO HAVE THEIR NORMAL WIDTH. ^A SUBSEQUENT $^W
WOULD CAUSE SUBSEQUENT SPACES TO HAVE ONE AND ONE HALF TIMES THEIR
NORMAL WIDTH WHETHER OR NOT A PRECEDING $^N HAS BEEN ENCOUNTERED.
.SKIP
.INDENT -4
$^W##(^WIDE), SPACE CHARACTERS ARE TO BE REPRESENTED BY ONE AND ONE
HALF TIMES THE USUAL NUMBER OF EMPTY COLUMNS (OR LINES FOR ROUTINE
^^DATURN) \\WHETHER OR NOT A PRECEDING $^N HAS BEEN ENCOUNTERED. ^IF
THE ARGUMENT NAMED ^^MOVE \\HAS THE VALUE -2, THEN THE WIDTH OF
SPACES IS TO BE ONE AND ONE HALF TIMES THE WIDTH OF THE WIDEST
PRINTING CHARACTER IN THE FONT. ^IF THE ARGUMENT NAMED ^^MOVE \\HAS
A VALUE GREATER THAN -2, THEN THE WIDTH OF SPACES IS TO BE ONE AND
ONE HALF TIMES THE MOST COMMON WIDTH OF PRINTING CHARACTERS IN THE
FONT. ^A SUBSEQUENT $= WOULD CAUSE SUBSEQUENT SPACES TO HAVE THEIR
NORMAL WIDTH. ^A SUBSEQUENT $^N WOULD CAUSE SUBSEQUENT SPACES TO
HAVE HALF OF THEIR NORMAL WIDTH WHETHER OR NOT A PRECEDING $^W HAS
BEEN ENCOUNTERED.
.LEFT MARGIN 0
.SKIP
$^L, $^U AND $^E CONTROL THE AUTOMATIC CAPITALIZATION OF THE INITIAL
LETTERS OF WORDS.
.SKIP
.LEFT MARGIN 6
.INDENT -4
$^L##(^LOWER CASE), IF THE FONT DESCRIBES MORE THAN A SINGLE SHAPE
FOR ANY CHARACTER, THEN FOR EACH CHARACTER THE PAIR OF SHAPES
IDENTIFIED BY CONSECUTIVE ODD AND EVEN NUMBERS, COUNTING THE FIRST
SHAPE SPECIFIED FOR THE CHARACTER AS SHAPE NUMBER ONE, IS TO BE
TAKEN AS THE PAIR OF THE UPPER AND LOWER (OR LOWER AND UPPER) CASE
SHAPES OF THE CHARACTER. ^PROVIDING THAN A $^U OR $^L HAS NOT
ALREADY BEEN ENCOUNTERED IN THE TEXT BEING REPRESENTED, ANY PRINTING
CHARACTER WHICH FOLLOWS A SPACE OR SPACES BUT WHICH IS NOT ITSELF A
MEMBER OF A $-CHARACTER COMMAND PAIR IS TO BE REPRESENTED BY THE
SHAPE (UPPER CASE) WHICH WOULD HAVE BEEN SELECTED FOR THAT CHARACTER
IF THE $^L HAD NOT BEEN FOUND, AND ALL OTHER CHARACTERS ARE TO BE
REPRESENTED BY THE OTHER SHAPE (LOWER CASE) OF THE ODD-EVEN PAIR OF
SHAPES. ^IF THE $^L IS WITHIN THE RANGE OF A $^U OR OF ANOTHER $^L,
THEN THE NEXT CHARACTER WHICH IS NOT ITSELF A MEMBER OF A
$-CHARACTER COMMAND PAIR IS TO BE REPRESENTED BY ITS LOWER CASE
SHAPE WHETHER OR NOT IT WOULD HAVE OTHERWISE BEEN REPRESENTED BY ITS
UPPER CASE SHAPE. ^THE RANGE OF THE $^L IS TERMINATED IF EITHER A
$^E, OR A $= OR A $ FOLLOWED BY A NON-ZERO DIGIT IS FOUND.
.SKIP
^FOR EXAMPLE, IF THE TEXT BEING REPRESENTED CONTAINS
.SKIP
.INDENT 5
$3^^A$LN EXAMPLE $LOF ITS USE
.SKIP
\\AND IF THE FONT CONTAINS 4 SHAPES FOR EACH OF THE ALPHABETIC
LETTERS (THIS WOULD REQUIRE INCREASING THE SIZES OF SOME OF THE
ARRAYS IN ^^DAFONT, DATEXT \\AND ^^DATURN), \\THEN THE FIRST LETTERS
OF THE WORDS ^AN, ^EXAMPLE, ^ITS AND ^USE WOULD BE REPRESENTED BY
THEIR THIRD SHAPES IN THE FONT AND ALL OTHER LETTERS WOULD BE
REPRESENTED BY THEIR FOURTH SHAPES IN THE FONT.
.SKIP
.INDENT -4
$^U##(^UPPER CASE), IF THE FONT DESCRIBES MORE THAN A SINGLE SHAPE
FOR ANY CHARACTER, THEN FOR EACH CHARACTER THE PAIR OF SHAPES
IDENTIFIED BY CONSECUTIVE ODD AND EVEN NUMBERS, COUNTING THE FIRST
SHAPE SPECIFIED FOR THE CHARACTER AS SHAPE NUMBER ONE, IS TO BE
TAKEN AS THE PAIR OF THE UPPER AND LOWER (OR LOWER AND UPPER) CASE
SHAPES OF THE CHARACTER. ^PROVIDING THAN A $^U OR $^L HAS NOT
ALREADY BEEN ENCOUNTERED IN THE TEXT BEING REPRESENTED, THE NEXT
PRINTING CHARACTER WHICH IS NOT ITSELF A MEMBER OF A $-CHARACTER
COMMAND PAIR AND ANY PRINTING CHARACTER WHICH FOLLOWS A SPACE OR
SPACES BUT IS NOT ITSELF A MEMBER OF A $-CHARACTER COMMAND PAIR IS
TO BE REPRESENTED BY THE SHAPE (UPPER CASE) WHICH WOULD HAVE BEEN
SELECTED FOR THAT CHARACTER IF THE $^U HAD NOT BEEN FOUND, AND ALL
OTHER CHARACTERS ARE TO BE REPRESENTED BY THE OTHER SHAPE (LOWER
CASE) OF THE ODD-EVEN PAIR OF SHAPES. ^IF THE $^U IS WITHIN THE
RANGE OF A $^L OR OF ANOTHER $^U, THEN THE NEXT CHARACTER WHICH IS
NOT ITSELF A MEMBER OF A $-CHARACTER COMMAND PAIR IS TO BE
REPRESENTED BY ITS UPPER CASE SHAPE WHETHER OR NOT IT WOULD HAVE
OTHERWISE BEEN REPRESENTED BY ITS LOWER CASE SHAPE. ^THE RANGE OF
THE $^U IS TERMINATED IF EITHER A $^E, OR A $= OR A $ FOLLOWED BY A
NON-ZERO DIGIT IS FOUND.
.SKIP
^FOR EXAMPLE, IF THE TEXT BEING REPRESENTED CONTAINS
.SKIP
.INDENT 5
$4$^^UTHE F$UA$US$UP PACKAGE
.SKIP
\\AND IF THE FONT CONTAINS 4 SHAPES FOR EACH OF THE ALPHABETIC
LETTERS, THEN THE NAME ^^FASP \\AND THE FIRST LETTERS OF THE WORDS
^THE AND ^PACKAGE WOULD BE REPRESENTED BY THEIR FOURTH SHAPES IN THE
FONT AND ALL OTHER LETTERS WOULD BE REPRESENTED BY THEIR THIRD
SHAPES IN THE FONT.
.SKIP
.INDENT -4
$^E##(^END CASE), TERMINATES THE RANGE OF A $^L OR $^U. ^SUBSEQUENT
CHARACTERS FOR WHICH THE FONT DESCRIBES SEVERAL SHAPES WILL BE
REPRESENTED BY THE SAME SHAPES AS WOULD HAVE BEEN SELECTED BEFORE
THE $^L OR $^U WAS ENCOUNTERED. ^THE $^E CAN ALSO BE USED TO
CAPITALIZE A COMPLETE WORD. ^THE $^E IS IGNORED IF NEITHER A $^L NOR
$^U IS IN EFFECT.
.SKIP
^FOR EXAMPLE, THE PRECEDING EXAMPLE COULD BE REWRITTEN
.SKIP
.INDENT 5
$4$^^UTHE $EFASP $UPACKAGE
.LEFT MARGIN 0
.SKIP 2
.CENTER
THE DATEXT A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DATEXT \I\S
.SKIP
.NOFILL
      SUBROUTINE DATEXT(LINE  ,JSTIFY,IFILL ,INTRVL,MOVE  ,
     1    ISPACE,LTTR  ,LTRBGN,LTREND,LFTCOL,IWIDTH,MAXBFR,
     2    IBUFFR,MAXUSD,MAXLIN,LTRNXT)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION LTTR(LTREND),IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT ONLY, AND ARE RETURNED
UNCHANGED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^LINE###=#\\THE LINE WITHIN THE LETTER REPRESENTATION WHICH IS TO
BE PLACED INTO THE ^^IBUFFR \\ARRAY. ^LINE NUMBER 1 IS THE TOP LINE
OF THE REPRESENTATION OF THE CHARACTERS. ^CHARACTERS ARE A TOTAL OF
^^MAXLIN (\\AN ARGUMENT RETURNED BY EACH CALL TO THIS ROUTINE) LINES
HIGH. ^TO PRINT A LETTER OR LETTERS, IT IS NECESSARY TO CALL
^^DATEXT MAXLIN \\TIMES WITH ^^LINE \\BEING ASSIGNED THE VALUES 1
THROUGH ^^MAXLIN, \\WITH THE CALLING PROGRAM PRINTING THE ^^IBUFFR
\\ARRAY AFTER EACH RETURN FROM ^^DATEXT. T\\HIS ALLOWS THE INSERTION
OF THE CONSTRUCTED LETTERS INTO OTHER TEXT OR OTHER FORMS.
.INDENT -2
=#0, PLACE THE HIGHEST VALUED LINE (THAT CONTAINING THE BOTTOM LINE
OF EACH CHARACTER) INTO THE ^^IBUFFR \\ARRAY. ^THE CALLING PROGRAM
SHOULD SET THE VALUE OF ^^LINE \\TO ONE LESS THAN THE RETURNED VALUE
OF ^^MAXLIN \\PRIOR TO THE SUBSEQUENT CALL TO THIS ROUTINE.
.SKIP
.LEFT MARGIN 0
.RIGHT MARGIN 60
^THE MANNER IN WHICH LINE NUMBERS ARE USED IS ILLUSTRATED BY THE
FOLLOWING PROGRAM WHICH GENERATED THE LARGE LETTERS USED AS THE
TITLE AT THE BEGINNING OF THE DOCUMENTATION OF THIS ROUTINE.
.SKIP
.NOFILL
.TEST PAGE 5
      ^^DIMENSION LTTR(6),IBUFFR(60)
      DATA LTTR/1HD,1HA,1HT,1HE,1HX,1HT/
      CALL TEXT4
      LINE=0
    1 LINE=LINE+1
C
C     JSTIFY = 0  (CENTER LETTER REPRESENTATIONS IN IWIDTH)
C     IFILL  = 0  (DON'T FILL OUT END WITH SPACES)
C     INTRVL = 2  (SPACING BETWEEN LETTER REPRESENTATIONS)
C     MOVE   = 1  (ADJUST FOR EQUAL WHITE SPACES)
C     ISPACE = 0  (REPRESENT INTIAL SPACES IF ANY)
C     LTRBGN = 1  (FIRST LETTER TO REPRESENT IS LTTR(1))
C     LTREND = 6  (FINAL LETTER TO REPRESENT IS LTTR(6))
C     LFTCOL = 0  (START REPRESENTATION IN IBUFFR(1))
C     IWIDTH = 60 (WIDTH OF FIELD WHICH CAN USE)
C     MAXBFR = 60 (DIMENSION OF IBUFFR ARRAY)
C
      CALL DATEXT(LINE,0,0,2,1,
     1    0,LTTR,1,6,0,60,60,
     1IBUFFR,MAXUSD,MAXLIN,LTRNXT)
      IF(MAXUSD.LE.0)GO TO 3
      WRITE(1,2)(IBUFFR(I),I=1,MAXUSD)
    2 FORMAT(100A1)
      IF(LINE.LT.MAXLIN)GO TO 1
    3 STOP
      END
.FILL
.LEFT MARGIN 9
.SKIP
.INDENT -9
JSTIFY#=#-1, \\LEFT JUSTIFY THE LETTER REPRESENTATIONS IN A FIELD OF
WIDTH ^^IWIDTH.
.INDENT -2
=#0, \\CENTER THE LETTER REPRESENTATIONS IN A FIELD OF WIDTH ^^IWIDTH.
.INDENT -2
=#1, \\RIGHT JUSTIFY THE LETTER REPRESENTATIONS IN A FIELD OF WIDTH
^^IWIDTH.
.SKIP
.INDENT -9
IFILL##=#0, \\IF LEFT JUSTIFYING OR CENTERING THE LETTER
REPRESENTATIONS, DO NOT FILL THE UNUSED PORTION OF THE FIELD RIGHT
OF THE LETTER REPRESENTATIONS WITH SPACES. ^^MAXUSD \\WILL BE
RETURNED POINTING TO THE RIGHT END OF THE RIGHTMOST LETTER
REPRESENTATION.
.INDENT -2
=#1, IF LEFT JUSTIFYING OR CENTERING THE LETTER REPRESENTATIONS, DO
FILL THE UNUSED PORTION OF THE FIELD RIGHT OF THE LETTER
REPRESENTATIONS WITH SPACES. ^^MAXUSD \\WILL BE RETURNED CONTAINING
^^LFTCOL+IWIDTH \O\R MAXBFR, \\WHICHEVER IS THE SMALLER.
.SKIP
.INDENT -9
^^INTRVL#=#\\THE NUMBER OF SPACE (BLANK) CHARACTERS TO BE INSERTED
BETWEEN REPRESENTED CHARACTERS. ^IF ^^MOVE \\IS GIVEN THE VALUE 1 TO
SELECT WHITE SPACE ADJUSTMENT, THEN ^^INTRVL \\IS THE APPARENT
DISTANCE BETWEEN THE PROFILES OF ADJACENT CHARACTERS.
.SKIP
.INDENT -9
^^MOVE###=#-2, \\CHARACTERS WHICH ARE NARROWER THAN THE WIDEST
CHARACTER ARE CENTERED WITHIN THE WIDTH OF THE WIDEST CHARACTER.
^THE WIDTH OF SPACES IS ALSO THE WIDTH OF THE WIDEST CHARACTER. ^NO
WHITE SPACE ADJUSTMENT OF POSITIONS IS TO BE MADE. ^IF ^^MOVE \I\S
\\EITHER -2 OR -1 AND IF A CHARACTER IS NARROW, THEN THE LEADING AND
TRAILING PORTIONS OF THE WIDTH IN WHICH THE CHARACTER IS CENTERED
WILL BE FILLED WITH SPACES REGARDLESS OF THE VALUE OF ^^IFILL \O\R
\O\F ISPACE.
.INDENT -2
=#-1, \\CHARACTERS WHICH ARE NARROWER THAN MOST COMMON WIDTH WILL BE
CENTERED WITHIN THE MOST COMMON WIDTH. ^NO WHITE SPACE ADJUSTMENT OF
POSITIONS IS TO BE MADE. ^IF ^^MOVE \\IS -1 OR GREATER, THEN THE
MOST COMMON CHARACTER WIDTH IS ALWAYS USED AS THE WIDTH OF THE
REPRESENTATION OF THE SPACE CHARACTER.
.INDENT -2
=#0, NORMAL INTER-CHARACTER SPACING IS ACCEPTABLE WITHOUT WHITE
SPACE ADJUSTMENT.
.INDENT -2
=#1, ADJUST SPACE BETWEEN CHARACTERS TO EQUALIZE WHITE SPACES.
.SKIP
.INDENT -9
^^ISPACE#=#-1, \\REPRESENT BOTH INITIAL AND FINAL SPACES WHICH
APPEAR IN THE ^^LTTR \\ARRAY.
.INDENT -2
=#0, REPRESENT INITIAL SPACES WHICH APPEAR IN ^^LTTR \\ARRAY.
^SUPPRESS FINAL SPACES WHICH APPEAR IN ^^LTTR \\ARRAY.
.INDENT -2
=#1, SUPPRESS BOTH INITIAL AND FINAL SPACES WHICH APPEAR IN ^^LTTR
\\ARRAY.
.SKIP
.INDENT -9
^^LTTR###=#\\ARRAY CONTAINING THE LETTERS TO BE REPRESENTED, 1
LETTER PER WORD, AS READ BY MULTIPLE OF AN ^A1 FORMAT. ^SINCE THE
LETTERING PRODUCED BY THIS ROUTINE IS LARGE, RIGHTMOST SPACES ARE
IGNORED UNLESS ^^ISPACE=-1. N\\OTE THAT ^^MAXUSD \\IS RETURNED EQUAL
TO ^^LFTCOL \I\F LTTR \\CONTAINS ONLY SPACES, AND ^^ISPACE \I\S
\\GREATER THAN OR EQUAL TO ZERO, AND ^^IFILL \\IS EQUAL TO ZERO.
.SKIP
.INDENT -9
^^LTRBGN#=#\\SUBSCRIPT OF THE ^^LTTR \\ARRAY LOCATION CONTAINING THE
FIRST CHARACTER WHICH IS TO BE REPRESENTED.
.SKIP
.INDENT -9
^^LTREND#=#\\SUBSCRIPT OF THE ^^LTTR \\ARRAY LOCATION CONTAINING THE
FINAL CHARACTER WHICH IS TO BE REPRESENTED.
.SKIP
.INDENT -9
^^LFTCOL#=#\\THE SUBSCRIPT OF THE ^^IBUFFR \\ARRAY LOCATION TO THE
IMMEDIATE LEFT OF THE FIELD IN WHICH THE CHARACTERS ARE TO BE
REPRESENTED.
.SKIP
.INDENT -9
^^IWIDTH#=#\\THE WIDTH OF THE FIELD INTO WHICH THE LETTER
REPRESENTATIONS CAN BE PLACED. ^THE MAXIMUM VALUE WITH WHICH
^^MAXUSD \\CAN THEN BE RETURNED IS ^^LFTCOL+IWIDTH \O\R MAXBFR,
\\WHICHEVER IS THE SMALLER.
.SKIP
.INDENT -9
^^MAXBFR#=#\\THE DIMENSION OF THE ^^IBUFFR \\ARRAY INTO WHICH THE
REPRESENTATION IS PLACED. ^IF ^^LFTCOL+IWIDTH \\IS GREATER THAN
^^MAXBFR, \\THEN THE EFFECTIVE VALUE OF ^^IWIDTH \\IS REDUCED TO
^^MAXBFR-LFTCOL.
.LEFT MARGIN 0
.SKIP
T\\HE FOLLOWING ARGUMENTS ARE USED ONLY FOR OUTPUT. ^THEIR INPUT
VALUES (WITH THE EXCEPTION OF THE PORTIONS OF THE ^^IBUFFR \\ARRAY
WHICH ARE NOT NEEDED AND SO ARE RETURNED UNCHANGED) ARE IGNORED AND
DESTROYED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^IBUFFR#=#\\THE ARRAY INTO WHICH ARE TO BE PLACED THE
REPRESENTATIONS OF THE LETTERS IN THE ^^LTTR \\ARRAY.
.SKIP
.INDENT -9
^^MAXUSD#=#\\RETURNED BY ^^DATEXT \\CONTAINING THE SUBSCRIPT OF THE
^^IBUFFR \\ARRAY LOCATION CONTAINING THE RIGHTMOST CHARACTER OF THE
REPRESENTATION. ^IF NOTHING HAS BEEN PLACED INTO ^^IBUFFR \\BY THE
CURRENT CALL TO THIS ROUTINE, THEN ^^MAXUSD \\IS RETURNED SET EQUAL
TO THE VALUE OF ^^LFTCOL.
.SKIP
.INDENT -9
MAXLIN#=#\\RETURNED CONTAINING THE MAXIMUM VALUE WHICH THE LINE
COUNT ^^LINE \\CAN ATTAIN. ^THIS WILL DEPEND ON WHICH FONT HAS BEEN
LOADED. ^^MAXLIN \\IS RETURNED CONTAINING ZERO IF A FONT HAS NOT
BEEN LOADED.
.SKIP
.INDENT -9
^^LTRNXT#=#\\RETURNED CONTAINING THE SUBSCRIPT WITHIN THE ^^LTTR
\\ARRAY OF THE FIRST LETTER WHICH WAS NOT REPRESENTED. ^IF ALL
LETTERS REQUESTED WERE REPRESENTED, THEN ^^LTRNXT \\WILL BE RETURNED
EQUAL TO ^^LTREND+1. I\F IWIDTH \\IS TOO SMALL FOR ALL OF THE
LETTERS TO BE REPRESENTED, THEN ^^LTRNXT \\WILL POINT TO THE FIRST
LETTER WHICH WOULD NOT FIT.
.PAGE
.LEFT MARGIN 0
.FILL
^THE LETTERING SAMPLES SHOWN BELOW DEMONSTRATE WHITE SPACE
ADJUSTMENT. ^THE PRINTING CHARACTERS WHICH REPRESENT THE SHAPES OF
THE LETTERS IN THE WORD "^^FAULT" \\HAVE BEEN CHANGED TO SPACES.
^THE SPACES AROUND THE LETTER SHAPES HAVE BEEN CHANGED TO PLUS SIGNS
WHERE DUE TO THE NORMAL SHAPE OF THE LETTERS OR TO ^X'S WHERE ADDED
TO OBTAIN THE DESIRED SPACING.
.SKIP
.NOFILL
INTERCHARACTER SPACING 1 WITH WHITE SPACE ADJUSTMENT
.SKIP
++++++++++++++++++^X++++++++^X+++++++++++++++++
+        ++++++   ^X  ++++  ^X  ++++++        +
+  +++++++++++    ^X  ++++  ^X  +++++++++  ++++
+  ++++++++++  +  ^X  ++++  ^X  +++++++++  ++++
+     ++++++  ++  ^X  ++++  ^X  +++++++++  ++++
+  ++++++++       ^X  ++++  ^X  +++++++++  ++++
+  +++++++  ++++  ^X+  ++  +^X  +++++++++  ++++
+  ++++++  +++++  ^X++    ++^X        +++  ++++
++++++++++++++++++^X++++++++^X+++++++++++++++++
.SKIP
INTERCHARACTER SPACING 2 WITH WHITE SPACE ADJUSTMENT
.SKIP
++++++++++++++++++^^XX++++++++XX+++++++++++++++++
+        ++++++   XX  ++++  XX  ++++++        +
+  +++++++++++    XX  ++++  XX  +++++++++  ++++
+  ++++++++++  +  XX  ++++  XX  +++++++++  ++++
+     ++++++  ++  XX  ++++  XX  +++++++++  ++++
+  ++++++++       XX  ++++  XX  +++++++++  ++++
+  +++++++  ++++  XX+  ++  +XX  +++++++++  ++++
+  ++++++  +++++  XX++    ++XX        +++  ++++
++++++++++++++++++XX++++++++XX+++++++++++++++++
.SKIP
\\INTERCHARACTER SPACING 3 WITH WHITE SPACE ADJUSTMENT
.SKIP
++++++++++++++++++^^XXX++++++++XXX+++++++++++++++++
+        ++++++   XXX  ++++  XXX  ++++++        +
+  +++++++++++    XXX  ++++  XXX  +++++++++  ++++
+  ++++++++++  +  XXX  ++++  XXX  +++++++++  ++++
+     ++++++  ++  XXX  ++++  XXX  +++++++++  ++++
+  ++++++++       XXX  ++++  XXX  +++++++++  ++++
+  +++++++  ++++  XXX+  ++  +XXX  +++++++++  ++++
+  ++++++  +++++  XXX++    ++XXX        +++  ++++
++++++++++++++++++XXX++++++++XXX+++++++++++++++++
.SKIP
\\INTERCHARACTER SPACING 4 WITH WHITE SPACE ADJUSTMENT
.SKIP
++++++++++++++++++^^XXXX++++++++XXXX++++++++X+++++++++
+        ++++++   XXXX  ++++  XXXX  ++++++X        +
+  +++++++++++    XXXX  ++++  XXXX  ++++++X+++  ++++
+  ++++++++++  +  XXXX  ++++  XXXX  ++++++X+++  ++++
+     ++++++  ++  XXXX  ++++  XXXX  ++++++X+++  ++++
+  ++++++++       XXXX  ++++  XXXX  ++++++X+++  ++++
+  +++++++  ++++  XXXX+  ++  +XXXX  ++++++X+++  ++++
+  ++++++  +++++  XXXX++    ++XXXX        X+++  ++++
++++++++++++++++++XXXX++++++++XXXX++++++++X+++++++++
.FILL
.PAGE
.LEFT MARGIN 0
.CENTER
A P\\ROGRAM ^DEMONSTRATING THE ^USE OF THE ^^DATEXT R\\OUTINE
.CENTER
- ------- ------------- --- --- -- --- ------ -------
.SKIP
^THE FOLLOWING PROGRAM ATTEMPTS TO CENTER IN A DESIRED COLUMN WIDTH
THE REPRESENTATION OF A TEXT STRING TYPED BY THE USER. ^NARROWER
INTERVALS ARE TRIED IF THE REPRESENTATION WILL NOT FIT WITH THE
DESIRED INTERVAL. ^IF THE REPRESENTATION OF THE TEXT STRING WILL NOT
FIT WITH AN INTERVAL OF 1, THEN LARGER OUTPUT WIDTHS ARE TRIED UNTIL
EITHER ALL CHARACTERS TYPED BY THE USER ARE SHOWN OR THE ENTIRE
OUTPUT BUFFER IS USED.
.SKIP
.NOFILL
      ^^DATA IDISK,ITTY,JTTY,MAXLTR,MAXBFR/1,5,5,20,132/
      DIMENSION LTTR(20),IBUFFR(132)
      CALL TEXT4
      WRITE(JTTY,1)
    1 FORMAT(32H CENTER IN WHAT WIDTH (MAX 132) ,$)
      READ(ITTY,2)IDEAL
    2 FORMAT(I)
      WRITE(JTTY,3)
    3 FORMAT(33H DESIRED SPACING BETWEEN LETTERS ,$)
      READ(ITTY,2)INITAL
    4 WRITE(JTTY,5)
    5 FORMAT(8H STRING ,$)
      READ(ITTY,11)LTTR
      LTREND=MAXLTR+1
    6 LTREND=LTREND-1
      IF(LTREND.EQ.0)GO TO 12
      IF(LTTR(LTREND).EQ.1H )GO TO 6
      LINE=1
      INTRVL=INITAL
      IWIDTH=IDEAL
    7 CALL DATEXT(LINE,0,0,INTRVL,1,
     10,LTTR,1,LTREND,0,IWIDTH,MAXBFR,
     2IBUFFR,MAXUSD,MAXLIN,LTRNXT)
      IF(LINE.GT.1)GO TO 9
      IF(LTRNXT.GT.LTREND)GO TO 9
      IF(INTRVL.LE.1)GO TO 8
      INTRVL=INTRVL-1
      GO TO 7
    8 IF(IWIDTH.GE.MAXBFR)GO TO 9
      IWIDTH=IWIDTH+1
      GO TO 7
    9 WRITE(JTTY,10)(IBUFFR(I),I=1,MAXUSD)
   10 FORMAT(1X,132A1)
      WRITE(IDISK,11)(IBUFFR(I),I=1,MAXUSD)
   11 FORMAT(132A1)
      LINE=LINE+1
      IF(LINE.LE.MAXLIN)GO TO 7
      WRITE(JTTY,10)
      WRITE(IDISK,10)
      GO TO 4
   12 STOP
      END
.SKIP 3
.TEST PAGE 8
.FILL
.CENTER
T\H\E DATURN A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DATURN \I\S
.SKIP
.NOFILL
      SUBROUTINE DATURN(INTRVL,MOVE  ,ISPACE,LTTR  ,LTRBGN,
     1    LTREND,LFTCOL,MAXBFR,IBUFFR,MAXUSD,MAGNFY,INISTR,
     2    MAXSTR,KIND  ,ISTORE)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION LTTR(LTREND),IBUFFR(MAXBFR),ISTORE(MAXSTR)
.SKIP
.FILL
T\H\E DATURN \\ARGUMENT LIST DOES NOT INCLUDE THE FOLLOWING ^^DATEXT
\\ARGUMENTS
.SKIP
.LEFT MARGIN 7
.INDENT -5
^^LINE#\\WHICH SELECTS THE LINE NUMBER,
.SKIP
.INDENT -7
^^JSTIFY#\\WHICH SELECTS THE JUSTIFICATION,
.SKIP
.INDENT -6
^^IFILL#\\WHICH SELECTS WHETHER THE BUFFER IS TO BE FILLED WITH
SPACES TO THE RIGHT OF THE LETTERING,
.SKIP
.INDENT -7
^^IWIDTH#\\WHICH SPECIFIES THE FIELD WIDTH,
.SKIP
.INDENT -7
^^MAXLIN#\\WHICH RETURNS THE MAXIMUM LINE COUNT, AND
.SKIP
.INDENT -7
^^LTRNXT#\\WHICH IDENTIFIES THE FIRST CHARACTER WHICH COULD NOT BE
REPRESENTED.
.SKIP
.LEFT MARGIN 0
^ALSO, SINCE THE LETTERING PRODUCED BY ^^DATURN \\TENDS TO BE RATHER
LARGE, RIGHTMOST SPACES ARE IGNORED IF FOUND IN THE TEXT BEING
REPRESENTED SO THAT ^^ISPACE \\VALUES OF -1 AND 0 ARE EQUIVALENT.
^INSTEAD, IF TWO OR MORE PARALLEL STRIPS OF LETTERING ARE BEING
GENERATED, THEN A LINE OF SPACES WILL BE RETURNED IF ^^DATURN \I\S
\\CALLED AFTER ALL OF THE PRINTING CHARACTERS IN A PARTICULAR STRIP
HAVE BEEN REPRESENTED.
.SKIP
^THE FINAL 5 ^^DATURN \\ARGUMENTS ARE NOT INCLUDED IN THE ^^DATEXT
\\ARGUMENT LIST. ^^MAGNFY, INISTR \\AND ^^MAXSTR \\ARE USED ONLY FOR
INPUT AND ARE RETURNED UNCHANGED. ^^KIND \\MUST BE SET TO ZERO BY
THE CALLING PROGRAM BEFORE THIS ROUTINE IS FIRST CALLED TO REPRESENT
A PARTICULAR LINE OF TEXT, AND THE VALUE OF ^^KIND \\WHICH IS
RETURNED IS THEN SUPPLIED TO THE SUBSEQUENT CALL OF THIS ROUTINE
WHICH CONTINUES THE REPRESENTATION OF THE SAME LINE OF TEXT.
^^ISTORE \\IS AN ARRAY THE VALUES OF WHICH NEED NOT BE DEFINED BY
THE CALLING PROGRAM. ^^ISTORE \\IS USED BY EACH CALL OF THIS ROUTINE
TO TRANSFER INFORMATION ABOUT THE CURRENT STATE OF THE LETTERING TO
THE SUBSEQUENT CALL TO THIS ROUTINE WHICH IS CONTINUING THE
REPRESENTATION OF THE SAME LINE OF TEXT. ^THESE ARGUMENTS ARE
DEFINED AS FOLLOWS.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^MAGNFY#=#\\INPUT CONTAINING A MAGNIFICATION FACTOR WHICH IS
APPLIED TO THE HEIGHT OF THE LETTERING. ^IF ^^MAGNFY \\HAS THE VALUE
2, THEN EACH CHARACTER WHICH WOULD BE GENERATED TO FORM THE SHAPE IS
REPEATED TWICE. ^SINCE THE FONTS ARE DESIGNED FOR A 6 LINES PER INCH
AND 10 CHARACTERS PER INCH FORMAT, THE LETTERING, WHEN TURNED 90
DEGREES, WILL APPEAR EXTREMELY ELONGATED UNLESS THE HEIGHT IS
MAGNIFIED. ^^A MAGNFY \\VALUE OF 3 WOULD PRODUCE APPROXIMATELY
NORMALLY PROPORTIONED LETTERING. ^IF EACH LINE RETURNED BY ^^DATURN
\\IS PRINTED TWICE, THEN EXTREMELY LARGE LETTERING CAN BE PRODUCED
BY SETTING ^^MAGNFY \T\O 5. I\\T IS OF COURSE NECESSARY THAT THE
^^IBUFFR \\ARRAY BE LARGE ENOUGH TO CONTAIN THE MAGNIFIED IMAGE OF
THE LETTERING.
.SKIP
.INDENT -9
^^INISTR#=#\\INPUT CONTAINING THE SUBSCRIPT OF THE FIRST LOCATION IN
THE ^^ISTORE \\ARRAY WHICH CAN BE USED TO TRANSFER INFORMATION ABOUT
THE CURRENT STATE OF THE LETTERING PROCESS TO THE SUBSEQUENT CALL OF
THIS ROUTINE WHICH IS TO CONTINUE THE REPRESENTATION OF THE SAME
LINE OF TEXT.
.SKIP
.INDENT -9
^^MAXSTR#=#\\INPUT CONTAINING THE SUBSCRIPT OF THE FINAL LOCATION IN
THE ^^ISTORE \\ARRAY WHICH CAN BE USED TO TRANSFER INFORMATION ABOUT
THE CURRENT STATE OF THE LETTERING PROCESS TO THE SUBSEQUENT CALL OF
THIS ROUTINE WHICH IS TO CONTINUE THE REPRESENTATION OF THE SAME
LINE OF TEXT. ^AT LEAST 18 LOCATIONS IN THE ^^ISTORE \\ARRAY ARE
NEEDED FOR THIS PURPOSE, BUT IT IS REQUESTED THAT AT LEAST 24
LOCATIONS BE RESERVED TO ALLOW FOR FUTURE ENHANCEMENT OF THE ROUTINE.
.SKIP
.INDENT -9
^^KIND###=#\\MUST BE INPUT CONTAINING ZERO WHEN THIS ROUTINE IS
FIRST CALLED TO REPRESENT A PARTICULAR LINE OF TEXT. ^THEREAFTER,
THE VALUE OF ^^KIND \\RETURNED BY THIS ROUTINE SHOULD BE SUPPLIED TO
THE SUBSEQUENT CALL WHICH IS CONTINUING THE REPRESENTATION OF THE
SAME LINE OF TEXT. ^^KIND \\IS RETURNED CONTAINING ONE OF THE
FOLLOWING VALUES.
.INDENT -2
=#1, RETURNED IF THE LINE OF TEXT HAS BEEN COMPLETELY REPRESENTED.
^^IBUFFR(LFTCOL+1) \\THROUGH AND INCLUDING ^^IBUFFR(MAXUSD) \I\S
\\RETURNED CONTAINING SPACES. ^THIS PORTION OF THE ^^IBUFFR \\ARRAY
WILL AGAIN BE RETURNED CONTAINING SPACES IF ^^DATURN \I\S
\\SUBSEQUENTLY CALLED WITH THE VALUE OF ^^KIND \\BEING UNCHANGED.
.INDENT -2
=#2, RETURNED IF ^^IBUFFR(LFTCOL+1) \\THROUGH AND INCLUDING
^^IBUFFR(MAXUSD) \\IS RETURNED CONTAINING A PORTION OF THE
REPRESENTATION OF A SINGLE CHARACTER.
.INDENT -2
=#3, RETURNED IF THE AVAILABLE PORTION OF THE ^^IBUFFR \\ARRAY WAS
INSUFFICIENT TO CONTAIN THE REPRESENTATION OF THE LETTERING.
^^MAXBFR-LFTCOL \\IS LESS THAN ^^MAGNFY \\TIMES THE CHARACTER HEIGHT.
.INDENT -2
=#4, RETURNED IF THE AVAILABLE PORTION OF THE ^^ISTORE \\ARRAY WAS
INSUFFICIENT TO CONTAIN THE DESCRIPTION OF THE CURRENT STATE OF THE
LETTERING PROCESS FOR TRANSFER TO THE SUBSEQUENT CALL TO THIS
ROUTINE WHICH IS TO CONTINUE THE LETTERING OF THE SAME LINE OF TEXT.
.INDENT -2
=#5, RETURNED IF A FONT WAS NOT LOADED.
.SKIP
.INDENT -9
^^ISTORE#=#\\ARRAY USED TO TRANSFER A DESCRIPTION OF THE CURRENT
STATE OF THE LETTERING PROCESS TO THE SUBSEQUENT CALL OF THIS
ROUTINE WHICH IS TO CONTINUE THE REPRESENTATION OF THE SAME LINE OF
TEXT. ^THE ORIGINAL CONTENTS OF THE ^^ISTORE \\ARRAY ARE IGNORED AND
ARE DESTROYED.
.SKIP 3
.LEFT MARGIN 0
.FILL
.CENTER
^A ^PROGRAM ^DEMONSTRATING THE ^USE OF THE ^^DATURN R\\OUTINE
.CENTER
- ------- ------------- --- --- -- --- ------ -------
.SKIP
^THE PROGRAM LISTED BELOW CONSTRUCTS A LARGE MULTI-PAGE BANNER WHICH
CAN BE PRINTED ON THE LINE-PRINTER. ^EACH BANNER CAN CONTAIN UP TO
10 PARALLEL LINES OF LETTERING. ^EACH LINE IN THE INPUT FILE SHOULD
CONTAIN THE HEIGHT MAGNIFICATION FACTOR, THE WIDTH MAGNIFICATION
FACTOR, THE INTERCHARACTER SPACING (BEFORE APPLICATION OF THE WIDTH
MAGNIFICATION FACTOR), AND THE NUMBER OF EXTRA BLANK LINES TO BE
INCLUDED IN THE BANNER PRIOR LETTERING FOR POSSIBLE CENTERING,
FOLLOWED ON THE SAME LINE BY A SINGLE CHARACTER WHICH IS IGNORED AND
THEN BY THE TEXT TO BE REPRESENTED AS A SINGLE LINE IN THE BANNER.
^THE NUMBERS ARE SPECIFIED AS INTEGERS. ^A LINE CONTAINING A SINGLE
ZERO TERMINATES THE DESCRIPTION OF A SINGLE BANNER. ^ADDITIONAL
GROUPS OF LINES CONTAINING NUMBERS AND TEXT CAN FOLLOW. TWO
CONSECUTIVE LINES EACH CONTAINING A SINGLE ZERO TERMINATE EXECUTION.
^THE CONTENTS OF A TYPICAL INPUT FILE DESCRIBING A FIRST BANNER
CONTAINING 3 LINES, AND A SECOND CONTAINING 2 LINES ARE SHOWN BELOW
.LEFT MARGIN 10
.SKIP
.NOFILL
3 1 2 0 ^^TOP LINE, 1ST BANNER
3 1 2 0 MIDDLE LINE, 1ST BANNER
3 1 2 0 BOTTOM LINE, 1ST BANNER
3 1 2 0 LINE REJECTED BECAUSE WON'T FIT
0
5 2 2 0 TOP LINE, 2ND BANNER
5 2 2 0 BOTTOM LINE, 2ND BANNER
0
0
.LEFT MARGIN 0
.SKIP
.FILL
T\\HE CHARACTERS PRODUCED BY THIS PROGRAM ARE TURNED 90 DEGREES FROM
THE ORIENTATION FOR WHICH THEY WERE DESIGNED. ^IF ^^TEXT5 \\IS USED,
THEN HEIGHT AND WIDTH MAGNIFICATION FACTORS OF 1 WILL GIVE LETTERS
WHICH ARE 9 COLUMNS HIGH AND 14 LINES WIDE. ^THE LETTERING CAN
EXTEND ACROSS THE FULL 132 COLUMN WIDTH OF THE LINE-PRINTER PAPER.
^TWO PARALLEL LINES OF LETTERING CAN BE GENERATED IF A HEIGHT
MAGNIFICATION FACTOR OF 5 AND WIDTH MAGNIFICATION FACTOR OF 2 ARE
USED. ^THREE PARALLEL LINES CAN BE GENERATED IF A HEIGHT FACTOR OF 3
AND WIDTH FACTOR OF 1 ARE USED. ^THE INTERCHARACTER SPACING SHOULD
BE ABOUT 2.
.SKIP
.NOFILL
^^C     RENBR(BANNER/CONSTRUCT LETTERING ALONG FANFOLD PAPER)
      DIMENSION LTTR(1000),IBUFFR(132),ISTORE(240),
     1LINKND(10),LINLNG(10),LINHIH(10),NEEDED(10),
     2LINWID(10),LINUSD(10),LINSPC(10),INITAL(10),
     3MULTPL(4)
      DATA IDISK,JDISK,ITTY,JTTY,MAXBFR,MAXSTR/
     11,20,5,5,132,240/
      DATA IBLANK,IONE,ISTAR,IPLUS/1H ,1H1,1H*,1H+/
      DATA MOVE,ISPACE/1,0/
      DATA MULTPL/1HH,1HI,1HO,1HX/
      CALL TEXT5
      LONGST=0
      WRITE(JTTY,1)
    1 FORMAT(39H NUMBER OF IMPRESSIONS (- FOR DARKEST) ,$)
      READ(ITTY,2)KOPIES
    2 FORMAT(I)
      IF(KOPIES.LT.-4)KOPIES=-4
      IF(KOPIES.GT.8)KOPIES=8
C
C     READ HEIGHT, WIDTH, SPACING AND TEXT TO REPRESENT
      IEOF=0
    3 KNTLIN=0
      LTREND=0
    4 KNTLIN=KNTLIN+1
      IF(KNTLIN.GT.10)GO TO 12
      READ(IDISK,5,END=11)IBUFFR
    5 FORMAT(132A1)
      LOWBFR=1
      LINHIH(KNTLIN)=3
      LINWID(KNTLIN)=1
      LINSPC(KNTLIN)=2
      INITAL(KNTLIN)=0
      NEEDED(KNTLIN)=0
      LINLNG(KNTLIN)=-1
      LINKND(KNTLIN)=0
      DO 7 INDEX=1,4
      CALL DAIHFT(0,0,0,IBUFFR,MAXBFR,
     1LOWBFR,KIND,ISHIFT,JSHIFT,KSHIFT,LSHIFT,IVALUE)
      GO TO(12,8,6),KIND
    6 IF(INDEX.EQ.1)LINHIH(KNTLIN)=IVALUE
      IF(INDEX.EQ.2)LINWID(KNTLIN)=IVALUE
      IF(INDEX.EQ.3)LINSPC(KNTLIN)=IVALUE
    7 CONTINUE
      IF(IVALUE.LE.0)GO TO 9
      INITAL(KNTLIN)=IVALUE
      LINKND(KNTLIN)=1
      GO TO 9
    8 LOWBFR=LOWBFR-1
    9 LTRBGN=LTREND
      LTREND=LTREND+100
   10 LTRBGN=LTRBGN+1
      IF(LTRBGN.GT.LTREND)GO TO 4
      LOWBFR=LOWBFR+1
      LTTR(LTRBGN)=IBLANK
      IF(LOWBFR.LE.MAXBFR)LTTR(LTRBGN)=IBUFFR(LOWBFR)
      GO TO 10
   11 IEOF=1
   12 KNTLIN=KNTLIN-1
      IF(KNTLIN.LE.0)GO TO 45
C
C     PRODUCE EACH LINE OF LETTERING UNTIL ALL LINES DONE
      IF(LONGST.GT.0)WRITE(JDISK,13)
   13 FORMAT(1X/1X/1X/1X/1X/1X/1X/1X)
      LONGST=0
      KONTRL=IONE
   14 NOWLIN=KNTLIN
      MAXUSD=0
      GO TO 17
C
C     INSERT SEPARATION BETWEEN COLUMNS OF TEXT
   15 IF(MAGNFY.LT.LINHIH(NOWLIN))MAGNFY=LINHIH(NOWLIN)
   16 IF(MAXUSD.GE.MAXBFR)GO TO 37
      MAGNFY=MAGNFY-1
      MAXUSD=MAXUSD+1
      IBUFFR(MAXUSD)=IBLANK
      IF(MAGNFY.GT.0)GO TO 16
C
C     REPRESENT CURRENT LINE OF CURRENT COLUMN OF TEXT
   17 MAGNFY=LINHIH(NOWLIN)
      NEEDED(NOWLIN)=NEEDED(NOWLIN)-1
      IF(NEEDED(NOWLIN).GT.0)GO TO 21
      NEEDED(NOWLIN)=LINWID(NOWLIN)
      LFTCOL=MAXUSD
      LTREND=100*NOWLIN
      LTRBGN=LTREND-99
      INISTR=(24*NOWLIN)-23
      KIND=LINKND(NOWLIN)
      INTRVL=LINSPC(NOWLIN)
      CALL DATURN(INTRVL,MOVE  ,ISPACE,LTTR  ,LTRBGN,
     1LTREND,LFTCOL,MAXBFR,IBUFFR,MAXUSD,MAGNFY,INISTR,
     2MAXSTR,KIND  ,ISTORE)
      IF(INITAL(NOWLIN).LE.0)GO TO 18
      IF(KIND.NE.1)GO TO 20
      NEEDED(NOWLIN)=INITAL(NOWLIN)
      INITAL(NOWLIN)=-INITAL(NOWLIN)
      LINKND(NOWLIN)=0
      KIND=2
      GO TO 19
   18 LINKND(NOWLIN)=KIND
   19 LINUSD(NOWLIN)=MAXUSD
   20 GO TO(23,22,37,41,43),KIND
   21 MAXUSD=LINUSD(NOWLIN)
   22 NOWLIN=NOWLIN-1
      IF(NOWLIN.GT.0)GO TO 15
      GO TO 25
C
C     DONE WITH THIS COLUMN OF TEXT, CHECK IF DONE WITH ALL
   23 IF(LINLNG(NOWLIN).LT.0)LINLNG(NOWLIN)=LONGST
      NOWLIN=NOWLIN-1
      IF(NOWLIN.GT.0)GO TO 15
      NOWLIN=KNTLIN
   24 IF(NOWLIN.LE.0)GO TO 33
      IF(LINLNG(NOWLIN).LT.0)GO TO 25
      NOWLIN=NOWLIN-1
      GO TO 24
C
C     OUTPUT CURRRENT LINE
   25 LONGST=LONGST+1
      IF(KOPIES.LT.0)GO TO 28
      J=KOPIES
   26 WRITE(JDISK,27)KONTRL,(IBUFFR(I),I=1,MAXUSD)
   27 FORMAT(133A1)
      KONTRL=IPLUS
      J=J-1
      IF(J.GT.0)GO TO 26
      GO TO 32
   28 DO 31 K=1,4
      LETTER=MULTPL(K)
      DO 29 I=1,MAXUSD
      IF(IBUFFR(I).NE.IBLANK)IBUFFR(I)=LETTER
   29 CONTINUE
      J=KOPIES
   30 WRITE(JDISK,27)KONTRL,(IBUFFR(I),I=1,MAXUSD)
      KONTRL=IPLUS
      J=J+1
      IF(J.LT.0)GO TO 30
   31 CONTINUE
   32 KONTRL=ISTAR
      GO TO 14
C
C     ERROR MESSAGES AND SUMMATION
   33 WRITE(JTTY,34)(LINLNG(I),I=1,KNTLIN)
   34 FORMAT(18H LENGTHS (TOP 1ST),10I5)
      DO 35 I=1,KNTLIN
   35 LINLNG(I)=(LONGST-LINLNG(I)-INITAL(I))/2
      WRITE(JTTY,36)(LINLNG(I),I=1,KNTLIN)
   36 FORMAT(18H NEEDED TO CENTER ,10I5)
      GO TO 40
   37 WRITE(JTTY,38),KNTLIN
   38 FORMAT(36H LETTERS TOO HIGH TO REPRESENT LINE ,I3)
      DO 39 I=1,KNTLIN
      NEEDED(I)=0
      LINKND(I)=0
      IF(INITAL(I).EQ.0)GO TO 39
      IF(INITAL(I).LT.0)INITAL(I)=-INITAL(I)
      LINKND(I)=1
   39 CONTINUE
      IF(KNTLIN.GT.1)GO TO 12
   40 IF(IEOF.EQ.0)GO TO 3
      GO TO 45
C
C     SERIOUS ERROR CONDITIONS
   41 WRITE(JTTY,42)
   42 FORMAT(21H INSUFFICIENT STORAGE)
      GO TO 45
   43 WRITE(JTTY,44)
   44 FORMAT(16H FONT NOT LOADED)
   45 ENDFILE JDISK
      STOP
C251676520779$
      END
.SKIP 2
.FILL
.LEFT MARGIN 0
.CENTER
F\\ONT ^STYLE ^SAMPLES
.CENTER
---- ----- -------
.SKIP
^THE DESIGNS OF THE NUMERALS SHOWN BELOW ARE TYPICAL OF THE DESIGNS
OF THE CHARACTERS IN THE CORRESPONDING FONTS ^^TEXT1 \\THROUGH
^^TEXT5 \\RESPECTIVELY.
.SKIP
.NOFILL
.TEST PAGE 11
                     333333
                   33      33                 55555555555555
                  33        33        4444    5555
  111    2222               33       44 44    5555
11111        2             33       44  44    5555555555
  111     222         33333        44   44            55555
  111    2                 33     44444444              5555
  111    22222              33          44              5555
                  33        33          44            55555
                   33      33                 5555555555
                     333333
.PAGE
.LEFT MARGIN 0
.CENTER
^TYPICAL ^LETTERING USING THE ^^TEXT1 F\\ONT
.CENTER
------- --------- ----- --- ----- ----
.SKIP
^THE ONLY PUNCTUATION MARKS IN THIS FONT ARE ()*/+-=:., AND '
.SKIP
.NOFILL
    ^^AAA      BBBBBBBBB   CCCCCCCCC   DDDDDDD     EEEEEEEEE
  AAA AAA    BBB   BBB   CCC         DDD   DDD   EEE
 AAA   AAA   BBBBBBB     CCC         DDD   DDD   EEEEEE
 AAAAAAAAA   BBB   BBB   CCC         DDD   DDD   EEE
 AAA   AAA   BBBBBBBBB   CCCCCCCCC   DDDDDDD     EEEEEEEEE
.SKIP
 FFFFFFFFF   GGGGGGGGG   HHH   HHH    IIIIIII          JJJ
 FFF         GGG         HHH   HHH      III            JJJ
 FFFFFF      GGG  GGGG   HHHHHHHHH      III            JJJ
 FFF         GGG   GGG   HHH   HHH      III      JJJ   JJJ
 FFF         GGGGGGGGG   HHH   HHH    IIIIIII    JJJJJJJJJ
.SKIP
 KKK   KKK   LLL        MMM     MMM  NNN   NNN   OOOOOOOOO
 KKK  KKK    LLL        MMMM   MMMM  NNNN  NNN   OOO   OOO
 KKKKKKK     LLL        MMM M M MMM  NNN N NNN   OOO   OOO
 KKK  KKK    LLL        MMM  M  MMM  NNN  NNNN   OOO   OOO
 KKK   KKK   LLLLLLLLL  MMM     MMM  NNN   NNN   OOOOOOOOO
.SKIP
 PPPPPPPPP  QQQQQQQQQ    RRRRRRRRR    SSSSSSS    TTTTTTTTT
 PPP   PPP  QQQ   QQQ    RRR   RRR   SSS            TTT
 PPPPPPPPP  QQQ   QQQ    RRRRRRR      SSSSSSS       TTT
 PPP        QQQ   QQQ    RRR  RRR          SSS      TTT
 PPP        QQQQQQQQQQQ  RRR   RRR   SSSSSSSS       TTT
.SKIP
 UUU   UUU   VVV   VVV  WWW     WWW  XXX   XXX   YYY   YYY
 UUU   UUU   VVV   VVV  WWW  W  WWW   XXX XXX     YYY YYY
 UUU   UUU    VVV VVV   WWW W W WWW     XXX         YYY
 UUU   UUU     VVVVV    WWWW   WWWW   XXX XXX       YYY
 UUUUUUUUU      VVV     WWW     WWW  XXX   XXX      YYY
.SKIP
 ZZZZZZZZZ   000000000       111     222222222   333333333
      ZZZ    000   000     11111           222         333
    ZZZ      000   000       111       2222222       333
  ZZZ        000   000       111     222               333
 ZZZZZZZZZ   000000000       111     222222222   333333333
.SKIP
   444 444   555555555     666       777777777   888888888
  444  444   555          666             777    888   888
 444444444   5555555     666666666       777       88888
       444         555   666   666      777      888   888
       444   555555555   666666666     777       888888888
.SKIP
 999999999       (((      *** ***         ///       +++
 999   999     (((          ***          ///        +++
 999999999     (((       *********      ///      +++++++++
      999      (((          ***        ///          +++
     999         (((      *** ***     ///           +++
.FILL
.PAGE
.CENTER
T\\YPICAL ^LETTERING USING THE ^^TEXT2 F\\ONT
.CENTER
------- --------- ----- --- ----- ----
.NOFILL
.SKIP
  ^^A    BBBB    CCCC  DDDD   EEEEE  FFFFF   GGGG  H   H
 A A   B   B  C      D   D  E      F      G      H   H
A   A  BBBB   C      D   D  EEEE   FFFF   G  GG  HHHHH
AAAAA  B   B  C      D   D  E      F      G   G  H   H
A   A  BBBB    CCCC  DDDD   EEEEE  F       GGGG  H   H
.SKIP
.TEST PAGE  5
 III       J  K   K  L      M   M  N   N   OOO   PPPP
  I        J  K  K   L      MM MM  NN  N  O   O  P   P
  I        J  KKK    L      M M M  N N N  O   O  PPPP
  I    J   J  K  K   L      M   M  N  NN  O   O  P
 III    JJJ   K   K  LLLLL  M   M  N   N   OOO   P
.SKIP
.TEST PAGE  5
 QQQ   RRRR    SSSS  TTTTT  U   U  V   V  W   W  X   X
Q   Q  R   R  S        T    U   U  V   V  W   W   X X
Q Q Q  RRRR    SSS     T    U   U  V   V  W W W    X
Q  Q   R  R       S    T    U   U   V V   WW WW   X X
 QQ Q  R   R  SSSS     T     UUU     V    W   W  X   X
.SKIP
.TEST PAGE  5
Y   Y  ZZZZZ   000    11    2222   3333   4   4  55555
 Y Y      Z   0   0    1        2      3  4   4  5
  Y      Z    0   0    1     222     33   44444  5555
  Y     Z     0   0    1    2          3      4      5
  Y    ZZZZZ   000    111   22222  3333       4  5555
.SKIP
.TEST PAGE  5
  6    77777   888    999     ((    ))
 6        7   8   8  9   9   (        )     +
6666     7     888    9999   (        )   +++++  -----
6   6   7     8   8     9    (        )     +
 666   7       888     9      ((    ))
.SKIP
.TEST PAGE  5
           /                 ''     ::      _^    "" ""
 ***      /                  ''     ::     _^ _^   "" ""
*****    /            ,,      '           _^   _^   "  "
 ***    /      ..     ,,            ::
       /       ..      ,            ::
.SKIP
.TEST PAGE  5
 _# _#    $$$$  %%  %  _&_&_&              <    >     ????
_#_# _#_#  $ $    %% %    _&     =====    <      >        ?
        $$$     %    _& _& _&          <        >     ??
_#_# _#_#    $ $   % %%  _&  _&   =====    <      >
 _# _#   $$$$   %  %%   _&_& _&            <    >       ?
.SKIP
.TEST PAGE  5
 @@@     !
@   @    !
@  @@    !
@  @@
 @       !
.PAGE
.CENTER
T\\YPICAL ^LETTERING USING THE ^^TEXT3 F\\ONT
.CENTER
------- --------- ----- --- ----- ----
.SKIP
.NOFILL
     ^^AA         BBBBBBBBB          CCCCCC       DDDDDDDD
    AAAA        BB       BB      CC      CC     DD      DD
   AA  AA       BB        BB    CC        CC    DD       DD
  AA    AA      BB        BB    CC              DD        DD
 AA      AA     BB       BB     CC              DD        DD
AA        AA    BBBBBBBBB       CC              DD        DD
AA        AA    BB       BB     CC              DD        DD
AAAAAAAAAAAA    BB        BB    CC              DD        DD
AA        AA    BB        BB    CC        CC    DD       DD
AA        AA    BB       BB      CC      CC     DD      DD
AA        AA    BBBBBBBBB          CCCCCC       DDDDDDDD
.SKIP
EEEEEEEEEEEE    FFFFFFFFFFFF       GGGGGG       HH        HH
EE              FF               GG      GG     HH        HH
EE              FF              GG        GG    HH        HH
EE              FF              GG              HH        HH
EE              FF              GG              HH        HH
EEEEEEEE        FFFFFFFF        GG              HHHHHHHHHHHH
EE              FF              GG     GGGGG    HH        HH
EE              FF              GG        GG    HH        HH
EE              FF              GG        GG    HH        HH
EE              FF               GG       GG    HH        HH
EEEEEEEEEEEE    FF                 GGGGGGGGG    HH        HH
.SKIP
   IIIIII                 JJ    KK      KK      LL
     II                   JJ    KK     KK       LL
     II                   JJ    KK    KK        LL
     II                   JJ    KK   KK         LL
     II                   JJ    KK  KK          LL
     II                   JJ    KK KKKK         LL
     II                   JJ    KKKK  KK        LL
     II                   JJ    KKK    KK       LL
     II         JJ        JJ    KK      KK      LL
     II          JJ      JJ     KK       KK     LL
   IIIIII          JJJJJJ       KK        KK    LLLLLLLLLLLL
.SKIP
MM        MM    NN        NN       OOOOOO       PPPPPPPPP
MMM      MMM    NNN       NN     OO      OO     PP       PP
MMMM    MMMM    NNNN      NN    OO        OO    PP        PP
MM MM  MM MM    NN NN     NN    OO        OO    PP        PP
MM  MMMM  MM    NN  NN    NN    OO        OO    PP       PP
MM   MM   MM    NN   NN   NN    OO        OO    PPPPPPPPP
MM        MM    NN    NN  NN    OO        OO    PP
MM        MM    NN     NN NN    OO        OO    PP
MM        MM    NN      NNNN    OO        OO    PP
MM        MM    NN       NNN     OO      OO     PP
MM        MM    NN        NN       OOOOOO       PP
.PAGE
.CENTER
TEXT3 F\\ONT (CONTINUED)
.CENTER
-----#----##---------
.SKIP
   ^^QQQQQQ       RRRRRRRRR          SSSSSS       TTTTTTTTTTTT
 QQ      QQ     RR       RR      SS      SS          TT
QQ        QQ    RR        RR    SS        SS         TT
QQ        QQ    RR        RR    SS                   TT
QQ        QQ    RR       RR      SS                  TT
QQ        QQ    RRRRRRRRR          SSSSSS            TT
QQ        QQ    RR    RR                 SS          TT
QQ     QQ  Q    RR     RR                 SS         TT
QQ      QQ      RR      RR      SS        SS         TT
 QQ      QQ     RR       RR      SS      SS          TT
   QQQQQ  QQ    RR        RR       SSSSSS            TT
.SKIP
UU        UU    VV        VV    WW        WW    XX        XX
UU        UU    VV        VV    WW        WW     XX      XX
UU        UU    VV        VV    WW        WW      XX    XX
UU        UU    VV        VV    WW        WW       XX  XX
UU        UU    VV        VV    WW        WW        XXXX
UU        UU    VV        VV    WW   WW   WW         XX
UU        UU     VV      VV     WW  WWWW  WW        XXXX
UU        UU      VV    VV      WW WW  WW WW       XX  XX
UU        UU       VV  VV       WWWW    WWWW      XX    XX
 UU      UU         VVVV        WWW      WWW     XX      XX
   UUUUUU            VV         WW        WW    XX        XX
.SKIP
YY        YY    ZZZZZZZZZZZZ       000000            11
 YY      YY              ZZ      00      00         111
  YY    YY              ZZ      00        00       1111
   YY  YY              ZZ       00        00         11
    YYYY              ZZ        00        00         11
     YY              ZZ         00        00         11
     YY             ZZ          00        00         11
     YY            ZZ           00        00         11
     YY           ZZ            00        00         11
     YY          ZZ              00      00          11
     YY         ZZZZZZZZZZZZ       000000          111111
.SKIP
   222222          333333             44        555555555555
 22      22      33      33          44         55
22        22    33        33        44          55
          22              33       44     44    55
         22              33       44      44    55
       22           33333        44       44    555555555
     22                  33     444444444444             55
   22                     33              44              55
 22             33        33              44              55
22               33      33               44             55
222222222222       333333                 44    555555555
.PAGE
.CENTER
TEXT3 F\\ONT (CONTINUED)
.CENTER
-----#----##---------
.SKIP
.TEST PAGE 11
       66       777777777777       888888          999999
      66                 77      88      88      99      99
     66                 77      88        88    99        99
    66                 77       88        88    99        99
   66                 77         88      88      99      99
  6666666            77            888888          9999999
 66      66          77          88      88            99
66        66         77         88        88          99
66        66         77         88        88         99
 66      66          77          88      88         99
   666666            77            888888          99
.SKIP
                                 %%%      %%         $$
         <<      >>             %   %    %%          $$
       <<          >>           %   %   %%        $$$$$$$$$$
     <<              >>          %%%   %%       $$   $$
   <<                  >>             %%        $$   $$
 <<                      >>          %%           $$$$$$$$
   <<                  >>           %%               $$   $$
     <<              >>            %%   %%%          $$   $$
       <<          >>             %%   %   %    $$$$$$$$$$
         <<      >>              %%    %   %         $$
                                %%      %%%          $$
.SKIP
?????????            _^_^              !!            _#_#  _#_#
         ??         _^_^_^_^             !!            _#_#  _#_#
          ??       _^_^  _^_^            !!            _#_#  _#_#
          ??      _^_^    _^_^           !!         _#_#_#_#_#  _#_#_#_#_#
         ??      _^_^      _^_^          !!
   ??????       _^_^        _^_^         !!
   ??                                !!
                                                _#_#_#_#_#  _#_#_#_#_#
   ??                                !!            _#_#  _#_#
  ????                              !!!!           _#_#  _#_#
   ??                                !!            _#_#  _#_#
.SKIP
   _&_&_&_&            @@@@@@                 //
  _&_&  _&_&         @@      @@              //
  _&_&  _&_&        @@        @@            //           ++
   _&_&_&_&         @@   @@   @@           //            ++
    _&_&          @@  @  @  @@          //             ++
   _&_&_&_&         @@  @  @  @@         //         ++++++++++++
  _&_&  _&_&        @@  @  @  @@        //               ++
 _&_&    _&_& _&_&    @@   @@@@@@        //                ++
_&_&      _&_&      @@                //                 ++
_&_&    _&_& _&_&      @@              //
 _&_&_&_&_&    _&_&       @@@@@@@@@    //
.PAGE
.CENTER
^^TEXT3 F\\ONT (CONTINUED)
.CENTER
-----#----##---------
.SKIP
.TEST PAGE 11
                                                      ((((
                                                    (((
  **    **                                         ((
   **  **                       ============      ((
    ****                                          ((
************    ------------                      ((
    ****                                          ((
   **  **                       ============      ((
  **    **                                         ((
                                                    (((
                                                      ((((
.SKIP
    ''               ::          ""    ""            ;;
    '''             ::::         """   """          ;;;;
     ''              ::           ""    ""           ;;
    ''                           ""    ""
.SKIP
.SKIP
.SKIP
                                                     ;;
                     ::                              ;;;
                    ::::                              ;;
                     ::                              ;;
.SKIP
                                  ))))
                                     )))
                                       ))
                                        ))
                                        ))
                                        ))
                                        ))
                    ,,                  ))
     ..             ,,,                ))
    ....             ,,              )))
     ..             ,,            ))))
.PAGE
.CENTER
^TYPICAL ^LETTERING USING THE ^^TEXT4 F\\ONT
.CENTER
------- --------- ----- --- ----- ----
.SKIP
      ^^AAA  BBBBBB       CCCCC  DDDDD     EEEEEEEE  FFFFFFFF
     AAAA  BB    BB   CC       DD   DD   EE        FF
    AA AA  BB    BB  CC        DD    DD  EE        FF
   AA  AA  BBBBBB    CC        DD    DD  EEEEE     FFFFF
  AAAAAAA  BB    BB  CC        DD    DD  EE        FF
 AA    AA  BB    BB   CC       DD   DD   EE        FF
AA     AA  BBBBBB       CCCCC  DDDDD     EEEEEEEE  FF
.SKIP
    GGGGG  HH    HH   IIIIII         JJ  KK   KK   LL
  GG       HH    HH     II           JJ  KK  KK    LL
 GG        HH    HH     II           JJ  KK KK     LL
 GG  GGGG  HHHHHHHH     II           JJ  KKKKK     LL
 GG    GG  HH    HH     II     JJ    JJ  KKK KK    LL
  GG   GG  HH    HH     II      JJ  JJ   KK   KK   LL
    GGGGG  HH    HH   IIIIII     JJJJ    KK    KK  LLLLLLLL
.SKIP
MM      MM NN    NN   OOOOO    PPPPPP     QQQQQ    RRRRRR
MMM    MMM NNN   NN  OO   OO   PP    PP  QQ   QQ   RR    RR
MMMM  MMMM NNNN  NN OO     OO  PP    PP QQ     QQ  RR    RR
MM MMMM MM NN NN NN OO     OO  PPPPPP   QQ  QQ QQ  RRRRRR
MM  MM  MM NN  NNNN OO     OO  PP       QQ   QQ Q  RR  RR
MM      MM NN   NNN  OO   OO   PP        QQ   QQ   RR   RR
MM      MM NN    NN   OOOOO    PP         QQQQ QQ  RR    RR
.SKIP
   SSSSSS  TTTTTTTT  UU    UU  VV    VV WW      WW YY    YY
 SS           TT     UU    UU  VV   VV  WW      WW  YY  YY
 SS           TT     UU    UU  VV  VV   WW  WW  WW   YYYY
   SSSS       TT     UU    UU  VV VV    WW WWWW WW    YY
       SS     TT     UU    UU  VVVV     WWWW  WWWW    YY
       SS     TT      UU  UU   VVV      WWW    WWW    YY
 SSSSSS       TT       UUUU    VV       WW      WW    YY
.SKIP
 XX    XX  ZZZZZZZZ    0000        11    222222    333333
  XX  XX        ZZ    00  00     1111          22        33
   XXXX        ZZ    00    00      11          22        33
    XX        ZZ     00    00      11      2222      3333
   XXXX      ZZ      00    00      11    22              33
  XX  XX    ZZ        00  00       11    22              33
 XX    XX  ZZZZZZZZ    0000        11    22222222  333333
.SKIP
     4444  55555555      66    77777777    8888      9999
    44 44  55           66           77  88    88  99    99
   44  44  55          66           77   88    88  99    99
  44   44  555555     66666        77      8888      99999
 44444444        55  66    66     77     88    88      99
       44        55  66    66     77     88    88     99
       44  555555      6666       77       8888      99
.PAGE
.CENTER
TEXT4 F\\ONT (CONTINUED)
.CENTER
-----#----##---------#
.SKIP
     ((                                        //
   ((         ++                **  **        //
  ((          ++                 ****        //    ========
  ((       ++++++++  --------  ********     //
  ((          ++                 ****      //      ========
   ((         ++                **  **    //
     ((                                  //
.SKIP
                       '''      ))          _^_^     ??????
                        ''        ))       _^_^_^_^          ??
                       ''          ))     _^_^  _^_^         ??
                                   ))    _^_^    _^_^     ???
             ,,,                   ))
    ..        ,,                  ))                  ??
    ..       ,,                 ))                    ??
.SKIP
                      _#_#  _#_#      ::        ;;        !!
      <<    >>        _#_#  _#_#      ::        ;;        !!
    <<        >>     _#_#_#  _#_#_#                         !!
  <<            >>                                    !!
    <<        >>     _#_#_#  _#_#_#              ;;;
      <<    >>        _#_#  _#_#      ::        ;;        !!
                      _#_#  _#_#      ::       ;;         !!
.PAGE
.CENTER
^TYPICAL ^LETTERING USING THE ^^TEXT5 F\\ONT
.CENTER
------- --------- ----- --- ----- ----
.SKIP
.NOFILL
      ^^AA       BBBBBBBBBB         CCCCCCCCCC DDDDDDDD
     AAAA      BBBB    BBBBB   CCCCC         DDDD  DDDDD
    AAAAAA     BBBB      BBBB CCCC           DDDD     DDDD
   AA  AAAA    BBBB    BBBBB  CCCC           DDDD      DDDD
  AA    AAAA   BBBBBBBBBB     CCCC           DDDD      DDDD
 AA      AAAA  BBBB    BBBBB  CCCC           DDDD      DDDD
AAAAAAAAAAAAAA BBBB      BBBB CCCC           DDDD     DDDD
AA        AAAA BBBB    BBBBB   CCCCC         DDDD  DDDDD
AA        AAAA BBBBBBBBBB         CCCCCCCCCC DDDDDDDD
.SKIP
EEEEEEEEEEEEEE FFFFFFFFFFFFFF     GGGGGGGGGG HHHH      HHHH
EEEE           FFFF            GGGGG         HHHH      HHHH
EEEE           FFFF           GGGG           HHHH      HHHH
EEEE           FFFF           GGGG           HHHH      HHHH
EEEEEEEEE      FFFFFFFFF      GGGG           HHHHHHHHHHHHHH
EEEE           FFFF           GGGG    GGGGGG HHHH      HHHH
EEEE           FFFF           GGGG      GGGG HHHH      HHHH
EEEE           FFFF            GGGGG    GGGG HHHH      HHHH
EEEEEEEEEEEEEE FFFF               GGGGGGGGGG HHHH      HHHH
.SKIP
IIIIIIII             JJJJ   KKKK       KKK   LLLL
  IIII               JJJJ   KKKK     KKK     LLLL
  IIII               JJJJ   KKKK   KKK       LLLL
  IIII               JJJJ   KKKK KKK         LLLL
  IIII               JJJJ   KKKKKK           LLLL
  IIII     JJJJ      JJJJ   KKKKKKKK         LLLL
  IIII     JJJJ      JJJJ   KKKK  KKKK       LLLL
  IIII      JJJJJ  JJJJJ    KKKK    KKKK     LLLL
IIIIIIII       JJJJJJJ      KKKK      KKKK   LLLLLLLLLLLLLL
.SKIP
MM        MMMM NNNNN       NN     OOOOOO     PPPPPPPPPP
MMM      MMMMM NNNNNN      NN  OOOOO  OOOOO  PPPP    PPPPP
MMMM    MMMMMM NN NNNN     NN OOOO      OOOO PPPP      PPPP
MMMMM  MM MMMM NN  NNNN    NN OOOO      OOOO PPPP      PPPP
MM MMMMM  MMMM NN   NNNN   NN OOOO      OOOO PPPP    PPPPP
MM  MMM   MMMM NN    NNNN  NN OOOO      OOOO PPPPPPPPPP
MM   M    MMMM NN     NNNN NN OOOO      OOOO PPPP
MM        MMMM NN      NNNNNN  OOOOO  OOOOO  PPPP
MM        MMMM NN       NNNNN     OOOOOO     PPPP
.SKIP
    QQQQQQ     RRRRRRRRRR         SSSSSSSSSS TTTTTTTTTTTTTT
 QQQQQ  QQQQQ  RRRR    RRRRR   SSSSS              TTTT
QQQQ      QQQQ RRRR      RRRR SSSS                TTTT
QQQQ      QQQQ RRRR      RRRR  SSSSS              TTTT
QQQQ      QQQQ RRRR    RRRRR      SSSSSS          TTTT
QQQQ QQQ   QQQ RRRRRRRRRRR            SSSSS       TTTT
QQQQ   QQQ   Q RRRR    RRRR             SSSS      TTTT
 QQQQQ   QQQ   RRRR     RRRR          SSSSS       TTTT
   QQQQQ   QQQ RRRR      RRRR SSSSSSSSSS          TTTT
.PAGE
.CENTER
TEXT5 F\\ONT (CONTINUED)
.CENTER
----- ----##---------#
^^UUUU        UU VVVV        VV WWWW        WW XXXX       XX
UUUU        UU VVVV        VV WWWW        WW  XXXX     XX
UUUU        UU VVVV        VV WWWW    W   WW   XXXX   XX
UUUU        UU  VVVV      VV  WWWW   WWW  WW    XXXX XX
UUUU        UU   VVVV    VV   WWWW  WWWWW WW     XXXXXX
UUUU        UU    VVVV  VV    WWWW WW  WWWWW     XX XXXX
UUUU        UU     VVVVVV     WWWWWW    WWWW    XX   XXXX
 UUUUU   UUUU       VVVV      WWWWW      WWW   XX     XXXX
    UUUUUUU          VV       WWWW        WW  XX       XXXX
.SKIP
 YYYY        YY  ZZZZZZZZZZZZZZ                BBBB
  YYYY      YY           ZZZZ                  BBBB
   YYYY    YY           ZZZZ                   BBBB
    YYYY  YY           ZZZZ       AAAAAAAAA    BBBBBBBBB
     YYYYYY           ZZZZ               AAAA  BBBB   BBBB
      YYYY           ZZZZ          AAAAAAAAAA  BBBB    BBBB
      YYYY          ZZZZ         AAAA    AAAA  BBBB    BBBB
      YYYY         ZZZZ          AAAA    AAAA  BBBB   BBBB
      YYYY       ZZZZZZZZZZZZZZ    AAAAAAAAAA  BBBBBBBBB
.SKIP
                        DDDD                           FFFFF
                        DDDD                         FFFF
                        DDDD                        FFFF
   CCCCCCCCC       DDDDDDDDD       EEEEEE       FFFFFFFFFFFF
 CCCC            DDDD   DDDD     EEEE  EEEE         FFFF
CCCC            DDDD    DDDD    EEEE    EEEE        FFFF
CCCC            DDDD    DDDD    EEEEEEEEEEEE        FFFF
 CCCC            DDDD   DDDD     EEEE               FFFF
   CCCCCCCCC       DDDDDDDDD       EEEEEEEEE        FFFF
.SKIP
              HHHH           II      JJ   KKKK          LLLL
              HHHH          IIII    JJJJ  KKKK          LLLL
              HHHH           II      JJ   KKKK          LLLL
   GGGGGGGGG  HHHH  HHHH                  KKKK   KKK    LLLL
 GGGG   GGGG  HHHH HHHHHH   IIII    JJJJ  KKKK KKK      LLLL
GGGG    GGGG  HHHHHH  HHHH  IIII    JJJJ  KKKKKK        LLLL
GGGG    GGGG  HHHHH   HHHH  IIII    JJJJ  KKKKKKKK      LLLL
 GGGG   GGGG  HHHH    HHHH  IIII    JJJJ  KKKK  KKKK    LLLL
   GGGGGGGGG  HHHH    HHHH  IIII    JJJJ  KKKK    KKKK  LLLL
        GGGG                        JJJJ
       GGGG                        JJJJ
 GGGGGGGG                       JJJJJ
.SKIP
MMMM  MMMM    MMMM   NNNN  NNNN      OOOOOO    PPPPPPPPP
MMMM MMMMMM  MMMMMM  NNNN NNNNNN   OOOO  OOOO  PPPP   PPPP
MMMMMM  MMMMMM  MMMM NNNNNN  NNNN OOOO    OOOO PPPP    PPPP
MMMMM   MMMMM   MMMM NNNNN   NNNN OOOO    OOOO PPPP    PPPP
MMMM    MMMM    MMMM NNNN    NNNN  OOOO  OOOO  PPPP   PPPP
MMMM    MMMM    MMMM NNNN    NNNN    OOOOOO    PPPPPPPPP
                                               PPPP
                                               PPPP
                                               PPPP
.PAGE
.CENTER
TEXT5 F\\ONT (CONTINUED)
.CENTER
----- ----##---------#
                                                    ^^TTTT
                                                    TTTT
                                                    TTTT
   QQQQQQQQQ    RRRR   RRRRR      SSSSSSSSSS    TTTTTTTTTTTT
 QQQQ   QQQQ    RRRR RRRR       SSSS                TTTT
QQQQ    QQQQ    RRRRRR           SSSSSSS            TTTT
QQQQ    QQQQ    RRRR                SSSSSSS         TTTT
 QQQQ   QQQQ    RRRR                    SSSS        TTTT
   QQQQQQQQQ    RRRR            SSSSSSSSSS          TTTT
        QQQQ
        QQQQ
        QQQQ
.SKIP
UUUU    UUUU VVVV      VV WWWW      WW      WW XXXX     XXX
UUUU    UUUU  VVVV    VV   WWWW    WWWW    WW   XXXX  XXX
UUUU   UUUUU   VVVV  VV     WWWW  WWWWWW  WW      XXXXX
UUUU  UUUUUU    VVVVVV       WWWWWW  WWWWWW        XXXXX
 UUUUUU UUUU     VVVV         WWWW    WWWW       XXX  XXXX
  UUUU  UUUU      VV           WW      WW      XXX     XXXX
.SKIP
                                      000000              11
                                   00000  00000         1111
                                  0000      0000     1111111
YYYY      YY     ZZZZZZZZZZZZ     0000      0000        1111
 YYYY    YY             ZZZZ      0000      0000        1111
  YYYY  YY            ZZZZ        0000      0000        1111
   YYYYYY           ZZZZ          0000      0000        1111
    YYYY          ZZZZ             00000  00000         1111
     YY          ZZZZZZZZZZZZ         000000            1111
    YY
  YYY
YYY
.SKIP
2222222222     3333333333          4444444   55555555555555
        22222          33333      44  4444   5555
          2222           3333    44   4444   5555
        22222          33333    44    4444   5555555555
    222222         333333      44     4444           55555
 22222                 33333  44444444444444           5555
2222                     3333 44444444444444           5555
2222                   33333          4444           55555
22222222222222 3333333333             4444   5555555555
.SKIP
        6666  77777777777777     88888888         999999
     6666               7777   8888     888    99999  99999
   6666                 7777  8888       888  9999      9999
 6666                  7777    88888    888    99999    9999
6666666666            7777        888888          9999999999
6666    66666        7777      888    8888             9999
6666      6666      7777      888       8888         9999
 66666  66666      7777        888     8888        9999
    666666        7777           88888888       9999
.PAGE
.CENTER
TEXT5 F\\ONT (CONTINUED)
.CENTER
----- ----##---------#
.SKIP
 ;;        ::  !!!!    ""     ""         ////
;;;;      :::: !!!!    """    """       ////      ++++
 ;;        ::  !!!!     ""     ""      ////       ++++
               !!!!    ""     ""      ////        ++++
               !!!!                  ////    ++++++++++++++
 ;;                 ,,              ////     ++++++++++++++
 ;;;  ..   ::   !!  ,,,            ////           ++++
  ;; .... :::: !!!!  ,,           ////            ++++
 ;;   ..   ::   !!  ,,           ////             ++++
.SKIP
                                ''   )))))            (((((
  ***    ***                    '''     )))))      (((((
   ***  ***                      ''       ))))    ((((
    ******                      ''         ))))  ((((
**************  --------------             ))))  ((((
**************  --------------             ))))  ((((
    ******                                ))))    ((((
   ***  ***                             )))))      (((((
  ***    ***                         )))))            (((((
.SKIP
                   _#_#_#    _#_#_#          _^_^
 ==============    _#_#_#    _#_#_#        _^_^_^_^_^_^            <<<<
 ==============  _#_#_#_#_#_#_#_#_#_#_#_#_#_#    _^_^_^_^  _^_^_^_^        <<<<
                   _#_#_#    _#_#_#    _^_^_^_^      _^_^_^_^    <<<<
                   _#_#_#    _#_#_#                    <<<<
                   _#_#_#    _#_#_#                      <<<<
 ==============  _#_#_#_#_#_#_#_#_#_#_#_#_#_#                      <<<<
 ==============    _#_#_#    _#_#_#                          <<<<
                   _#_#_#    _#_#_#
.SKIP
            ??????????           _&_&_&_&_&_&_&      %%%     %%%%
 >>>>               ?????     _&_&_&_&           %% %%   %%%%
   >>>>               ????    _&_&_&_&           %% %%  %%%%
     >>>>           ?????       _&_&_&_&_&_&        %%%  %%%%
       >>>>    ???????        _&_&_&_&                %%%%
     >>>>                    _&_&_&_&    _&_&_&_&_&_&      %%%%  %%%
   >>>>         ??           _&_&_&_&      _&_&_&      %%%%  %% %%
 >>>>          ????           _&_&_&_&    _&_&_&      %%%%   %% %%
                ??              _&_&_&_&_&_&_&       %%%%     %%%
.SKIP
                   $$              @@@@@@@@
                   $$            @@@      @@@
               $$$$$$$$$$$$     @@   @@@@   @@
             $$$$               @@  @@  @@  @@
               $$$$$$$$$$       @@  @@  @@  @@
                       $$$$     @@  @@  @@  @@
             $$$$$$$$$$$$       @@   @@@@@@@@
                   $$            @@@
                   $$              @@@@@@@@@@@
.FILL
.PAGE
.LEFT MARGIN 0
.RIGHT MARGIN 60
.CENTER
^USER ^SPECIFICATION OF ^NEW ^CHARACTER ^FONTS
.CENTER
---- ------------- -- --- --------- -----
.SKIP
^THE ^^SUBROUTINE \\OR THE ^^BLOCK DATA \\ROUTINE WHICH DEFINES THE
CHARACTER SHAPES CONSTRUCTED BY ^^DATEXT \\IS ITSELF WRITTEN BY
ANOTHER PROGRAM NAMED ^^DAFONT \\WHICH READS A FILE WRITTEN BY THE
USER CONTAINING THE CHARACTERS DRAWN AS THEY WOULD BE CONSTRUCTED BY
^^DATEXT. DAFONT \\ASKS THE USER TO SPECIFY THE ^^SUBROUTINE \\NAME
WHICH IS TO BE INCLUDED IN THE ^^SUBROUTINE \\STATEMENT AND WILL
GENERATE A ^^BLOCK DATA \\ROUTINE INSTEAD IF NO NAME IS SUPPLIED.
.SKIP
^THE RULES GOVERNING THE CONSTRUCTION OF THE TEMPLATE FILE WHICH
^^DAFONT \\READS AS INPUT ARE AS FOLLOW.
.LEFT MARGIN 5
.SKIP
.INDENT -3
1.#^EACH CHARACTER SHAPE IS CONSTRUCTED ONLY OF THE CHARACTER WHICH
IT IS TO REPRESENT. ^SINCE ^^DATEXT \\CAN SELECT THE ^N'TH SHAPE BY
WHICH A PARTICULAR LETTER IS REPRESENTED, BOTH UPPER AND LOWER CASE
CHARACTERS CAN BE CONSTRUCTED IF IT IS NOT OBJECTIONABLE THAT THE
LOWER CASE SHAPES ARE CONSTRUCTED OF, AND SELECTED BY, THE
CORRESPONDING UPPER CASE CHARACTERS. ^THE ONLY PRECAUTION WHICH MUST
BE OBSERVED IF BOTH UPPER AND LOWER CASE SHAPES ARE TO BE AVAILABLE
BUT CONSTRUCTED OF THE UPPER CASE LETTERS IS THAT BOTH THE LOWER AND
UPPER CASE SHAPES FOR A PARTICULAR LETTER CANNOT BE DEFINED ON THE
SAME ROW OF SHAPES IN THE TEMPLATE FILE. ^ALSO, IF THE SECOND ROW OF
CHARACTER SHAPES IN THE TEMPLATE FILE DEFINES THE ALTERNATE CASE
SHAPE OF A CHARACTER IN THE FIRST ROW, THEN THE FIRST AND SECOND
ROWS OF CHARACTER SHAPES SHOULD BE SEPARATED BY ONE OR MORE BLANK
LINES. ^OF COURSE, IF THE ^^FORTRAN \\COMPILER AND RUNTIME SYSTEM
BOTH ALLOW LOWER CASE LETTERS, AND NEITHER TRANSLATES SUCH TO UPPER
CASE, THEN THE LOWER CASE LETTERS CAN BE SELECTED BY, AND BE FORMED,
OF THE LOWER CASE LETTERS BEING REPRESENTED.
.INDENT -3
2.#^THE FIRST ROW OF CHARACTER SHAPES IN THE TEMPLATE FILE BEGINS ON
THE NEXT NONBLANK LINE FOLLOWING THE FIRST LINE, AND EXTENDS TO
EITHER THE NEXT BLANK LINE IN THE FILE, OR TO THE NEXT LINE WHICH
CONTAINS NO CHARACTER ALREADY FOUND IN THE PREVIOUS LINES. ^THE
FIRST ROW OF CHARACTER SHAPE SPECIFICATIONS MUST BE OF MAXIMUM
HEIGHT. ^THE CONTENTS OF THE FIRST LINE OF THE INPUT FILE IS WRITTEN
DIRECTLY INTO THE OUTPUT AS A COMMENT LINE. ^THE LETTER ^C IS PLACED
AT THE START OF THIS OUTPUT LINE TO CAUSE IT TO BE IGNORED BY THE
^^FORTRAN \\COMPILER. ^IT IS SUGGESTED THAT THIS COMMENT LINE
CONTAIN A SHORT DESCRIPTION OF THE MATRIX UPON WHICH THE LETTERS ARE
DESIGNED.
.INDENT -3
3.#^SUBSEQUENT ROWS OF CHARACTER SHAPES START AT THE NEXT NONBLANK
LINE AND EXTEND THROUGH THE NUMBER OF LINES ESTABLISHED BY THE FIRST
ROW AS BEING THE CHARACTER SHAPE HEIGHT, OR EXTEND TO BUT DO NOT
INCLUDE THE NEXT LINE WHICH BEGINS THE SPECIFICATION OF THE SHAPE OF
A DIFFERENT CHARACTER OR CHARACTERS BUT WHICH DOES NOT CONTAIN ANY
OF THE CHARACTERS BEING DEFINED IN THE CURRENT ROW OF SHAPES. ^A ROW
OF CHARACTER SHAPES IS TOP JUSTIFIED IF THE ROW (AS OPPOSED TO THE
SHAPES WITHIN THE ROW) IS SHORTER THAN THE HEIGHT ESTABLISHED BY THE
FIRST ROW OF SHAPES.
.INDENT-3
4.#^CHARACTER SHAPES CAN CONTAIN HORIZONTAL ROWS AND VERTICAL
COLUMNS OF SPACES. ^CHARACTER SHAPES SPECIFIED ON THE SAME ROW CAN
BE SEPARATED BY SPACES OR CAN TOUCH, BUT CANNOT OVERLAP.
.INDENT -3
5.#^IF THE SHAPE OF A CHARACTER HAS ALREADY BEEN FOUND ON THE
CURRENT ROW OF CHARACTER SHAPE SPECIFICATIONS, THE NEW (RIGHT)
DEFINITION OF THE SHAPE IS IGNORED.
.INDENT -3
6.#^IF THE ^^FORTRAN \\SYSTEM DOES NOT ALLOW END-OF-FILE TESTS IN
^^READ \\STATEMENTS, THEN THE TEMPLATE FILE MUST BE TERMINATED BY
THE LETTERS ^^END \\ON A FINAL LINE NOT PART OF THE PRECEDING ROW OF
CHARACTER SHAPE SPECIFICATIONS.
.INDENT -3
7.#^UNLESS THE LIMITS AND DIMENSIONS IN THE ^^DAFONT \\PROGRAM ARE
CHANGED, ONLY THE FIRST 80 CHARACTERS ON A LINE ARE READ, A
CHARACTER SHAPE CAN BE NO MORE THAN 30 LINES HIGH, AND AT MOST 96
SHAPES CAN BE DEFINED.
.INDENT -3
8.#^THE MAXIMUM WIDTH OF ANY CHARACTER IS THE NUMBER OF BITS,
EXCLUDING THE SIGN BIT, IN A SINGLE COMPUTER WORD. ^THIS MEANS THAT
LETTER SHAPES UP TO 31 BITS WIDE CAN BE REPRESENTED ON AN ^^IBM 360
\\OR 370 COMPUTER.
.LEFT MARGIN 0
.SKIP
.SKIP 2
.CENTER
^A ^SAMPLE ^TEMPLATE ^FILE
.CENTER
- ------ -------- ----
.SKIP
^ON THE FOLLOWING PAGE IS SHOWN A SAMPLE TEMPLATE FILE. ^THE SHAPES
OF ONLY A FEW OF THE LETTERS ARE DEFINED IN THIS TEMPLATE FILE. ^AS
LONG AS THE CHARACTER SHAPES DO NOT OVERLAP, THE HORIZONTAL SPACING
BETWEEN SHAPES IS OPTIONAL. ^SIMILARLY, EXTRA BLANK LINES CAN
SEPARATE THE ROWS OF SHAPES. ^ON THE ^^PDP-10 \\COMPUTER, A BLANK
LINE MUST CONTAIN AT LEAST 1 SPACE TO BE RECOGNIZED BY A ^^FORTRAN
\\PROGRAM. ^THIS MEANS THAT THE BLANK LINE IN THE DEFINITION OF THE
SHAPE OF THE NUMBER SIGN CONTAINS AT LEAST ONE SPACE.
.SKIP
^IT SHOULD BE NOTED THAT IN THIS SAMPLE TEMPLATE FILE, A SECOND
SPECIFICATION OF THE SHAPE OF THE CHARACTER ^S ON THE SAME ROW OF
SHAPES AS THE FIRST HAS BEEN USED TO FORCE THE CORRECT VERTICAL
POSITION OF THE LOWER CASE SHAPES OF THE LETTERS ^S AND ^A. ^THE
SECOND SPECIFICATION OF THE LETTER ^S, IN THIS CASE A VERTICAL LINE,
IS IGNORED FOR OTHER THAN DETERMINATION OF THE FIRST LINE OF THE ROW
OF SHAPES. ^HOWEVER, IF THE VERTICAL LINE FORMED OF THE LETTER ^S
WAS NOT SEPARATED FROM THE FIRST SHAPE OF THE LETTER ^S BY THE SHAPE
OF SOME OTHER CHARACTER, THEN THE 2 PARTS WOULD HAVE BEEN TAKEN
TOGETHER AS THE SPECIFICATION OF THE SHAPE OF THE LETTER. ^THIS IS
NECESSARY IF CHARACTERS ARE TO BE ALLOWED TO BE FORMED FROM MORE
THAN 1 GROUP OF CHARACTERS, AND IS NECESSARY FOR SPECIFICATION OF
THE SHAPE OF THE CHARACTER _#.
.SKIP
^THE SAMPLE TEMPLATE FILE DEFINES THE LOWER CASE LETTER SHAPES G L I
S AND A, THE CHARACTER SHAPES : AND _#, AND THE UPPER CASE LETTER
SHAPES ^^S A I \\AND ^L. ^THE FIRST LINE CONTAINS A COMMENT TO BE
WRITTEN INTO THE OUTPUT FILE ON A LINE CONTAINING THE LETTER ^C IN
COLUMN 1. ^THE FINAL LINE CONTAINING THE WORD ^^END \\SIGNALS THE
END OF THE FILE AND IS OTHERWISE IGNORED.
.SKIP
.NOFILL
^^SAMPLE TEMPLATE FILE, THIS LINE CONTAINS A COMMENT
     LLL      II
       L      II
    G  L
 GGG   L     III
G   G  L       I
G   G  L       I
 GGG LLLLL   IIIII
    G
GGGG
             S
             S
 SSS AAAA    S
S        A   S
 SSS  AAAA   S
    SA   A   S
SSSS  AAA A  S
             S
             S
::  _# _#
::  _# _#
  _#_#_# _#_#_#
#
  _#_#_# _#_#_#
::  _# _#
::  _# _#
 SSSSS    A   IIIIIIIL
S        A A     I   L
S       A   A    I   L
 SSSSS A     A   I   L
      SAAAAAAA   I   L
      SA     A   I   L
SSSSSS A     AIIIIIIILLLLLLL
END
.PAGE
.LEFT MARGIN 0
.FILL
.CENTER
A S\\AMPLE ^^BLOCK DATA R\\OUTINE ^DEFINING A ^SHORT ^FONT
.CENTER
- ------ ----- ---- ------- -------- - ----- ----
.SKIP
^^DAFONT \\PRODUCED THE FOLLOWING ^^FORTRAN BLOCK DATA \\ROUTINE AS
OUTPUT WHEN IT READ THE TEMPLATE FILE SHOWN ON THE PRECEDING PAGE.
.NOFILL
.SKIP
.LEFT MARGIN 0
      ^^BLOCK DATA
CSAMPLE TEMPLATE FILE, THIS LINE CONTAINS A COMMENT
      COMMON/FASPG/KNTLTR,IHIGH,IWIDE,JWIDE,LOCK,
     1LETTER(96),LENGTH(96),IPACKD( 672)
      DIMENSION JLETTR( 11)
      DATA JLETTR/
     11HG,1HL,1HI,1HS,1HA,1H:,1H_#,1HS,1HA,1HI,
     11HL/
      DIMENSION JLNGTH(11),JLNGT1(11)
      EQUIVALENCE (JLNGT1(1),JLNGTH(1))
      DATA JLNGT1/5,5,5,5,6,2,7,7,7,7,7/
      DIMENSION JPACKD(99),JPACK1(99)
      EQUIVALENCE (JPACK1(1),JPACKD(1))
      DATA JPACK1/  0,  0,  1, 14, 17, 17, 14,  1, 30, 28,
     1              4,  4,  4,  4,  4, 31,  0,  0, 12, 12,
     2              0, 28,  4,  4, 31,  0,  0,  0,  0, 14,
     3             16, 14,  1, 30,  0,  0,  0,  0, 60,  2,
     4             30, 34, 29,  0,  0,  3,  3,  0,  0,  0,
     5              3,  3,  0,  0, 20, 20,119,  0,119, 20,
     6             20,  0,  0, 62, 64, 64, 62,  1,  1,126,
     7              0,  0,  8, 20, 34, 65,127, 65, 65,  0,
     8              0,127,  8,  8,  8,  8,  8,127,  0,  0,
     9             64, 64, 64, 64, 64, 64,127,  0,  0/
      DATA KNTLTR,IHIGH,IWIDE,JWIDE,LOCK/ 11, 9, 7, 7,999/
      EQUIVALENCE           (LETTER(1),JLETTR(1)),
     1(LENGTH(1),JLNGTH(1)),(IPACKD(1),JPACKD(1))
      END
.FILL
.PAGE
.CENTER
D\\EMONSTRATION ^PROGRAM TO ^DISPLAY ^ENTIRE ^CONTENTS OF A ^FONT
.CENTER
------------- ------- -- ------- ------ -------- -- - ----
.SKIP
^THE PROGRAM LISTED BELOW WAS USED TO GENERATE MOST OF THE FONT
ILLUSTRATIONS PRESENTED EARLIER IN THIS DOCUMENT. ^SINCE ALL OF THE
SHAPES FOR EACH CHARACTER MUST BE SHOWN, YET EACH LINE OF
CONSTRUCTED CHARACTER SHAPES CAN CONTAIN ONLY A SMALL PORTION OF THE
TOTAL AVAILABLE CHARACTER SHAPES, THE PROGRAM FIRST INSERTS A DOLLAR
SIGN AND CASE IDENTIFICATION DIGIT IN FRONT OF EACH CHARACTER SO
THAT EACH OF THE ALTERNATIVE SHAPES FOR ANY CHARACTER CAN BE
SELECTED INDEPENDENTLY. ^AN EXTRA DOLLAR SIGN IS ALSO INSERTED
BEFORE EACH DOLLAR SIGN FOR WHICH THE SHAPE IS DESCRIBED IN THE FONT
SO THAT ^^DATEXT \\DOES NOT INCORRECTLY INTERPRET THE ORIGINAL
DOLLAR SIGN AS THE START OF A COMMAND CHARACTER PAIR. ^ONCE A LINE
OF CHARACTER SHAPES HAS BEEN CONSTRUCTED, THE FOLLOWING DOLLAR
SIGN-DIGIT PAIR WILL HAVE BEEN PROCESSED, SO THE PROGRAM BACKS UP TO
THE PREVIOUS DOLLAR SIGN-DIGIT PAIR PRIOR TO CONSTRUCTING THE NEXT
LINE OF CHARACTER SHAPES. ^THE PROGRAM USES THE LARGEST
INTERCHARACTER SPACING WHICH WILL NOT REDUCE THE NUMBER OF CHARACTER
SHAPES INCLUDED ON THE LINE. ^A ZERO INTERCHARACTER SPACING IS
ALLOWED ONLY IF THE CHARACTERS ON THE LINE ARE EXTREMELY LARGE.
.SKIP
.NOFILL
^^C     RENBR(LTRALL/DISPLAY ALL CHARACTERS IN A FONT)
      DIMENSION IBUFFR(60),LTTR(300),KASE(300),IDIGIT(10)
      COMMON/FASPG/KNTLTR,IHIGH,IWIDE,JWIDE,LOCK,
     1LETTER(96),LENGTH(96),IPACKD(672)
C
C     KOLUMN = 0, PACK AS MANY CHARACTERS  AS  POSSIBLE  ON
C              EACH  LINE.   THIS  OPTION  IS  BEST IF MOST
C              COMMON WIDTH IS CONSIDERABLY  NARROWER  THAN
C              WIDEST CHARACTER.
C            = 1, ARRANGE CHARACTERS IN COLUMNS AS WIDE  AS
C              WIDEST  CHARACTER.   THIS  OPTION IS BEST IF
C              MOST COMMON WIDTH IS ONLY SLIGHTLY LESS THAN
C              WIDEST CHARACTER.
      DATA KOLUMN/0/
      DATA IDIGIT/1H1,1H2,1H3,1H4,1H5,1H6,1H7,1H8,1H9,1H0/
      DATA IDISK/5/
      DATA KOMAND,ISPACE/1H$,1H /
      IF(LOCK.NE.999)GO TO 23
C
C     KASE ARRAY HOLDS WIDTHS AND MARKS CHARACTER LOCATIONS
      DO 1 I=1,300
    1 KASE(I)=0
C
C     INSERT CASE NUMBER BEFORE EACH LETTER AND $ BEFORE $
      LTREND=0
      DO 3 INDEX=1,KNTLTR
      ISAME=0
      DO 2 I=1,INDEX
      IF(LETTER(INDEX).EQ.LETTER(I))ISAME=ISAME+1
    2 CONTINUE
      IF(ISAME.GT.10)ISAME=10
      LTREND=LTREND+3
      KASE(LTREND-2)=LENGTH(INDEX)
      LTTR(LTREND-2)=KOMAND
      LTTR(LTREND-1)=IDIGIT(ISAME)
      LTTR(LTREND)=LETTER(INDEX)
      IF(LETTER(INDEX).NE.KOMAND)GO TO 3
      LTREND=LTREND+1
      LTTR(LTREND)=KOMAND
    3 CONTINUE
      LTRBGN=1
      MAXMUM=0
C
C     DETERMINE INTERCHARACTER SPACING AND IF TAILS USED.
C     ALLOW 0 SPACING IF NEXT 3 CHARACTERS USE FULL WIDTH
    4 LINE=IHIGH
      IDONE=-1
      JSTIFY=-1
      IF(KOLUMN.NE.0)GO TO 7
      MOVE=1
      J=0
      K=-1
      DO 5 I=LTRBGN,LTREND
      IF(KASE(I).EQ.0)GO TO 5
      J=J+1
      K=K+KASE(I)+1
      IF(K.GT.60)GO TO 8
      IF(J.GE.3)GO TO 6
    5 CONTINUE
    6 INTRVL=1
      GO TO 9
    7 MOVE=-2
      IF(IWIDE.NE.JWIDE)GO TO 8
      IF(JWIDE.LT.20)GO TO 6
    8 INTRVL=0
    9 MAXUSD=0
      CALL DATEXT(LINE,JSTIFY,0,INTRVL,MOVE,
     11,LTTR,LTRBGN,LTREND,0,60,60,
     2IBUFFR,MAXUSD,MAXLIN,LTRNXT)
      IF(IDONE.EQ.0)GO TO 12
      IF(IDONE.GT.0)GO TO 15
      DO 10 I=1,MAXUSD
      IF(IBUFFR(I).NE.ISPACE)GO TO 11
   10 CONTINUE
      LINE=LINE-1
      IF(LINE.GT.1)GO TO 9
   11 IDONE=0
      NEEDED=LTRNXT
      LSTUSD=MAXUSD
      GO TO 13
   12 IF(MAXUSD.LE.LSTUSD)GO TO 14
      IF(NEEDED.NE.LTRNXT)GO TO 14
   13 INTRVL=INTRVL+1
      IF(LTRNXT.LE.LTREND)GO TO 9
      IF(INTRVL.LE.MAXMUM)GO TO 9
C
C     GENERATE LETTERS WITHOUT WHITE ADJUSTMENT IF POSSIBLE
   14 INTRVL=INTRVL-1
      IF(MAXMUM.LT.INTRVL)MAXMUM=INTRVL
      IDONE=1
      LIMIT=LINE
      LINE=1
      IF(KOLUMN.NE.0)GO TO 9
      MOVE=0
      JSTIFY=0
      GO TO 9
   15 IF(LTRNXT.EQ.NEEDED)GO TO 17
      MOVE=1
      GO TO 9
   16 IF(IBUFFR(MAXUSD).NE.ISPACE)GO TO 19
      MAXUSD=MAXUSD-1
   17 IF(MAXUSD.GT.0)GO TO 16
      IF(IDONE.EQ.1)GO TO 21
      WRITE(IDISK,18)
   18 FORMAT(1X)
      GO TO 21
   19 IDONE=2
      WRITE(IDISK,20)(IBUFFR(I),I=1,MAXUSD)
   20 FORMAT(1X,132A1)
   21 LINE=LINE+1
      IF(LINE.LE.LIMIT)GO TO 9
      IF(LTRNXT.GT.LTREND)GO TO 25
      WRITE(IDISK,18)
      LTRBGN=LTRNXT
   22 IF(KASE(LTRBGN).NE.0)GO TO 4
      LTRBGN=LTRBGN-1
      GO TO 22
   23 WRITE(IDISK,24)
   24 FORMAT(16H FONT NOT LOADED)
   25 STOP
      END
.FILL
.LEFT MARGIN 0
.FILL
.LEFT MARGIN 0
.SUBTITLE ^^DATREE R\\ETURNS ^NEXT ^LINE IN ^REPRESENTATION OF ^TREE ^STRUCTURE
.PAGE
.LEFT MARGIN 0
.NOFILL
 ^^DDDDD          AAA  TTTTTTTT  RRRRRR    EEEEEEEE  EEEEEEEE
 DD   DD       AAAA     TT     RR    RR  EE        EE
 DD    DD     AA AA     TT     RR    RR  EE        EE
 DD    DD    AA  AA     TT     RRRRRR    EEEEE     EEEEE
 DD    DD   AAAAAAA     TT     RR  RR    EE        EE
 DD   DD   AA    AA     TT     RR   RR   EE        EE
 DDDDD    AA     AA     TT     RR    RR  EEEEEEEE  EEEEEEEE
.SKIP 2
.CENTER
DATREE R\\ETURNS ^NEXT ^LINE IN ^REPRESENTATION OF ^TREE ^STRUCTURE
.CENTER
------ ------- ---- ---- -- -------------- -- ---- ---------
.SKIP
.FILL
^SIMPLE TREE STRUCTURES, SUCH AS THE CALLING SEQUENCES OF THE
SUBROUTINES WITHIN A COMPUTER PROGRAM, CAN BE REPRESENTED BY A TYPED
(OR PRINTED) NOTATION IN WHICH THE ROOT IS PLACED IN THE LEFT
COLUMN, THOSE NODES WHICH LIE IMMEDIATELY ABOVE THE ROOT ARE PLACED
IN THE SECOND COLUMN, THOSE WHICH ARE ABOVE THE NODES IN THE SECOND
COLUMN ARE PLACED IN THE THIRD COLUMN, AND SO ON. ^AS A TYPICAL
EXAMPLE, THE CALLING HIERARCHY OF THE DEMONSTRATION PROGRAM
PRESENTED IN THE ^^DALOAD \\DOCUMENTATION IN THIS MANUAL CAN BE
REPRESENTED BY THE FOLLOWING CONVENTIONALLY DRAWN REPRESENTATION IN
WHICH REFERENCES TO ROUTINES NOT IN ^^FASP \\HAVE BEEN EXCLUDED
.SKIP
.NOFILL
                                      ^^DAHEFT
                                         *
                                         *
                                      DASPAN
DANUMB                                   *
  *                                      *
  *                                   DANEXT  DANUMB  DARITE
DALONE          DANUMB                     **     *     **
  *               *                          **   *   **
  *               *                            ** * **
DALIST  DALOAD  DALONE  DAPICK  DAROLL  DASITE  DAVARY
    ***      **     *     *     *     **      ***
       ***     **    *    *    *    **     ***
          ***    **   *   *   *   **    ***
             ***   **  *  *  *  **   ***
                DEMONSTRATION PROGRAM
.SKIP
.FILL
I\\F THIS TREE IS ROTATED CLOCKWISE 90 DEGREES, THE CALLING
HIERARCHY OF THE PROGRAM CAN BE REPRESENTED AS SHOWN BELOW
.SKIP
.NOFILL
.TEST PAGE 9
       ^^MAIN      DALIST    DALONE    DANUMB
       MAIN      DALOAD
       MAIN      DALONE    DANUMB
       MAIN      DAPICK
       MAIN      DAROLL
       MAIN      DASITE
       MAIN      DAVARY    DANEXT    DASPAN    DAHEFT
       MAIN      DAVARY    DANUMB
       MAIN      DAVARY    DARITE
.SKIP
.FILL
.TEST PAGE 2
.FILL
A\\N ARRAY PREPARED BY THE CALLING PROGRAM AND INPUT TO ^^DATREE
\\AS AN ARGUMENT DESCRIBES THE TREE STRUCTURE EITHER IN TERMS OF
WHICH ITEMS ARE CONNECTED TO AND LIE ABOVE WHICH ITEMS, OR ELSE IN
TERMS OF WHICH ITEMS ARE CONNECTED TO AND LIE BELOW WHICH ITEMS.
^EACH DIFFERENT ITEM IN THE TREE MUST BE IDENTIFIED IN THIS ARRAY BY
A UNIQUE NUMBER. ^FOR THE TREE SHOWN ON THE PREVIOUS PAGE, EACH
APPEARANCE OF ^^DALONE \\WOULD BE IDENTIFIED BY THE SAME NUMBER,
PERHAPS 4, BUT THIS NUMBER WOULD BE DIFFERENT FROM THAT USED FOR ANY
OTHER ITEM IN THE TREE. ^WHETHER THE NUMBERS EMPLOYED REPRESENT
PACKED CHARACTER CODES OR ARE SUBSCRIPTS IN SOME OTHER ARRAY, OR
WHATEVER, WILL DEPEND UPON HOW THESE ARE USED BY THE MAIN PROGRAM.
^IT IS ONLY NECESSARY THAT ^^DATREE, \\TREATING THESE NUMBERS AS
SINGLE PRECISION INTEGERS, BE ABLE TO COMPARE THE ITEM IDENTIFIERS
TO FIND WHICH REFER TO THE SAME ITEM.
.SKIP
^FOR EACH ITEM WHICH EXTENDS THE TREE, THE ARRAY DESCRIBING THE TREE
CONTAINS THE ITEM IDENTIFIER FOLLOWED BY THE IDENTIFIERS OF ALL
THOSE ITEMS WHICH ARE EITHER CONNECTED TO IT AND LIE ABOVE IT IN THE
TREE OR WHICH ARE CONNECTED TO IT AND LIE BELOW IT IN THE TREE.
^REGARDLESS OF WHICH NOTATION IS EMPLOYED, EACH GROUP OF ITEM
IDENTIFIERS IS PRECEDED BY THE NUMBER OF ITEMS INCLUDED WITHIN THE
GROUP. ^FOR EXAMPLE, IF THE FOLLOWING NUMERIC ASSIGNMENTS ARE MADE
.NOFILL
                                                   0=^^MAIN
 1=DAHEFT  2=DALIST  3=DALOAD  4=DALONE  5=DANEXT  6=DANUMB
 7=DAPICK  8=DARITE  9=DAROLL 10=DASITE 11=DASPAN 12=DAVARY
.SKIP
.FILL
\\THEN THE INPUT ARRAY MIGHT CONTAIN THE FOLLOWING IF THE FIRST ITEM
IN EACH GROUP IS BELOW (TO THE LEFT OF) THE REST
.SKIP
.NOFILL
 8, 0(^^MAIN  ), 2(DALIST), 3(DALOAD), 4(DALONE), 7(DAPICK),
    9(DAROLL),10(DASITE),12(DAVARY)
 2, 2(DALIST), 4(DALONE)
 2, 4(DALONE), 6(DANUMB)
 4,12(DAVARY), 5(DANEXT), 6(DANUMB), 8(DARITE)
 2, 5(DANEXT),11(DASPAN)
 2,11(DASPAN), 1(DAHEFT)
.SKIP
.FILL
\\OR ELSE THE INPUT ARRAY MIGHT CONTAIN THE FOLLOWING IF THE FIRST
ITEM IN EACH GROUP IS ABOVE (TO THE RIGHT OF) THE REST
.NOFILL
.SKIP
 2, 1(^^DAHEFT),11(DASPAN)
 2, 2(DALIST), 0(MAIN  )
 2, 3(DALOAD), 0(MAIN  )
 3, 4(DALONE), 0(MAIN  ), 2(DALIST)
 2, 5(DANEXT),12(DAVARY)
 3, 6(DANUMB), 4(DALONE),12(DAVARY)
 2, 7(DAPICK), 0(MAIN  )
 2, 8(DARITE),12(DAVARY)
 2, 9(DAROLL), 0(MAIN  )
 2,10(DASITE), 0(MAIN  )
 2,11(DASPAN), 5(DANEXT)
 2,12(DAVARY), 0(MAIN  )
.SKIP
.FILL
E\\ACH SUCCESSIVE CALL TO ^^DATREE \\IDENTIFIES TO THE CALLING
PROGRAM WHICH ITEMS ARE TO APPEAR UPON THE NEXT LINE OF THE TYPED
REPRESENTATION OF THE TREE. ^^DATREE \\ALSO SPECIFIES WHICH ITEM
WITHIN THE LINE IS THE LEFTMOST ITEM WHICH DID NOT APPEAR WITHIN THE
PREVIOUS LINE OF THE REPRESENTATION OF THE TREE. ^THE TREE DISPLAY
IS MORE LEGIBLE IF THE DUPLICATE APPEARANCES OF THE ITEMS AT THE
LEFT SIDE OF THE TREE ARE REMOVED AS IN THE ILLUSTRATION SHOWN BELOW
.SKIP
.NOFILL
.TEST PAGE 9
       ^^MAIN      DALIST    DALONE    DANUMB
       .         DALOAD
       .         DALONE    DANUMB
       .         DAPICK
       .         DAROLL
       .         DASITE
       .         DAVARY    DANEXT    DASPAN    DAHEFT
       .         .         DANUMB
       .         .         DARITE
.SKIP 2
.FILL
.CENTER
T\H\E DATREE A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DATREE \I\S
.SKIP
.NOFILL
      SUBROUTINE DATREE(KLIMB ,KOMPAR,ITYPE ,MINNOD,MAXNOD,
     1    NODES ,MINCLM,MAXCLM,NOWCLM,KOLUMN,INITAL,KIND  ,
     2    NEWCLM)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION NODES(MAXNOD),KOLUMN(MAXCLM),INITAL(MAXCLM)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT TO THIS ROUTINE AND ARE
RETURNED UNCHANGED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KLIMB##=#0, \\THE ENTIRE TREE IS TO BE REPRESENTED BY THE CURRENT
SERIES OF CALLS TO THIS ROUTINE.
.INDENT -2
=#1, ONLY THE PORTION OF THE TREE STARTING AT THE ITEM HAVING AN
IDENTIFICATION NUMBER IN THE ^^NODES \\ARRAY WHICH IS EQUAL TO THE
INPUT VALUE OF ^^KOMPAR \\IS TO BE REPRESENTED.
.SKIP
.INDENT -9
^^KOMPAR#=#\I\F KLIMB=1, \\THEN ^^KOMPAR \\IS EQUAL TO THE NUMBER IN
THE ^^NODES \\ARRAY WHICH IDENTIFIES THE ITEM AT THE BOTTOM (LEFT
END) OF THE PORTION OF THE TREE WHICH IS TO BE REPRESENTED. ^ANY
ITEMS WHICH ARE BELOW (TO THE LEFT OF) THIS ITEM WILL NOT BE
INCLUDED IN THE REPRESENTATION.
.SKIP
.INDENT -9
^^ITYPE##=#0, \\EACH GROUP IN THE ^^NODES \\ARRAY CONSISTS OF THE
NUMBER OF ITEMS WHICH ARE IDENTIFIED IN THE GROUP FOLLOWED BY A
NUMBER WHICH UNIQUELY IDENTIFIES AN ITEM AND THEN BY NUMBERS WHICH
UNIQUELY IDENTIFY SOME OR ALL OF THE ITEMS ABOVE (TO THE RIGHT OF)
AND CONNECTED TO THE FIRST ITEM. ^THE ^^NODES \\ARRAY IS TERMINATED
BY A GROUP CONTAINING ONLY A SINGLE ZERO. ^IF ITEM 10 IS BELOW (TO
THE LEFT OF) AND CONNECTED TO 11 AND 12, AND ITEM 11 IS BELOW (TO
THE LEFT OF) AND CONNECTED TO 12 AND 13, SO THAT THE TREE MIGHT BE
REPRESENTED AS
.SKIP
.NOFILL
.TEST PAGE 13
                                       13
                                      *
13        12                         *
  *      *                          *
   *    *                         11
    *  *                         *  *
     11        12     OR        *    *
       *      *                *      *
        *    *               10        12
         *  *                  *
          10                    *
                                 *
                                  12
.SKIP
.FILL
THEN THE ^^NODES \\ARRAY WOULD CONTAIN
.SKIP
.INDENT 5
3, 10, 11, 12, 3, 11, 12, 13, 0
.SKIP
OR EVEN
.SKIP
.INDENT 5
2, 10, 11, 2, 11, 12, 2, 10, 12, 2, 11, 13, 0
.SKIP
AND THE ^^KOLUMN \\ARRAY WOULD THEN BE RETURNED CONTAINING THE
SUBSCRIPTS OF THE ^^NODES \\ARRAY LOCATIONS WHICH IN TURN CONTAIN
THE FOLLOWING VALUES
.SKIP
.NOFILL
     10, 11, 12 AFTER THE 1ST CALL TO THIS ROUTINE
     10, 11, 13 AFTER THE 2ND CALL TO THIS ROUTINE
     10, 12     AFTER THE 3RD CALL TO THIS ROUTINE
.FILL
.SKIP
^IT SHOULD BE NOTED THAT IF THE APPLICATIONS OF ^^ITYPE=0 \\AND 1
ARE REVERSED, THEN THIS ROUTINE RETURNS THE ROUTES BY WHICH THE TIPS
OF THE BRANCHES OF THE TREE ARE REACHED, RATHER THAN THE ROUTES
EXTENDING FROM THE ROOT. ^FOR EXAMPLE, IF THE ABOVE ^^NODES \\ARRAY
CONTENTS WERE INTERPRETED WITH ^^ITYPE=1 \\RATHER THAN 0, THEN THE
FOLLOWING VALUES WOULD BE RETURNED INSTEAD
.SKIP
.NOFILL
     12, 10     AFTER THE 1ST CALL TO THIS ROUTINE
     12, 11, 10 AFTER THE 2ND CALL TO THIS ROUTINE
     13, 11, 10 AFTER THE 3RD CALL TO THIS ROUTINE
.FILL
.SKIP
.INDENT -2
=#1, EACH GROUP IN THE ^^NODES \\ARRAY CONSISTS OF THE NUMBER OF
ITEMS IDENTIFIED IN THE GROUP FOLLOWED BY A NUMBER WHICH UNIQUELY
IDENTIFIES AN ITEM AND THEN BY NUMBERS WHICH UNIQUELY IDENTIFY SOME
OR ALL OF ITEMS BELOW (TO THE LEFT OF) AND CONNECTED TO THE FIRST
ITEM. ^THE ^^NODES \\ARRAY IS TERMINATED BY A GROUP CONTAINING ONLY
A SINGLE ZERO. ^FOR THE ABOVE EXAMPLE IN WHICH 12 IS ABOVE AND
CONNECTED TO BOTH 10 AND 11, IN WHICH 11 IS ABOVE AND CONNECTED TO
10 AND IN WHICH 13 ABOVE AND CONNECTED TO 11, THE NODES ARRAY WOULD
CONTAIN
.SKIP
.INDENT 5
3, 12, 10, 11, 2, 11, 10, 2, 13, 11, 0
.SKIP
.INDENT -9
^^MINNOD#=#\\SUBSCRIPT OF THE LOCATION IN THE ^^NODES \\ARRAY WHICH
CONTAINS THE START OF THE DESCRIPTION OF THE TREE OR TREES WHICH ARE
TO BE REPRESENTED.
.SKIP
.INDENT -9
^^MAXNOD#=#\\DIMENSION OF THE ^^NODES \\ARRAY.
.SKIP
.INDENT -9
^^NODES##=#\\ARRAY CONTAINING THE DESCRIPTION OF WHICH ITEMS ARE
LINKED TO WHICH IN THE TREE.
.SKIP
.INDENT -9
^^MINCLM#=#\\SUBSCRIPT OF THE FIRST OF THE LOCATIONS IN THE ^^KOLUMN
\\ARRAY IN WHICH ARE TO BE RETURNED THE SUBSCRIPTS OF THE ^^NODES
\\ARRAY LOCATIONS WHICH IN TURN CONTAIN THE NUMBERS WHICH UNIQUELY
IDENTIFY THE ITEMS IN THE NEXT LINE IN THE REPRESENTATION OF THE TREE.
.SKIP
.INDENT -9
^^MAXCLM#=#\\SUBSCRIPT OF THE FINAL LOCATION IN THE ^^KOLUMN \\ARRAY
WHICH IS AVAILABLE FOR USE.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT MUST BE SET BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS FIRST CALLED, BUT THEREAFTER SHOULD NOT BE CHANGED
BY THE CALLING PROGRAM SINCE THIS ARGUMENT IS USED TO TRANSFER
INFORMATION FROM ONE CALL OF THIS ROUTINE TO THE NEXT.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^NOWCLM#=#\\MUST BE SET TO LESS THAN THE VALUE OF ^^MINCLM (\\THE
ACTUAL VALUE DOESN'T MATTER SINCE IT IS RESET INSIDE THE ROUTINE TO
^^MINCLM-1) \\BY THE CALLING PROGRAM BEFORE THIS ROUTINE IS FIRST
CALLED TO REPRESENT THE TREE OR TREES DESCRIBED BY THE ^^NODES
\\ARRAY. ^IF ^^NOWCLM \\IS INPUT SET TO LESS THAN THE VALUE OF
^^MINCLM, \\THEN THE FIRST LINE IN THE DESCRIPTION OF THE FIRST TREE
(OR OF THE TREE STARTING AT A ITEM HAVING AN IDENTIFICATION NUMBER
EQUAL TO THE VALUE OF ^^KOMPAR \I\F KLIMB=1) \\IS TO BE RETURNED TO
THE CALLING PROGRAM. ^^NOWCLM \\IS RETURNED CONTAINING THE HIGHEST
SUBSCRIPT USED IN THE ^^KOLUMN \\ARRAY TO REPRESENT THE CURRENT LINE
AND MUST BE SENT TO THE SUBSEQUENT CALL OF THIS ROUTINE UNCHANGED.
^IF ^^NOWCLM \\IS INPUT SET GREATER THAN OR EQUAL TO ^^MINCLM,
\\THEN THE NEXT LINE IN THE DESCRIPTION OF THE TREE CURRENTLY BEING
REPRESENTED IS TO BE RETURNED TO THE CALLING PROGRAM, OR ELSE, IF
^^KLIMB \\IS EQUAL TO ZERO AND IF THE PREVIOUS CALL TO THIS ROUTINE
HAS COMPLETED THE REPRESENTATION OF THE CURRENT TREE, THEN THE FIRST
LINE OF THE REPRESENTATION OF THE NEXT TREE IS TO BE RETURNED TO THE
CALLING PROGRAM.
.SKIP
.LEFT MARGIN 0
^THE FIRST OF THE FOLLOWING ARRAYS IS USED FOR RETURNING INFORMATION
TO THE CALLING PROGRAM. ^THE INFORMATION RETURNED IN BOTH OF THESE
ARRAYS MUST BE SUPPLIED UNCHANGED TO THE SUBSEQUENT CALL OF THIS
ROUTINE. ^THE VALUES IN THESE ARRAYS ARE IGNORED WHEN THIS ROUTINE
IS FIRST CALLED TO REPRESENT THE TREES DESCRIBED IN THE ^^NODES
\\ARRAY.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KOLUMN#=#\\ARRAY RETURNED CONTAINING THE SUBSCRIPTS OF THE
LOCATIONS IN THE ^^NODES \\ARRAY WHICH IDENTIFY THOSE ITEMS ON THE
CURRENT LINE. ^THE CONTENTS OF THIS ARRAY MUST NOT BE CHANGED
BETWEEN CALLS TO THIS ROUTINE UNTIL ^^KIND \\IS RETURNED CONTAINING
1 INDICATING THAT THE REPRESENTATION OF THE TREE HAS BEEN COMPLETED.
^THE CONTENTS OF THE ^^KOLUMN \\ARRAY ARE IGNORED WHEN THIS ROUTINE
IS CALLED WITH ^^NOWCLM \\LESS THAN ^^MINCLM.
.SKIP
.INDENT -9
INITAL#=#\\ARRAY DIMENSIONED THE SAME AS THE ^^KOLUMN \\ARRAY, BUT
WHICH IS USED ONLY FOR THE TRANSFER OF VALUES FROM ONE CALL OF THIS
ROUTINE TO THE NEXT. ^THE CONTENTS OF THIS ARRAY MUST NOT BE CHANGED
BETWEEN CALLS TO THIS ROUTINE UNTIL ^^KIND \\IS RETURNED CONTAINING
1 INDICATING THAT THE REPRESENTATION OF THE TREE HAS BEEN COMPLETED.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED ONLY FOR RETURNING INFORMATION TO
THE CALLING PROGRAM. ^THEIR INPUT VALUES ARE IGNORED.
.LEFT MARGIN 9
.SKIP
.INDENT -9
^^KIND###=#1, \\RETURNED IF THE REPRESENTATION OF THE TREE HAD BEEN
FINISHED BY THE PREVIOUS CALL TO THIS ROUTINE.
.INDENT -2
=#2, RETURNED IF A LINE IN THE REPRESENTATION IS BEING RETURNED IN
^^KOLUMN(MINCLM) \\THROUGH AND INCLUDING ^^KOLUMN(NOWCLM).
.INDENT -2
=#3, \\SAME AS ^^KIND=2 \\EXCEPT THAT THE REPRESENTATION IS
TERMINATED AFTER THE SECOND APPEARANCE OF A ITEM WHICH HAS ALREADY
APPEARED IN THE LINE.
.INDENT -2
=#4, SAME AS ^^KIND=2 \\EXCEPT THAT THERE WAS NOT ENOUGH SPACE IN
THE ^^KOLUMN \\ARRAY TO REPRESENT ALL OF THE ITEMS WHICH SHOULD BE
WITHIN THE CURRENT LINE.
.INDENT -2
=#5, ^^KLIMB \\WAS INPUT CONTAINING 1 AND ^^NOWCLM \\CONTAINING LESS
THAN THE VALUE OF ^^MINCLM \\INDICATING THAT THE REPRESENTATION OF A
PARTIAL TREE WAS DESIRED, BUT THE ITEM IDENTIFIED BY ^^KOMPAR
\\COULD NOT BE FOUND IN THE ^^NODES \\ARRAY. ^NO ITEMS ARE BEING
RETURNED IN ^^KOLUMN \\ARRAY, AND ^^NOWCLM \\IS RETURNED CONTAINING
^^MINCLM-1.
.SKIP
.INDENT -9
NEWCLM#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE LOWEST LOCATION
IN THE ^^KOLUMN \\ARRAY WHICH HAS BEEN RETURNED CHANGED BY THE
CURRENT CALL TO THIS ROUTINE. ^THE INPUT VALUE OF ^^NEWCLM \I\S
\\IGNORED.
.SKIP 2
.LEFT MARGIN 0
.CENTER
^DEMONSTRATION ^PROGRAM TO ^INTERACTIVELY ^TEST ^^DATREE
.CENTER
------------- ------- -- ------------- ---- ------
.SKIP
T\\HE PROGRAM LISTED BELOW INTERPRETS EACH LINE OF TEXT TYPED BY THE
USER AS A LIST OF ONE OR MORE SINGLE-LETTER NAMES OF THOSE ITEMS
WHICH ARE TO BE INCLUDED WITHIN A SINGLE GROUP IN THE DESCRIPTION OF
THE TREE STRUCTURE. ^THE TYPING OF AN EMPTY LINE, RATHER THAN A LIST
OF THE NAMES OF THE ITEMS TO BE PLACED INTO THE TREE, CAUSES THE
PROGRAM TO DISPLAY THE TREES WHICH WOULD RESULT IF THE TREE
DESCRIPTION IS INTERPRETED FIRST WITH ^^ITYPE=0, \\THEN WITH
^^ITYPE=1. T\\HE USER CAN THEN REQUEST THE DISPLAY OF SUB-TREES,
AGAIN FOR BOTH VALUES OF ^^ITYPE, \\BY SPECIFYING, ONE PER LINE, THE
LETTERS IDENTIFYING THE NODES TO BE USED AS ROOTS OF THE SUB-TREES.
^TYPING OF AN EMPTY LINE, INSTEAD OF THE LETTER IDENTIFYING A ROOT,
SIGNALS THAT THE USER IS GOING TO SPECIFY AN ENTIRELY NEW TREE
STRUCTURE.
.SKIP
.NOFILL
^^C     PROGRAM TO DEMONSTRATE DATREE ROUTINE
      DIMENSION IBUFFR(72),NODES(500),KODES(100),
     1INITAL(100),KOLUMN(100)
      DATA ITTY,JTTY/5,5/
C     MAXKNO = DIMENSION OF KODES ARRAY AND MAXIMUM OF
C              DIFFERENT LETTERS WHICH CAN BE RECOGNIZED.
      DATA MAXKNO/100/
      DATA MINCLM,MAXCLM,MINNOD,MAXNOD/12,100,20,500/
      DATA IDOT,ISPACE/1H.,1H /
C
C     ASK USER FOR DESCRIPTION OF TREE
      NOWCLM=MINCLM-1
    1 NODUSD=MINNOD-1
      KNOWN=0
    2 WRITE(JTTY,3)
    3 FORMAT(2H *,$)
      READ(ITTY,4)IBUFFR
    4 FORMAT(100A1)
C
C     INSERT SINGLE GROUP INTO NODES ARRAY
      LOCAL=0
      DO 8 I=1,72
      IF(IBUFFR(I).EQ.ISPACE)GO TO 8
      KOMPAR=0
    5 KOMPAR=KOMPAR+1
      IF(KOMPAR.GT.KNOWN)GO TO 6
      IF(IBUFFR(I).NE.KODES(KOMPAR))GO TO 5
      GO TO 7
    6 IF(KNOWN.LT.MAXKNO)KNOWN=KNOWN+1
      KOMPAR=KNOWN
      KODES(KNOWN)=IBUFFR(I)
    7 IF(LOCAL.EQ.0)NODUSD=NODUSD+1
      LOCAL=LOCAL+1
      NODUSD=NODUSD+1
      NODES(NODUSD)=KOMPAR
    8 CONTINUE
      IF(LOCAL.LE.0)GO TO 9
      I=NODUSD-LOCAL
      NODES(I)=LOCAL
      GO TO 2
C
C     ADD TERMINAL ZERO TO NODES ARRAY
    9 NODUSD=NODUSD+1
      NODES(NODUSD)=0
C
C     CYCLE THROUGH DISPLAY FOR ITYPE=0 AND 1
      KLIMB=0
   10 DO 15 JTYPE=1,2
      NOWCLM=MINCLM-1
      ITYPE=JTYPE-1
   11 CALL DATREE(KLIMB,KOMPAR,ITYPE,MINNOD,MAXNOD,
     1NODES,MINCLM,MAXCLM,NOWCLM,KOLUMN,INITAL,KIND,
     2NEWCLM)
      IF(KIND.EQ.1)GO TO 14
      IF(KIND.EQ.5)GO TO 14
      K=0
      DO 12 I=MINCLM,NOWCLM
      K=K+1
      IBUFFR(K)=IDOT
      J=KOLUMN(I)
      J=NODES(J)
   12 IF(I.GE.NEWCLM)IBUFFR(K)=KODES(J)
      WRITE(JTTY,13)KIND,NEWCLM,NOWCLM,(IBUFFR(I),I=1,K)
   13 FORMAT(1X,I1,2I3,1X,100A1)
      GO TO 11
   14 WRITE(JTTY,13)KIND,NEWCLM,NOWCLM
   15 CONTINUE
C
C     ASK USER FOR ORIGIN OF PARTIAL DISPLAY
      WRITE(JTTY,16)
   16 FORMAT(11H DETAIL OF ,$)
      READ(ITTY,4)LETTER
      IF(LETTER.EQ.ISPACE)GO TO 1
      KLIMB=1
      KOMPAR=0
   17 KOMPAR=KOMPAR+1
      IF(KOMPAR.GT.KNOWN)GO TO 10
      IF(LETTER.EQ.KODES(KOMPAR))GO TO 10
      GO TO 17
      END
.SKIP 2
.TEST PAGE 11
T\\YPICAL ^DIALOG ^BETWEEN ^^DATREE D\\EMONSTRATION ^PROGRAM AND ^USER
------- ------ ------- ------ ------------- ------- --- ----
.SKIP
.NOFILL
*^^ABCD
*BGI
*CIB
*DM
*MN
*IJK
*GHI
*
.TEST PAGE 14
2 12 15 ABGH        T\\HE VALUES OF ^^KIND,  NEWCLM  \\AND  ^^NOWCLM
2 15 16 ...IJ       \\ARE   DISPLAYED   TO  THE  LEFT  OF  THE
2 16 16 ....^K       REPRESENTATION OF THE  CONTENTS  OF  THE
2 14 15 ..^I^J        TREE ITSELF.  ^^KIND \\IS RETURNED TWICE SET
2 15 15 ...^K        TO 1, FIRST WHEN THE REPRESENTATION WITH
2 13 15 .^^CIJ        ITYPE=0  \\HAS  BEEN  COMPLETED, THEN WHEN
2 15 15 ...^K        THE REPRESENTATION WITH ^^ITYPE=1 \\HAS BEEN
2 14 16 ..^^BGH       \\COMPLETED.
2 16 17 ....^I^J
2 17 17 .....^K
2 15 16 ...^I^J
2 16 16 ....^K
2 13 15 .^^DMN
1 12 11
.TEST PAGE 14
2 12 15 NMDA
2 12 15 JIBA
2 15 16 ...CA
2 14 15 ..CA
2 14 16 ..GBA
2 16 17 ....CA
2 12 15 KIBA
2 15 16 ...CA
2 14 15 ..CA
2 14 16 ..GBA
2 16 17 ....CA
2 12 15 HGBA
2 15 16 ...CA
1 12 11
.TEST PAGE 11
DETAIL OF C
2 12 14 CIJ
2 14 14 ..K
2 13 15 .BGH
2 15 16 ...IJ
2 16 16 ....K
2 14 15 ..IJ
2 15 15 ...K
1 12 11
2 12 13 CA
1 12 11
DETAIL OF
.TEST PAGE 11
*JI                 T\\HIS IS THE SAME TREE  STRUCTURE  AS  IS
*^K^I                 SHOWN   ABOVE,  BUT  WITH  THE  LINKAGES
*^G^B                 REVERSED SO THAT  NOW  ^^ITYPE=1  \\PRODUCES
*^N^M                 THE SAME REPRESENTATION AS WAS GENERATED
*^M^D                 ABOVE FOR ^^ITYPE=0.
*CA
*BAC
*DA
*IBCG
*HG
*
.TEST PAGE 14
2 12 15 JIBA
2 15 16 ...CA
2 14 15 ..CA
2 14 16 ..GBA
2 16 17 ....CA
2 12 15 KIBA
2 15 16 ...CA
2 14 15 ..CA
2 14 16 ..GBA
2 16 17 ....CA
2 12 15 NMDA
2 12 15 HGBA
2 15 16 ...CA
1 12 11
.TEST PAGE 14
2 12 17 ACBGIJ
2 17 17 .....K
2 16 16 ....H
2 15 16 ...IJ
2 16 16 ....K
2 14 15 ..IJ
2 15 15 ...K
2 13 16 .BGIJ
2 16 16 ....K
2 15 15 ...H
2 14 15 ..IJ
2 15 15 ...K
2 13 15 .DMN
1 12 11
.TEST PAGE 11
DETAIL OF C
2 12 13 CA
1 12 11
2 12 16 CBGIJ
2 16 16 ....K
2 15 15 ...H
2 14 15 ..IJ
2 15 15 ...K
2 13 14 .IJ
2 14 14 ..K
1 12 11
DETAIL OF
.TEST PAGE 13
*AB                 T\\HIS CYCLIC STRUCTURE HAS  NO  ROOT  FOR
*^^BC                 ITYPE=0,  \\BUT  NODES  ^O  AND  ^N ARE BOTH
*^^CDH                \\ROOTS FOR ^^ITYPE=1.   N           O
*DE                                       <         >
*EF                                        <       >
*FA                       A > > B           I > > J
*HI                      >       >         >       >
*IJN                    >         >       >         >
*JKO                   F           C > > H           K
*KL                     <         <       <         <
*LM                      <       <         <       <
*MH                       E < < D           M < < L
*
.TEST PAGE 14
1 12 11             E\\FFECTIVE STRUCTURE FOR ^^ITYPE=0 \\AND NODE
3 12 21 ^^NIHCBAFEDC  F  \\AS  ROOT  IS  SHOWN BELOW.  ^RINGS ARE
3 15 19 ...^^MLKJI    \\TERMINATED WHEN THEY RETURN TO  STARTING
3 12 22 ^^OJIHCBAFEDC \\NODES ^F AND ^^H.       N           O
3 16 19 ....MLKJ                          <         >
1 12 11                                    <       >
DETAIL OF F               A > > B           I > > J
3 12 18 FABCDEF          >       >         >       >
3 16 22 ....HIJKLMH   ***         >       >         >
2 19 19 .......O      *F*          C > > H           K
2 18 18 ......N       ***         <                 <
1 12 11                          <                 <
3 12 18 FEDCBAF     F < < E < < D     H < < M < < L
1 12 11
.TEST PAGE 8
DETAIL OF C         F > > A > > B     R\\IGHT RING IS NOT
3 12 18 ^^CDEFABC                  >    \\INCLUDED WHEN ^^ITYPE=1
3 13 19 .HIJKLMH      ***         >   \\AND ROOT IS IN LEFT
2 16 16 ....^^O         *F*          C  \\RING.
2 15 15 ...^N          ***         <
1 12 11                  <       <
3 12 18 ^^CBAFEDC           E < < D
1 12 11
.TEST PAGE 17
DETAIL OF H         B\\OTH RINGS ARE INCLUDED IF  ^^ITYPE=0  \\AND
3 12 18 ^^HIJKLMH     \\NODE ^C IS ROOT.      ^N           ^O
2 15 15 ...^O                              <         >
2 14 14 ..^N                                <       >
1 12 11                   ^^A > > B > > C     I > > J
3 12 19 HCBAFEDC         >                 >       >
3 13 18 .MLKJIH         >         ***     >         >
1 12 11                F          *C*> > H           K
DETAIL OF K             <         ***               <
3 12 18 KLMHIJK          <       <                 <
2 18 18 ......O           E < < D     H < < M < < L
2 17 17 .....N
1 12 11                   A > > B     R\\IGHT RING IS NOT
3 12 22 ^^KJIHCBAFEDC      >       >    \\INCLUDED IF ^^ITYPE=1
3 16 18 ....MLK         >         *** \\AND ROOT IS IN LEFT
1 12 11                ^F          *^C* RING.
^^DETAIL OF               <         ***
                         <
                          E < < D < < C
.SUBTITLE ^^DATREK, R\\OUTINE TO ^EVALUATE ^INTEGER ^SEQUENCE OF ^FORM 1.2.3
.PAGE
.LEFT MARGIN 0
.RIGHT MARGIN 60
.NOFILL
 ^^DDDDD          AAA  TTTTTTTT  RRRRRR    EEEEEEEE  KK   KK
 DD   DD       AAAA     TT     RR    RR  EE        KK  KK
 DD    DD     AA AA     TT     RR    RR  EE        KK KK
 DD    DD    AA  AA     TT     RRRRRR    EEEEE     KKKKK
 DD    DD   AAAAAAA     TT     RR  RR    EE        KKK KK
 DD   DD   AA    AA     TT     RR   RR   EE        KK   KK
 DDDDD    AA     AA     TT     RR    RR  EEEEEEEE  KK    KK
.SKIP 3
.FILL
.CENTER
DATREK, R\\OUTINE TO ^EVALUATE ^INTEGER ^SEQUENCE OF ^FORM 1.2.3
.CENTER
------##------- -- -------- ------- -------- -- ---- -----
.SKIP
^^DATREK \\EVALUATES A SEQUENCE OF UNSIGNED INTEGERS, REPRESENTED BY
GROUPS OF DIGITS SEPARATED BY PERIODS, TYPED BY THE USER AND READ BY
THE CALLING PROGRAM WITH A MULTIPLE OF AN ^A1 FORMAT. ^EACH INTEGER
RETURNS A VALUE OF ZERO OR LARGER. ^THE VALUE -1 IS RETURNED FOR
EACH INTEGER INDICATED AS MISSING BY AN INITIAL PERIOD, BY A
TRAILING PERIOD, OR BY 2 ADJACENT PERIODS. ^SIGNS AND EXPONENTS ARE
NOT RECOGNIZED.
.SKIP 3
.CENTER
^THE ^^DATREK A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DATREK \I\S
.SKIP
.NOFILL
      SUBROUTINE DATREK(LOWVLU,MAXVLU,MAXBFR,IBUFFR,LOWBFR,
     1    KIND  ,IVALUE,KNTVLU)
.SKIP
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
      ^^DIMENSION IBUFFR(MAXBFR),IVALUE(MAXVLU)
.SKIP
.FILL
T\\HE FOLLOWING ARGUMENTS ARE USED FOR INPUT ONLY AND ARE RETURNED
UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LOWVLU#=#\\SUBSCRIPT OF THE LOWEST LOCATION IN THE ^^IVALUE
\\ARRAY WHICH CAN BE USED TO RETURN THE VALUES OF THE INTEGERS IN
THE SEQUENCE. ^IF THE INPUT TEXT BUFFER IS EMPTY OR IF THE FIRST
PRINTING CHARACTER AT OR TO THE RIGHT OF ^^IBUFFR(LOWBFR) \I\S
\\NEITHER A DIGIT NOR A PERIOD, THEN THE ^^IVALUE \\ARRAY IS NOT
USED AND ^^KNTVLU \\WHICH IS RETURNED POINTING TO THE HIGHEST
LOCATION USED IN THE ^^IVALUE \\ARRAY IS INSTEAD RETURNED CONTAINING
THE VALUE ^^LOWVLU-1.
.SKIP
.INDENT -9
MAXVLU#=#\\SUBSCRIPT OF THE HIGHEST LOCATION IN THE ^^IVALUE \\ARRAY
WHICH CAN BE USED TO RETURN THE VALUES OF THE INTEGERS IN THE
SEQUENCE. ^IF THE INTEGER SEQUENCE CONTAINS MORE VALUES THAN CAN BE
STORED IN ^^IVALUE(LOWVLU) \\THROUGH ^^IVALUE(MAXVLU), \\THEN THE
EVALUATION OF THE SEQUENCE CONTINUES THROUGH THE TERMINAL DIGIT OR
PERIOD, BUT THE RIGHTMOST VALUES ARE NOT STORED IN THE ^^IVALUE
\\ARRAY, AND ^^KNTVLU \\IS RETURNED CONTAINING ^^MAXVLU.
.SKIP
.INDENT -9
MAXBFR#=#\\SUBSCRIPT OF THE FINAL (RIGHTMOST) LOCATION IN THE
^^IBUFFR \\ARRAY WHICH CAN BE SEARCHED FOR THE CHARACTERS WHICH
REPRESENT THE INTEGER SEQUENCE.
.SKIP
.INDENT -9
^^IBUFFR#=#\\INPUT BUFFER CONTAINING CHARACTERS TYPED BY THE USER,
READ BY A MULTIPLE OF AN ^A1 FORMAT, WHICH ARE TO BE SEARCHED FOR
THE REPRESENTATION OF THE INTEGER SEQUENCE. ^^IBUFFR \\THEN CONTAINS
1 CHARACTER PER COMPUTER STORAGE LOCATION.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENT MUST BE SET BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS FIRST CALLED, THEN IS RETURNED BY THIS ROUTINE
DESCRIBING THE LOCATION OF THE FIRST CHARACTER NOT YET PROCESSED IN
THE INPUT BUFFER.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^LOWBFR#=#\\SUBSCRIPT WITHIN THE ^^IBUFFR \\ARRAY OF THE FIRST
(LEFTMOST) CHARACTER WHICH CAN BE SCANNED FOR AN INTEGER SEQUENCE.
^IF AN INTEGER SEQUENCE IS FOUND, THEN ^^LOWBFR \\WILL BE RETURNED
POINTING TO THE FIRST CHARACTER WHICH IS BEYOND THE SEQUENCE, AND
WHICH COULD NOT BE PART OF THE SEQUENCE. ^IF AN INTEGER SEQUENCE IS
NOT FOUND, THEN ^^LOWBFR \\WILL BE RETURNED POINTING TO THE FIRST
PRINTING CHARACTER WHICH WOULD BE NEITHER A DIGIT NOR A PERIOD, OR
WILL BE RETURNED POINTING BEYOND THE END OF THE BUFFER IF THE BUFFER
DOES NOT CONTAIN ANY PRINTING CHARACTERS AT OR TO THE RIGHT OF
^^IBUFFR(LOWBFR). LOWBFR \\MUST BE SET BY THE CALLING PROGRAM BEFORE
THIS ROUTINE IS FIRST CALLED TO PROCESS THE CONTENTS OF THE BUFFER,
AND SHOULD NOT BE CHANGED BY THE CALLING PROGRAM IF THIS ROUTINE
LOCATES AN INTEGER SEQUENCE. ^IF AN INITIAL PRINTING CHARACTER IS
FOUND WHICH IS NEITHER A DIGIT NOR A PERIOD, THEN THE CONTENTS OF
THE BUFFER SHOULD BE PROCESSED BY SOME OTHER ^^FASP \\ROUTINE, OR AT
LEAST THE CALLING PROGRAM SHOULD INCREMENT THE VALUE OF ^^LOWBFR
\\BY 1 BEFORE AGAIN CALLING THIS ROUTINE.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE USED FOR RETURNING INFORMATION TO THE
CALLING PROGRAM. ^THEIR INPUT VALUES ARE IGNORED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KIND###=#\\RETURNED DESCRIBING THE KIND OF ITEM LOCATED IN THE
^^IBUFFR \\ARRAY.
.INDENT -2
=#1, NOTHING WAS FOUND AT OR TO THE RIGHT OF ^^IBUFFR(LOWBFR). T\H\E
\\CALLING PROGRAM SHOULD READ A NEW LINE INTO THE ^^IBUFFR \\ARRAY
AND RESET ^^LOWBFR \\TO POINT TO THE FIRST CHARACTER IN THIS ARRAY.
^^KNTVLU \\IS RETURNED CONTAINING ^^LOWVLU-1.
.INDENT -2
=#2, \\AN INTEGER SEQUENCE WAS NOT FOUND, BUT A PRINTING CHARACTER
WHICH IS NEITHER A DIGIT NOR A PERIOD WAS FOUND AT OR TO THE RIGHT
OF ^^IBUFFR(LOWBFR). LOWBFR \\WILL BE RETURNED POINTING TO THIS
PRINTING CHARACTER. ^THE CALLING PROGRAM MUST INCREMENT THE VALUE OF
^^LOWBFR \\BEFORE AGAIN CALLING THIS ROUTINE SINCE SUPPLYING THE
SAME INITIAL CHARACTER WOULD PRODUCE IDENTICAL RESULTS. ^^KNTVLU
\\IS RETURNED CONTAINING ^^LOWVLU-1.
.INDENT -2
=#3, \\AN INTEGER SEQUENCE WAS FOUND WHICH DID NOT CONTAIN MORE
VALUES, OR INDICATIONS OF MISSING VALUES, THAN COULD BE RETURNED IN
THE ^^IVALUE \\ARRAY. ^^LOWBFR \\IS RETURNED POINTING TO THE NEXT
CHARACTER BEYOND THE END OF THE SEQUENCE.
.INDENT -2
=#4, AN INTEGER SEQUENCE WAS FOUND WHICH CONTAINED MORE VALUES, OR
INDICATIONS OF MISSING VALUES, THAN COULD BE RETURNED IN THE
^^IVALUE \\ARRAY. ^THE EVALUATION OF THE SEQUENCE CONTINUES THROUGH
THE TERMINAL DIGIT OR PERIOD, BUT THE RIGHTMOST VALUES ARE NOT
STORED IN THE ^^IVALUE \\ARRAY, AND ^^KNTVLU \\IS RETURNED
CONTAINING ^^MAXVLU. LOWBFR \\IS RETURNED POINTING TO THE NEXT
CHARACTER BEYOND THE END OF THE SEQUENCE.
.SKIP
.INDENT -9
^^IVALUE#=#\\ARRAY IN WHICH THE VALUES OF THE INTEGERS ARE RETURNED.
^IF AN INTEGER IS INDICATED AS BEING MISSING BY AN INITIAL PERIOD,
BY A TRAILING PERIOD, OR BY 2 ADJACENT PERIODS, THEN THE VALUE -1 IS
INSTEAD STORED IN THE CORRESPONDING LOCATION IN THE ^^IVALUE \\ARRAY.
.SKIP
.INDENT -9
^^KNTVLU#=#\\RETURNED CONTAINING THE SUBSCRIPT OF THE HIGHEST
LOCATION IN THE ^^IVALUE \\ARRAY USED EITHER TO STORE THE VALUE OF
AN INTEGER IN THE SEQUENCE, OR TO INDICATE A MISSING INTEGER. ^IF
THE FIRST PRINTING CHARACTER IN THE INPUT BUFFER IS NEITHER A DIGIT
NOR A PERIOD, THEN ^^KNTVLU \\IS RETURNED CONTAINING ^^LOWVLU-1.
I\\F THE INTEGER SEQUENCE CONTAINS MORE VALUES THAN CAN BE STORED IN
^^IVALUE(LOWVLU) \\THROUGH ^^IVALUE(MAXVLU), \\THEN THE EVALUATION
OF THE SEQUENCE CONTINUES THROUGH THE TERMINAL DIGIT OR PERIOD, BUT
THE RIGHTMOST VALUES ARE NOT STORED IN THE ^^IVALUE \\ARRAY, AND
^^KNTVLU \\IS RETURNED CONTAINING ^^MAXVLU.
.PAGE
.NOFILL
.LEFT MARGIN 0
.CENTER
A\N E\\XAMPLE OF THE ^USE OF ^^DATREK
.CENTER
-- ------- -- --- --- -- ------
.SKIP
C     PROGRAM TO DEMONSTRATE DATREK ROUTINE
C
      DATA ITTY,JTTY/5,5/
      DATA LOWVLU,MAXVLU,MAXBFR/1,5,60/
      DIMENSION IBUFFR(60),IVALUE(5)
C
C     ASK FOR AND ACCEPT USER RESPONSE
    1 LOWBFR=1
      WRITE(ITTY,2)
    2 FORMAT(2H *$)
      READ(JTTY,3)IBUFFR
    3 FORMAT(60A1)
C
C     EVALUATE NEXT INTEGER SEQUENCE IN USER RESPONSE
    4 CALL DATREK(LOWVLU,MAXVLU,MAXBFR,IBUFFR,LOWBFR,
     1    KIND  ,IVALUE,KNTVLU)
      IF(KIND.EQ.1)GO TO 1
      IF(KIND.EQ.2)GO TO 7
C
C     REPORT VALUES IN SEQUENCE
      IF(KIND.EQ.3)WRITE(ITTY,5)(IVALUE(I),I=1,KNTVLU)
    5 FORMAT(9H SEQUENCE,10I10)
      IF(KIND.EQ.4)WRITE(ITTY,6)(IVALUE(I),I=1,KNTVLU)
    6 FORMAT(9H OVERFLOW,10I10)
      GO TO 4
C
C     REPORT UNKNOWN CHARACTER
    7 WRITE(ITTY,8)IBUFFR(LOWBFR)
    8 FORMAT(11H UNKNOWN  ',1A1,1H')
      LOWBFR=LOWBFR+1
      GO TO 4
      END
.SKIP
.CENTER
T\\YPICAL ^DIALOG ^BETWEEN ^USER AND ^^DATREK D\\EMONSTRATION ^PROGRAM
.CENTER
------- ------ ------- ---- --- ------ ------------- -------
.SKIP
*12 12. 12.34 12.0034 12.00340
.SKIP
^^SEQUENCE        12
SEQUENCE        12        -1
SEQUENCE        12        34
SEQUENCE        12        34
SEQUENCE        12       340
*12..56..90 . .. .34.-0.1.2.3.4.5.6.7.8.9
.SKIP
SEQUENCE        12        -1        56        -1        90
SEQUENCE        -1        -1
SEQUENCE        -1        -1        -1
SEQUENCE        -1        34        -1
UNKNOWN  '-'
OVERFLOW         0         1         2         3         4
.SUBTITLE ^^DAVARY, R\\OUTINE TO ^DISPLAY AND ^ASSIGN ^VALUES TO ^NAMED ^ARRAYS
.PAGE
.LEFT MARGIN 0
.NOFILL
 ^^DDDDD          AAA  VV    VV      AAA  RRRRRR    YY    YY
 DD   DD       AAAA  VV   VV      AAAA  RR    RR   YY  YY
 DD    DD     AA AA  VV  VV      AA AA  RR    RR    YYYY
 DD    DD    AA  AA  VV VV      AA  AA  RRRRRR       YY
 DD    DD   AAAAAAA  VVVV      AAAAAAA  RR  RR       YY
 DD   DD   AA    AA  VVV      AA    AA  RR   RR      YY
 DDDDD    AA     AA  VV      AA     AA  RR    RR     YY
.SKIP 3
.FILL
.CENTER
DAVARY, R\\OUTINE TO ^DISPLAY AND ^ASSIGN ^VALUES TO ^NAMED ^ARRAYS
.CENTER
------##------- -- ------- --- ------ ------ -- ----- ------
.SKIP
^^DAVARY \\IS USED ALONG WITH SEVERAL OTHER ROUTINES IN THE ^^FASP
\\PACKAGE FOR THE PURPOSE OF SPECIFYING BY NAME, EXAMINING AND
MODIFYING THE VALUES OF MULTIPLY SUBSCRIPTED ARRAYS EQUIVALENCED
WITH OR OTHERWISE LOADED INTO A SINGLY SUBSCRIPTED BUFFER. ^THE
INTERACTION BETWEEN THESE ROUTINES IS DESCRIBED AT THE START OF THE
^^DALOAD \\DOCUMENTATION. ^THE SAMPLE PROGRAM AT THE END OF THE
^^DALOAD \\DOCUMENTATION ILLUSTRATES THE USE OF MOST OF THESE
ROUTINES.
.SKIP
^PRIOR TO PASSING CONTROL TO ^^DAVARY, \\THE CALLING PROGRAM WILL
HAVE REQUESTED FROM THE USER A SPECIFICATION OF THE ARRAY LOCATIONS
WHICH THE USER WANTS TO EXAMINE AND/OR TO MODIFY. ^THE TEXT TYPED BY
THE USER IN RESPONSE TO THIS REQUEST IS EVALUATED BY THE ^^DAPICK
\\ROUTINE TO IDENTIFY THE ARRAY NAME AND ITS SUBSCRIPT RANGES, IF
ANY. ^^DAVARY \\IS CALLED SEPARATELY TO DISPLAY EACH OF THE VALUES
IN THE ARRAY LOCATIONS WITHIN THE RANGE OF ARRAY LOCATIONS INDICATED
BY THE USER. ^IF ^^DAPICK \\FOUND THAT THE USER TYPED AN EQUALS SIGN
TO THE RIGHT OF THE ORIGINAL ARRAY SPECIFICATION, THEN THE CALLING
PROGRAM SHOULD REQUEST THAT ^^DAVARY \\IS TO EVALUATE THE NUMBERS
AND/OR NUMBER RANGE SPECIFICATIONS TYPED TO THE RIGHT OF THE EQUALS
SIGN AND ASSIGN THESE AS THE NEW VALUES OF THE ARRAY LOCATIONS
WITHIN THE RANGE OF ARRAY LOCATIONS INDICATED BY THE USER. ^IF TOO
FEW VALUES WERE TYPED RIGHT OF THE EQUALS SIGN TO DEFINE NEW VALUES
FOR ALL OF THE ARRAY LOCATIONS WITHIN THE TOTAL RANGE OF ARRAY
LOCATIONS INDICATED BY THE USER, THEN, WHEN THE SUPPLY OF TYPED
VALUES HAS BEEN EXHAUSTED, ^^DAVARY \\WILL ASK THE USER TO SPECIFY
THE VALUE OF EACH OF THE REMAINING ARRAY LOCATIONS AS THE CALLING
PROGRAM STEPS THROUGH THE RANGE OF ARRAY LOCATIONS. ^WHEN THE USER
IS ASKED TO SPECIFY THE NEW VALUE, THE USER HAS THE OPTION OF
SPECIFYING NO VALUE IN WHICH CASE THE FORMER VALUE WILL BE RETAINED,
OF SPECIFYING A RANGE OF VALUES IN WHICH CASE ^^DAVARY \\WILL UPON
EACH SUCCESSIVE CALL SELECT VALUES FROM THE RANGE UNTIL THE RANGE IS
COMPLETED, OF SPECIFYING THAT SOME NUMBER OF ARRAY LOCATIONS ARE TO
BE SKIPPED OVER RETAINING THEIR FORMER VALUES IN THE PROCESS, OR OF
ABANDONING THE INTERACTION ALTOGETHER FOR THE CURRENT RANGE OF ARRAY
LOCATIONS.
.SKIP
^THE TEXT TYPED BY THE USER, EITHER TO THE RIGHT OF THE EQUALS SIGN
IN THE BUFFER EVALUATED BY ^^DAPICK, \\OR IN THE TEXT READ DIRECTLY
BY THE ^^DAVARY \\ROUTINE, CONSISTS OF NUMBERS AND/OR NUMBER RANGE
SPECIFICATIONS. ^IF THE USER HAS TYPED SEVERAL NUMBERS AND/OR RANGE
SPECIFICATIONS ON THE SAME LINE, THEN ^^DAVARY \\WILL EVALUATE EACH
OF THESE IN TURN WHEN THE PREVIOUS CALLS TO ^^DAVARY \\HAVE USED THE
PREVIOUS VALUE OR HAVE USED ALL OF THE VALUES WITHIN THE PREVIOUS
RANGE. ^ANY NUMBER OF SPACES AND/OR TAB CHARACTERS, BUT AT MOST A
SINGLE COMMA, CAN SEPARATE TWO ADJACENT NUMBERS AND/OR NUMBER RANGE
SPECIFICATIONS. ^TWO ADJACENT COMMAS, POSSIBLY SEPARATED BY SPACES
AND/OR TABS, INDICATE THAT THE ARRAY LOCATION BEING ASSIGNED A VALUE
WHEN THE INTERPRETATION OF THE BUFFER HAS PROCEEDED TO THE
EVALUATION OF THE MISSING NUMBER BETWEEN THE COMMAS IS TO INSTEAD
RETAIN ITS FORMER VALUE. ^IF A COMMA IS THE FIRST PRINTING CHARACTER
TO THE RIGHT OF THE EQUALS SIGN IN THE TEXT EVALUATED BY ^^DAPICK,
\\THEN THE FIRST ARRAY LOCATION IN THE RANGE OF ARRAY LOCATIONS
INDICATED BY THE USER, IS TO RETAIN ITS FORMER VALUE. ^SIMILARLY, IF
A COMMA IS THE FIRST PRINTING CHARACTER IN THE BUFFER READ BY
^^DAVARY \\ITSELF, THEN THE ARRAY LOCATION CURRENTLY BEING DEFINED
IS TO RETAIN ITS FORMER VALUE. ^A COMMA WHICH IS THE RIGHTMOST
PRINTING CHARACTER IN THE BUFFER (EXCEPT POSSIBLY FOR SEMICOLONS
AND/OR AN EXCLAMATION POINT AND ITS FOLLOWING COMMENT OR AN
AMPERSAND AND ITS FOLLOWING COMMENT) INDICATES THAT THE ARRAY
LOCATION BEING ASSIGNED A VALUE WHEN THE INTERPRETATION OF THE
BUFFER HAS PROCEEDED TO THE EVALUATION OF THE TEXT TO THE RIGHT OF
THE COMMA IS INSTEAD TO RETAIN ITS FORMER VALUE. ^A SINGLE COMMA
WITH NO OTHER PRINTING CHARACTERS TO ITS LEFT (EXCEPT POSSIBLY THE
ARRAY SPECIFICATION AND THE EQUALS SIGN FOUND BY ^^DAPICK) \\AND
WITH NO PRINTING CHARACTERS TO ITS RIGHT (EXCEPT POSSIBLY FOR
SEMICOLONS AND/OR AN EXCLAMATION POINT AND ITS FOLLOWING COMMENT OR
AN AMPERSAND AND ITS FOLLOWING COMMENT), INDICATES TWO ARRAY
LOCATIONS WHICH ARE TO RETAIN THEIR FORMER VALUES.
.SKIP
^NUMBERS, WHETHER USED TO SPECIFY SINGLE VALUES OR RANGES, CAN BE
TYPED BY THE USER IN EITHER FLOATING POINT FORM OR SCIENTIFIC
NOTATION. ^IF SCIENTIFIC NOTATION IS USED FOR THE SPECIFICATION OF
OCTAL NUMBERS, THEN THE EXPONENT TO THE RIGHT OF THE LETTER ^E
(WHICH MUST BE TYPED IN UPPER CASE) IS EVALUATED AS THE DECIMAL
NUMBER OF OCTAL DIGITS TO BE SHIFTED. ^IF AN INTEGER (EITHER OCTAL
OR DECIMAL) IS SPECIFIED WITH A DECIMAL POINT AND/OR WITH AN
EXPONENT, THEN THE VALUE IS FIRST OBTAINED AS THOUGH NEITHER THE
DECIMAL POINT NOR EXPONENT APPEARED, AND THIS VALUE IS SHIFTED ONLY
ONCE BY THE AMOUNT INDICATED BY THE COMBINATION OF DECIMAL POINT
LOCATION AND EXPONENT. ^IF THE NUMBER 1.2345^E3 IS TYPED BY THE USER
AND IS EVALUATED AS A DECIMAL INTEGER, THEN THE VALUE IS CALCULATED
TO BE 12345 BEFORE BEING DIVIDED BY 10 TO OBTAIN THE RETURNED VALUE
OF INTEGER 1234.
.SKIP
^A RANGE OF VALUES CAN BE SPECIFIED AS THE LIMITS BETWEEN WHICH AND
INCREMENT BY WHICH THE VALUE IS TO BE VARIED, OR CAN BE SPECIFIED AS
THE REPETITION OF A SINGLE VALUE. ^IF THE VALUE IS TO BE VARIED
BETWEEN LIMITS, THEN THE RANGE IS WRITTEN AS THE STARTING VALUE, THE
INCREMENT, AND THE ENDING VALUE SEPARATED BY SLASHES OR BY COLONS
(THE 2 CHARACTERS ARE EQUIVALENT). ^IF THE INCREMENT IS TO BE ONE,
THEN THE STARTING AND ENDING VALUES NEED BE SEPARATED ONLY BY A
SINGLE SLASH OR BY A SINGLE COLON. ^IF EITHER LIMIT IS MISSING, IT
IS ASSUMED TO HAVE THE VALUE ZERO. ^THE EFFECTIVE SIGN OF THE
INCREMENT IS CHANGED IF IT DOES NOT AGREE WITH THE RELATIVE VALUES
OF THE LIMITS.
.SKIP
^IF THE USER WANTS TO SPECIFY THAT A SINGLE VALUE IS TO BE ASSIGNED
TO SEVERAL ARRAY LOCATIONS WITHIN THE RANGE OF ARRAY LOCATIONS BEING
DEFINED, THEN THE RANGE OF VALUES IS WRITTEN AS THE NUMBER OF TIMES
THE VALUE IS TO BE USED FOLLOWED IMMEDIATELY BY AN ASTERISK AND THE
VALUE. ^IF A VALUE DOES NOT FOLLOW THE ASTERISK, THEN THE USER IS
REQUESTING THAT THE STATED NUMBER OF CONSECUTIVE LOCATIONS STARTING
WITH THE LOCATION CURRENTLY BEING DEFINED ARE INSTEAD TO HAVE THEIR
FORMER VALUES KEPT INTACT.
.SKIP
^IF AN EXCLAMATION POINT OR AN AMPERSAND IS FOUND ANYWHERE IN THE
TEXT TYPED BY THE USER, THEN THE EXCLAMATION POINT OR THE AMPERSAND
AND ALL CHARACTERS TO ITS RIGHT ARE TAKEN TO BE A COMMENT AND ARE
OTHERWISE IGNORED. ^IF IN RESPONSE TO A REQUEST FOR A NEW VALUE, THE
USER TYPES EITHER A COMPLETELY BLANK LINE OR A LINE IN WHICH THE
LEFTMOST PRINTING CHARACTER IS AN EXCLAMATION POINT, THEN THE FORMER
VALUE OF THE ARRAY LOCATION WILL BE RETAINED, AND THE NEXT CALL TO
^^DAVARY \\WILL REQUEST THE VALUE OF THE NEXT ARRAY LOCATION. ^IF IN
RESPONSE TO A REQUEST FOR A NEW VALUE, THE USER INSTEAD TYPES A LINE
IN WHICH THE LEFTMOST PRINTING CHARACTER IS AN AMPERSAND, THEN THE
REMAINDER OF THE LINE IS SIMILARLY TAKEN AS A COMMENT, BUT THE USER
IS AGAIN ASKED TO SPECIFY THE VALUE. ^USE OF THE AMPERSAND AS THE
LEFTMOST PRINTING CHARACTER ALLOWS MULTIPLE LINE COMMENTS FOR
ANNOTATION OF BATCH COMMAND FILES. ^THE EXCLAMATION POINT AND THE
AMPERSAND ARE EQUIVALENT IF ANY PRINTING CHARACTER IS TYPED TO THEIR
LEFT.
.SKIP
^IF THE USER TYPES A SEMICOLON, THEN ^^DAVARY \\SIGNALS TO THE
CALLING PROGRAM THAT THE USER HAS REQUESTED THAT THE STEPPING
THROUGH THE ARRAY LOCATIONS WITHIN THE RANGE OF ARRAY LOCATIONS IS
TO BE TERMINATED.
.SKIP
^THE TEXT
.SKIP
.INDENT 5
5.3^^E3,-0.00728,4*,1E6/1E5/2E6,,12*.7;
.SKIP
\\WOULD, IF TYPED BY THE USER AND INTERPRETED BY ^^DAVARY, \\SPECIFY
.SKIP
.LEFT MARGIN 5
.INDENT -3
^A.#THAT THE FIRST ARRAY LOCATION IS TO BE ASSIGNED THE VALUE 5.3^E3
.SKIP
.INDENT -3
^B.#THAT THE SECOND ARRAY LOCATION IS TO BE ASSIGNED THE VALUE
-7.28^E-3
.SKIP
.INDENT -3
^C.#THAT THE NEXT 4 ARRAY LOCATIONS ARE TO KEEP THEIR FORMER VALUES
.SKIP
.INDENT -3
^D.#THAT THE NEXT ELEVEN ARRAY LOCATIONS ARE TO BE ASSIGNED THE
VALUES 1.0^^E6, 1.1E6, 1.2E6 \\THROUGH 2.0^E6
.SKIP
.INDENT -3
^E.#THAT THE NEXT ARRAY LOCATION IS RETAIN ITS FORMER VALUE
.SKIP
.INDENT -3
^F.#THAT THE NEXT 12 ARRAY LOCATIONS ARE TO ALL BE ASSIGNED THE
VALUE 0.7
.SKIP
.INDENT -3
^G.#AND THAT THE STEPPING THROUGH ARRAY LOCATIONS WITHIN THE CURRENT
RANGE OF ARRAY LOCATIONS IS THEN TO BE TERMINATED.
.LEFT MARGIN 0
.SKIP
^SPACES AND/OR TAB CHARACTERS COULD APPEAR IN ADDITION TO THE COMMAS
IN THE EXAMPLE. ^THE ONLY COMMAS IN THE EXAMPLE WHICH COULD NOT BE
REPLACED BY SPACES AND/OR TAB CHARACTERS ARE THE 2 ADJACENT COMMAS
WHICH INDICATE THAT THE CORRESPONDING ARRAY LOCATION IS TO RETAIN
ITS FORMER VALUE.
.SKIP 2
.TEST PAGE 8
.CENTER
^THE ^^DAVARY A\\RGUMENT ^LIST
.CENTER
--- ------ -------- ----
.SKIP
^THE ARGUMENT LIST OF ROUTINE ^^DAVARY \I\S
.SKIP
.NOFILL
      SUBROUTINE DAVARY(KONTRL,ITTY  ,JTTY  ,LOCATN,NAMUSD,
     1    NAMMAX,MAXBFR,NOTATN,MINDEC,MAXDEC,MINSIG,MAXSIG,
     2    IDECML,AARRAY,IARRAY,NAME  ,IBUFFR,LOWBFR,KIND  ,
     3    MODIFY)
.SKIP
.FILL
\\WITH THE ASSOCIATED ^^DIMENSION \\STATEMENT
.SKIP
.NOFILL
      ^^DIMENSION NAME(NAMMAX),AARRAY(LOCATN),IARRAY(LOCATN),
     1IBUFFR(MAXBFR)
.SKIP
.FILL
T\\HE FOLLOWING ARE INPUT ARGUMENTS LEFT UNCHANGED.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^KONTRL#=#\\INDICATES THE TYPE (OCTAL, INTEGER OR REAL) OF THE
VALUE TO BE DISPLAYED AND POSSIBLY MODIFIED.
.INDENT -2
=#-1, THIS ROUTINE IS TO DISPLAY IN OCTAL AND POSSIBLY MODIFY THE
INTEGER VALUE IN ^^IARRAY(LOCATN).
.INDENT -2
=#0, \\THIS ROUTINE IS TO DISPLAY IN DECIMAL AND POSSIBLY MODIFY THE
INTEGER VALUE IN ^^IARRAY(LOCATN).
.INDENT -2
=#\\GREATER THAN ZERO, THIS ROUTINE IS TO DISPLAY IN DECIMAL, USING
EITHER FLOATING POINT FORM OR SCIENTIFIC NOTATION AS SPECIFIED BY
THE OTHER ARGUMENTS OR AS NECESSARY, AND POSSIBLY MODIFY THE REAL
VALUE IN ^^AARRAY(LOCATN).
.SKIP
D\\URING INTERPRETATION OF THE VALUES TYPED BY THE USER, ^^KONTRL
\\IS IDENTICAL TO THE ARGUMENT OF THE SAME NAME FOR THE ^^DAHEFT
\\ROUTINE, AND IS DEFINED AS FOLLOWS.
.INDENT -2
=#-1, THE ITEM TYPED BY THE USER IS AN OCTAL NUMBER. ^THE NUMBER CAN
BE TYPED WITH A DECIMAL POINT AND/OR WITH AN EXPONENT. ^HOWEVER, THE
NUMBER FOLLOWING THE LETTER ^E OF THE EXPONENT IS EVALUATED IN
DECIMAL. ^IT MUST BE NOTED THAT NUMBERS EVALUATED AS NEGATIVE OCTAL
INTEGERS HAVE THE NEGATIVE OCTAL INTEGER AS THEIR VALUE, NOT AS
THEIR BIT REPRESENTATION IN COMPUTER STORAGE. ^FOR EXAMPLE, ON A 36
BIT TWOS COMPLEMENT COMPUTER, THE OCTAL NUMBER -400000000000 (WHICH
COULD ALSO BE TYPED AS -4^E11 OR -4^E+11 WHERE THE 11 AFTER THE ^E
IS IN DECIMAL) IS REPRESENTED AS BIT PATTERN HAVING OCTAL NOTATION
400000000000 AND THE OCTAL NUMBER -377777777777 IS REPRESENTED BY
THE BIT PATTERN 400000000001.
.INDENT -2
=#0, THE ITEM TYPED BY THE USER IS AN INTEGER DECIMAL NUMBER. ^THE
NUMBER CAN BE TYPED WITH A DECIMAL POINT (FOR EXAMPLE 1.23^K OR
1.23^E3 EQUALS 1230), BUT IS STORED AS AN INTEGER. ^ANY DECIMAL
INTEGER WHICH THE COMPUTER CAN REPRESENT CAN BE EVALUATED. ^THIS
INCLUDES, ON TWOS COMPLEMENT COMPUTERS, THE LARGEST NEGATIVE NUMBER
THE ABSOLUTE VALUE OF WHICH CANNOT BE STORED. ^ON THE ^^PDP-10, \A
36 \\BIT COMPUTER WITH TWOS COMPLEMENT NOTATION, THE RANGE OF
DECIMAL INTEGERS IS -34359738368 THROUGH 34359738367 (OCTAL NOTATION
OF BIT PATTERNS BEING 400000000000 THROUGH 377777777777).
.INDENT -2
=#1 OR GREATER, THE ITEM TYPED BY THE USER IS A REAL NUMBER. ^IF
POSSIBLE, THE REAL NUMBER WILL BE ACCUMULATED AS AN INTEGER, THEN BE
CONVERTED TO A REAL NUMBER AND SHIFTED IF NECESSARY. ^^KONTRL \I\S
\\THEN THE MAXIMUM NUMBER OF DIGITS IN THE INTEGER. ^IF THE ITEM HAS
MORE THAN ^^KONTRL \\DIGITS (NOT COUNTING LEFTMOST ZEROES), THEN THE
ENTIRE EVALUATION IS DONE AS A REAL NUMBER. ^THE ADVANTAGE OF
CALCULATING THE REAL VALUES IN INTEGER AS LONG AS THE PRECISION OF
THE COMPUTER IS NOT OVERFLOWED IS THAT THE CALCULATION OF THE
PORTION OF THE NUMBER RIGHT OF THE DECIMAL POINT IS MORE EXACT. ^AS
AN EXAMPLE, IF ^^KONTRL \\IS GREATER THAN OR EQUAL TO 4, THEN THE
NUMBER 33.33 CAN BE STORED AS THE INTEGER 3333, THEN BE CONVERTED TO
THE REAL VALUE 3333.0 AND DIVIDED BY 100.0 TO OBTAIN THE FINAL
ANSWER. ^IF IT MAKES NO DIFFERENCE WHETHER THE NUMBER TYPED AS 33.33
HAS VALUE 33.33 OR 33.32999... THEN ^^KONTRL \\CAN BE GIVEN THE
VALUE 1.
.SKIP
.INDENT -9
^^ITTY###=#\\NUMBER OF THE UNIT FROM WHICH THIS ROUTINE IS TO READ
THE USER'S SPECIFICATION OF NEW VALUES. ^ON THE ^^PDP-10 \\COMPUTER,
^^ITTY \\SHOULD HAVE THE VALUE 5.
.SKIP
.INDENT -9
^^JTTY###=#\\NUMBER OF THE UNIT TO WHICH THIS ROUTINE IS TO WRITE
THE REPRESENTATION OF THE VALUE CURRENTLY IN ^^AARRAY(LOCATN) \O\R
IARRAY(LOCATN), \\AND TO WHICH ERROR MESSAGES ARE TO BE SENT. ^ON
THE ^^PDP-10 \\COMPUTER, ^^JTTY \\SHOULD HAVE THE VALUE 5.
.SKIP
.INDENT -9
^^LOCATN#=#\\SUBSCRIPT OF THE ARRAY LOCATION (WITHIN EITHER THE
^^AARRAY \O\R IARRAY \\ARRAYS, WHICHEVER IS SELECTED BY THE VALUE OF
^^KONTRL) \\OF WHICH THE VALUE IS TO BE SHOWN TO THE USER AND
POSSIBLY MODIFIED.
.SKIP
.INDENT -9
^^NAMUSD#=#\\SUBSCRIPT OF THE ^^NAME \\ARRAY LOCATION CONTAINING THE
RIGHTMOST CHARACTER OF THE REPRESENTATION OF THE NAME AND ASSOCIATED
SUBSCRIPTS OF THE MULTIPLY SUBSCRIPTED ARRAY BEING SIMULATED IN THE
SINGLY SUBSCRIPTED BUFFER ^^AARRAY \O\R IARRAY. T\\HE REPRESENTATION
OF THE NAME STARTS AT ^^NAME(1). I\\F THE CURRENT CALL TO ^^DAVARY
\\IS DISPLAYING AND POSSIBLY MODIFYING THE CONTENTS OF THE DOUBLY
SUBSCRIPTED SIMULATED ARRAY NAMED ^^ABC, \\AND IF THE SUBSCRIPTS OF
THE SIMULATED ARRAY ^^ABC \\WHICH WOULD CORRESPOND TO THE SUBSCRIPT
^^LOCATN \\IN THE SINGLY SUBSCRIPTED BUFFER WOULD BE 3 AND 7, THEN
THE CONTENTS OF THE ^^NAME(1) \\THROUGH AND INCLUDING ^^NAME(NAMUSD)
\\WHERE ^^NAMUSD \\IS 8 WOULD BE IDENTICAL TO THAT ASSIGNED BY THE
STATEMENT
.SKIP
.NOFILL
######^^DATA (NAME(I),I=1,8)/1HA,1HB,1HC,
#####11H(,1H3,1H,,1H7,1H)/
.FILL
.SKIP
W\\HEN ^^DAVARY \\IS USED WITH THE OTHER ROUTINES IN THE ^^FASP
\\PACKAGE, THE CONTENTS OF THE ^^NAME \\ARRAY WOULD BE DEFINED BY
CALLING THE ^^DALONE \\ROUTINE PRIOR TO EACH CALL TO ^^DAVARY. T\H\E
\\DIMENSION OF THE ^^NAME \\ARRAY, OR AT LEAST THE MAXIMUM USABLE
AREA WITHIN THIS ARRAY, IS GIVEN BY THE ARGUMENT ^^NAMMAX. T\H\E
NAME \\ARRAY LOCATIONS STARTING AT SUBSCRIPT ^^NAMUSD+1, \\AND
EXTENDING THROUGH SUBSCRIPT ^^NAMMAX, \\ARE USED FOR STORING THE
REPRESENTATION OF THE VALUE IN THE CURRENTLY SELECTED LOCATION
WITHIN THE ^^AARRAY \O\R IARRAY \\ARRAY, AND FOR STORING THE
REPRESENTATION OF THE NEW VALUE IF THIS NEW VALUE IS BASED UPON THE
USER'S RESPONSE READ PRIOR TO THE CURRENT CALL TO ^^DAVARY. NAMMAX
\\SHOULD BE AT LEAST 30 TO 40 GREATER THAN ^^NAMUSD.
.SKIP
.INDENT -9
NAMMAX#=#\\SUBSCRIPT OF THE HIGHEST LOCATION WITHIN THE ^^NAME
\\ARRAY WHICH CAN BE USED AS A SCRATCH AREA FOR THE CONSTRUCTION OF
THE CHARACTER REPRESENTATION OF THE VALUE IN THE CURRENTLY SELECTED
LOCATION WITHIN THE ^^AARRAY \O\R IARRAY \\ARRAY, AND FOR THE
CONSTRUCTION OF THE REPRESENTATION OF THE NEW VALUE IF THIS NEW
VALUE IS BASED UPON THE USER'S RESPONSE READ PRIOR TO THE CURRENT
CALL TO ^^DAVARY. NAMMAX \\SHOULD BE AT LEAST 30 TO 40 GREATER THAN
^^NAMUSD.
.SKIP
.INDENT -9
MAXBFR#=#\\SUBSCRIPT OF THE HIGHEST LOCATION WITHIN THE ^^IBUFFR
\\ARRAY INTO WHICH THE CALLING PROGRAM OR A PREVIOUS CALL TO THIS
ROUTINE HAS READ CHARACTERS TYPED BY THE USER. ^IF THIS ROUTINE MUST
READ A NEW RESPONSE FROM THE USER, THEN THE CHARACTERS OF THE
RESPONSE ARE READ INTO ^^IBUFFR(1) \\THROUGH ^^IBUFFR(MAXBFR).
S\\INCE THE FORMAT USED BY ^^DAVARY \\TO READ THE RESPONSE IS
100^^A1, MAXBFR \\SHOULD NOT EXCEED 100.
.SKIP
.LEFT MARGIN 0
^THE FOLLOWING ARGUMENTS ARE SENT TO THE ^^DARITE \\ROUTINE TO
CONTROL THE DISPLAY OF THE FORMER VALUE IN ^^AARRAY(LOCATN) \O\R
IARRAY(LOCATN) \\AND OF THE NEW VALUE IF THIS NEW VALUE IS BASED
UPON THE USER'S RESPONSE READ PRIOR TO THE CURRENT CALL TO ^^DAVARY.
A\\LL OF THESE ARGUMENTS CORRESPOND TO THE ^^DARITE \\ARGUMENTS OF
THE SAME NAME, AND ALL ARE RETURNED UNCHANGED. ^THESE ARGUMENTS ARE
IGNORED IF ^^KONTRL \\IS LESS THAN OR EQUAL TO ZERO. ^IT SHOULD BE
NOTED THAT WHERE THE FOLLOWING DESCRIPTIONS SPEAK OF THE DISPLAY OF
A PARTICULAR NUMBER OF CHARACTERS, THIS IS THE NUMBER OF CHARACTERS
WHICH COULD BE DISPLAYED IF ALL ARE NONZERO. ^AFTER ROUNDING AND
PRIOR TO ACTUAL DISPLAY, RIGHTMOST ZEROES TO THE RIGHT OF THE
DECIMAL POINT ARE DISCARDED AS IS THE DECIMAL POINT ITSELF IF NO
NONZERO DIGITS APPEAR TO ITS RIGHT.
.SKIP
.LEFT MARGIN 9
.INDENT -9
^^NOTATN#=#-1, \\REPRESENT THE VALUE IN SCIENTIFIC NOTATION. ^THE
VALUE 1234 WOULD BE REPRESENTED AS 1.234^E3
.INDENT -3
#=#0, REPRESENT THE VALUE IN FLOATING POINT FORM. ^THE VALUE 1234.56
WOULD BE DISPLAYED AS IT IS WRITTEN IF THE NUMBER OF DIGITS
REQUESTED RIGHT OF THE DECIMAL POINT IS 2 AND IF AT LEAST 6
SIGNIFICANT DIGITS ARE ALLOWED.
.INDENT -3
#=#1, MULTIPLY THE VALUE BY 100 AND INSERT THE PERCENT SIGN
FOLLOWING THE DIGITS OF THE NUMBER. ^^MINDEC \\AND ^^MAXDEC \\REFER
TO THE DISPLAYED DECIMAL POINT. ^TO PRINT TENTHS OF A PERCENT,
^^MAXDEC \\WOULD BE GIVEN THE VALUE 1, AND ^^MINDEC \\WOULD BE 1 OR
LESS.
.INDENT -3
#=#2, IF THE VALUE IS IN THE RANGE 1000 TO 1000000, THEN DIVIDE THE
VALUE BY 1000 AND INSERT THE LETTER ^K FOLLOWING THE DIGITS. ^IF THE
VALUE IS 1000000 OR GREATER, THEN DIVIDE THE VALUE BY 1000000 AND
INSERT THE LETTER ^M FOLLOWING THE DIGITS. ^^MINDEC \\AND ^^MAXDEC
\\REFER TO THE DISPLAYED DECIMAL POINT. ^^MINDEC \\AND ^^MAXDEC
\\BOTH SET AT 2 WOULD REPRESENT THE VALUE 1234 AS 1.23^K.
.INDENT -3
#=#3, SAME AS ^^NOTATN=2 \\EXCEPT THAT ^^MINDEC \\AND ^^MAXDEC
\\REFER TO THE DECIMAL POINT IN THE ORIGINAL VALUE, NOT TO THE
DECIMAL POINT IN THE DISPLAYED NUMBER. ^IF A ^K OR ^M IS DISPLAYED
RIGHT OF THE NUMBER, THEN ^^MINDEC \\AND ^^MAXDEC \\VALUES OF -1 ARE
EQUIVALENT TO VALUES OF 0. ^^MINDEC=-2 \\INDICATES THAT THERE IS NO
LOWER LIMIT TO THE NUMBER OF DIGITS TO THE RIGHT OF THE DISPLAYED
DECIMAL POINT, AND IS PROBABLY THE APPROPRIATE VALUE UNLESS IT IS
ABSOLUTELY NECESSARY TO DISPLAY THE DIGITS WHICH WOULD BE TO THE
RIGHT OF THE DECIMAL POINT IN THE ORIGINAL VALUE, AS FOR EXAMPLE IF
THE AMOUNTS ARE DOLLARS AND MUST BE DISPLAYED ALWAYS INCLUDING THE
CENTS DIGITS. ^THE VALUE 1234.56 WOULD BE REPRESENTED AS 1.23456^K
FOR ^^NOTATN=3 \\AND ^^MAXDEC=2.
.SKIP
.INDENT -9
MINDEC#=#\\MINIMUM NUMBER OF DIGITS RIGHT OF THE DISPLAYED DECIMAL
POINT IN NUMBERS WHICH ARE DISPLAYED IN FLOATING POINT FORM. ^IF IT
WOULD BE NECESSARY TO REPRESENT LESS DIGITS RIGHT OF THE DECIMAL
POINT THAN INDICATED BY ^^MINDEC, \\THEN THE VALUE WILL BE
REPRESENTED IN SCIENTIFIC NOTATION INSTEAD. ^THE MAXIMUM NUMBER OF
DIGITS RIGHT OF THE DECIMAL POINT IS DETERMINED BY THE COMBINATION
OF ^^MAXDEC \\AND ^^MAXSIG.
.INDENT -2
=#-2, \\THERE IS NO LOWER LIMIT TO THE NUMBER OF DIGITS WHICH MUST
BE REPRESENTED RIGHT OF THE DECIMAL POINT, AND EVEN THE DECIMAL
POINT ITSELF NEED NOT BE REPRESENTED. ^^MINDEC=-1 \\IS EQUIVALENT TO
^^MINDEC=-2 \\UNLESS ^^NOTATN=3 \\WHILE THE VALUE IS 1000 OR GREATER.
.INDENT -2
=#-1, IF ^^NOTATN \\IS NOT 3, OR IF ^^NOTATN \\IS 3 BUT THE VALUE
BEING REPRESENTED IS LESS THAN 1000, THEN ^^MINDEC=-1 \I\S
\\EQUIVALENT TO ^^MINDEC=-2 \\SUCH THAT THERE IS NO LOWER LIMIT TO
THE NUMBER OF DIGITS WHICH MUST BE REPRESENTED RIGHT OF THE DECIMAL
POINT, AND EVEN THE DECIMAL POINT ITSELF NEED NOT BE REPRESENTED.
.SKIP
^IF ^^NOTATN=3 \\AND THE VALUE IS 1000 OR GREATER, THEN ^^MINDEC=-1
\\WOULD HAVE THE SAME EFFECT AS ^^MINDEC=0 \\SUCH THAT ALL DIGITS TO
THE LEFT OF THE DECIMAL POINT IN THE ORIGINAL UNSHIFTED VALUE (AS
REPRESENTED WITHOUT ^K OR ^M) MUST BE INCLUDED IN THE ACTUAL
REPRESENTATION OF THE VALUE EVEN WHEN THE ^K OR ^M IS INCLUDED.
^^MINDEC \\SHOULD HAVE THE VALUE -2 IF, IN ORDER TO FIT THE
REPRESENTATION INTO THE AVAILABLE FIELD WIDTH WHILE ^^NOTATN=3, \I\T
\\IS TO BE POSSIBLE THAT A VALUE WHICH IS EQUAL TO OR GREATER THAN
1000 BE REPRESENTED WITHOUT ALL OF THE DIGITS WHICH WOULD BE TO THE
LEFT OF THE DECIMAL POINT IN THE ORIGINAL VALUE, OR EVEN WITHOUT THE
DECIMAL POINT.
.INDENT -2
=#EQUAL OR GREATER THAN ZERO, IF ^^NOTATN \\IS NOT 3, OR IF ^^NOTATN
\\IS 3 BUT THE VALUE BEING REPRESENTED IS LESS THAN 1000, THEN
^^MINDEC \\IS THE MINIMUM NUMBER OF DIGITS WHICH CAN BE DISPLAYED
RIGHT OF THE DECIMAL POINT IN A FLOATING POINT NUMBER. ^IF LESS THAN
^^MINDEC \\DIGITS WOULD BE DISPLAYED RIGHT OF THE DECIMAL POINT,
THEN THE VALUE WILL BE REPRESENTED IN SCIENTIFIC NOTATION INSTEAD.
^IF ^^MINDEC=0, \\THEN IT IS NOT NECESSARY THAT ANY DIGITS BE
DISPLAYED RIGHT OF THE DECIMAL POINT, BUT THE DECIMAL POINT ITSELF
MUST BE DISPLAYED.
.SKIP
^IF ^^NOTATN=3 \\AND THE VALUE IS 1000 OR GREATER, THEN ^^MINDEC
\\IS THE MINIMUM NUMBER OF DIGITS TO THE RIGHT OF THE DECIMAL POINT
IN THE ORIGINAL VALUE WHICH MUST BE DISPLAYED. ^IF THE VALUE IS
BETWEEN 1000 AND 1000000, THEN AT LEAST ^^MINDEC+3 \\DIGITS MUST BE
DISPLAYED RIGHT OF THE DECIMAL POINT. ^IF THE VALUE IS 1000000 OR
GREATER, THEN AT LEAST ^^MINDEC+6 \\DIGITS MUST BE DISPLAYED RIGHT
OF THE DECIMAL POINT.
.SKIP
^FOR EXAMPLE, THE VALUE 1234.56 WOULD BE REPRESENTED AS FOLLOWS FOR
VARIOUS VALUES OF ^^MINDEC \\AND ^^NOTATN. I\\T SHOULD BE NOTED THAT
WHEN THE DIGIT 5 RIGHT OF THE DECIMAL POINT IN THE ORIGINAL VALUE IS
NOT REPRESENTED, THEN THE DIGIT 4 LEFT OF THE DECIMAL POINT IS
ROUNDED UPWARDS TO 5.
.SKIP
.NOFILL
.TEST PAGE 5
                       ^^NOTATN=0  NOTATN=2  NOTATN=3
  \\FOR ^^MINDEC=MAXDEC=0      1235        1K    1.235K
      MINDEC=MAXDEC=1    1234.6      1.2K   1.2346K
      MINDEC=MAXDEC=2   1234.56     1.23K  1.23456K
.FILL
.SKIP
.INDENT -9
MAXDEC#=#\\MAXIMUM NUMBER OF DIGITS RIGHT OF THE DISPLAYED DECIMAL
POINT IN NUMBERS DISPLAYED IN FLOATING POINT FORM.
.INDENT -3
#=#-2, REPRESENT AS MANY DIGITS RIGHT OF THE DECIMAL POINT AS THE
FIELD WILL HOLD (UP TO A MAXIMUM TOTAL NUMBER OF DIGITS SPECIFIED BY
^^MAXSIG).
.INDENT -3
#=#-1, \I\F NOTATN \\IS NOT 3, OR IF ^^NOTATN \\IS 3 BUT THE VALUE
BEING REPRESENTED IS LESS THAN 1000, REPRESENT ONLY DIGITS LEFT OF
THE DECIMAL POINT. ^THE DECIMAL POINT ITSELF WILL NOT BE
REPRESEN