Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-02 - decus/20-0059/txttab.rno
There are 2 other files named txttab.rno in the archive. Click here to see a list.
.SPACING 1
.NOFILL
^^TTTTTTTTT XXX   XXX TTTTTTTTT TTTTTTTTT   AAA     BBBBBBBBB
   TTT     XXX XXX     TTT       TTT    AAA AAA   BBB   BBB
   TTT       XXX       TTT       TTT   AAA   AAA  BBBBBBB
   TTT     XXX XXX     TTT       TTT   AAAAAAAAA  BBB   BBB
   TTT    XXX   XXX    TTT       TTT   AAA   AAA  BBBBBBBBB\\
.FILL
.SKIP 2
^^TXTTAB\\  COLUMN FORMATS TABLES OF TEXT READ AS DATA.
^THE USER SPECIFIES THE NUMBER OF COLUMNS
AND THE NUMBER OF ITEMS IN EACH COLUMN TOGETHER WITH ITS WIDTH.
^THIS INFORMATION CAN ALSO PRECEDE THE TEXT.
^THE ITEMS TO BE INSERTED IN THE TABLE ARE READ ONE ITEM PER 
LINE, STARTING WITH THE TOP ITEM IN THE LEFT COLUMN THROUGH
THE BOTTOM ITEM IN THE LEFT COLUMN, THEN THE TOP ITEM IN THE
NEXT TO THE LEFT COLUMN THROUGH THE BOTTOM ITEM IN THE NEXT
TO THE LEFT COLUMN, AND SO ON.
.SKIP 3
.CENTER
^INSTRUCTIONS FOR ^USE
.CENTER
------------ --- ---
.SKIP
^WHEN STARTED, ^^TXTTAB\\ WILL ASK THE USER TO SUPPLY THE INPUT AND
OUTPUT UNIT NUMBERS AND FILE NAMES.
^SINCE ^^TXTTAB\\ IS WRITTEN IN ^^FORTRAN\\, FILE NAMES
CONSIST OF AT MOST 5 CHARACTERS, AND WILL ALWAYS
HAVE THE ^^DAT\\ NAME EXTENSION.
^THE USER IS THEN ASKED WHETHER THE SPECIFICATION OF THE COLUMN FORMAT IS TO BE
READ FROM THE START OF THE INPUT FILE, OR TO BE
SUPPLIED BY HIM IN CONVERSATIONAL MODE.
^DEFAULT ANSWERS ARE
SUPPLIED IF REQUESTS FOR UNIT NUMBERS ARE ANSWERED
WITH ZEROES OR IF REQUESTS FOR NAMES (OR FOR A ^Y OR ^N) ARE ANSWERED
WITH BLANKS (SPACE CHARACTERS) OR WITH JUST A CARRIAGE RETURN.
^A NEGATIVE RESPONSE TO A REQUEST FOR A UNIT NUMBER
WILL CAUSE THE DEFAULT ANSWER TO BE ASSUMED FOR THAT
REQUEST AND FOR THOSE NOT YET ASKED.
^THESE QUESTIONS AND THEIR DEFAULT ANSWERS ARE AS FOLLOW:
.SKIP
.LEFT MARGIN 5
.NOFILL
^REQUEST                                         ^DEFAULT
.SKIP
^^INPUT UNIT NUMBER =                             1
INPUT FILE NAME =                               INPUT
OUTPUT UNIT NUMBER =                            20
OUTPUT FILE NAME =                              OUTPU
IS FORMAT SPECIFIED IN INPUT FILE (Y OR N) =    Y
.LEFT MARGIN 0
.FILL
.SKIP
\\^IF THE SPECIFICATION OF THE COLUMN FORMAT IS NOT TO BE READ
FROM THE START OF THE INPUT FILE, THE PROGRAM WILL
PROCEED TO ASK THE USER FOR THE NUMBER OF COLUMNS TO BE
READ, AND FOR THE THE NUMBER OF ITEMS IN EACH COLUMN AND
FOR THE WIDTH OF EACH COLUMN AS A NUMBER OF CHARACTERS.
^A ZERO ANSWER TO THE REQUEST FOR THE NUMBER OF COLUMNS WILL CAUSE
THE CONVERSATION AND THE SIMULTANEOUS READING OF COLUMNS FROM THE INPUT FILE
TO CONTINUE UNTIL EITHER THE WIDTH OF THE TABLE HAS BEEN
FILLED TO THE MAXIMUM OF 60 CHARACTERS OR UNTIL THE END-OF-FILE IS READ
IN THE INPUT FILE.
^AT ANY TIME WHEN THE USER IS ASKED TO SPECIFY A COLUMN
LENGTH (OTHER THAN OF THE FIRST) HE CAN SUPPLY A
ZERO ANSWER TO CAUSE THE ALREADY ESTABLISHED PATTERN TO BE
REPEATED ACROSS THE REMAINING WIDTH OF THE TABLE.
^A ZERO ANSWER TO THE REQUEST FOR THE WIDTH OF A COLUMN
WILL CAUSE THE COLUMN TO BE READ WITHOUT ITS APPEARING IN THE OUTPUT.
^FOR EXAMPLE, TO GET COLUMNS OF LENGTH 50
WITH ODD NUMBERED COLUMNS BEING 5 CHARACTERS WIDE AND EVEN
NUMBERED COLUMNS BEING 10 CHARACTERS WIDE, THE FOLLOWING
RESPONSES COULD BE GIVEN.
.SKIP
.NOFILL
.LEFT MARGIN 5
^^NUMBER OF COLUMNS = 0 (\\OR CARRIAGE RETURN)
^^COLUMN  1 LENGTH = 50
COLUMN  1 WIDTH  = 5
COLUMN  2 LENGTH = 50
COLUMN  2 WIDTH  = 10
COLUMN  3 LENGTH = 0 (\\OR CARRIAGE RETURN)
.SKIP
.FILL
.LEFT MARGIN 0
^IF CONVERSATIONAL MODE WAS NOT SELECTED, THIS SAME DATA
MUST APPEAR AT THE START OF THE INPUT FILE.
^THE NUMBER OF COLUMNS WOULD THEN APPEAR ON THE FIRST LINE OF
THE FILE, AND THE LENGTHS AND WIDTHS WOULD
APPEAR ON A SINGLE NEW LINE FOR EACH COLUMN UNTIL
ALL HAD BEEN SPECIFIED OR UNTIL A ZERO COLUMN LENGTH SELECTED
REPETITION OF THE ESTABLISHED PATTERN.
^THE SPECIFICATIONS SUPPLIED IN CONVERSATIONAL MODE
FOR THE PREVIOUS EXAMPLE COULD HAVE INSTEAD BEEN SUPPLIED
BY THE FOLLOWING LINES AT THE START OF THE INPUT FILE.
.SKIP
.LEFT MARGIN 5
.NOFILL
0
50 5
50 10
0
.SKIP
.FILL
.LEFT MARGIN 0
^THE MAXIMUM SIZE OF THE CONSTRUCTED TABLE IS SET BY THE
DIMENSION OF THE ARRAY USED TO STORE THE TEXT READ FROM THE INPUT
FILE.  ^THIS ARRAY IS LARGE ENOUGH TO STORE A TABLE OF 66 LINES EACH
OF 60 CHARACTERS WHICH IS THE MAXIMUM WIDTH OF A LINE.
^THE TABLE CAN CONTAIN MORE LINES IF THESE LINES ARE SHORTER.
.NOFILL
.SKIP
.LEFT MARGIN 33
AUTHOR:  ^DONALD ^E.#^BARTH
         ^CHEMISTRY ^DEPT.
         ^HARVARD ^UNIVERSITY
         ^JANUARY, 1973