-; „.:

' :... '

:

.

:

' '

'

'

:

: NBS TECHNICAL NOTE

470

Edpac:

Utility Programs for

Computer-Assisted Editing,

Copy-Production, and Data Retrieval

If!

aSi 1

o

z

^"T °

F

°o.

\

'£>*

*<"*£AU Of "

\

U.S. DEPARTMENT OF COMMERCE

National Bureau of Standards

H:

fH
NATIONAL BUREAU OF STANDARDS

The National Bureau of Standards1 was established by an act of Congress March 3, 1901. Today, in addition to serving as the Nation's central measurement laboratory,

the Bureau is a principal focal point in the Federal Government for assuring maximum application of the physical and engineering sciences to the advancement of technology in industry and commerce. To this end the Bureau conducts research and

provides central national services in three broad program areas and provides central national services in a fourth. These are: (1) basic measurements and standards,

(2) materials measurements and standards, (3) technological measurements and

standards, and (4) transfer of technology.

The Bureau comprises the Institute for Basic Standards, the Institute for Materials

Research, the Institute for Applied Technology, and the Center for Radiation Research.

THE INSTITUTE FOR BASIC STANDARDS provides the central basis within the

United States of a complete and consistent system of physical measurement, coor- dinates that system with the measurement systems of other nations, and furnishes

essential services leading to accurate and uniform physical measurements throughout

the Nation's scientific community, industry, and commerce. The Institute consists

of an Office of Standard Reference Data and a group of divisions organized by the

following areas of science and engineering

Applied Mathematics—Electricity—Metrology—Mechanics—Heat—Atomic Physics—Cryogenics2—Radio Physics2—Radio Engineering2—Astrophysics2—Time

and Frequency.2 THE INSTITUTE FOR MATERIALS RESEARCH conducts materials research leading to methods, standards of measurement, and data needed by industry, commerce,

educational institutions, and government. The Institute also provides advisory and

research services to other government agencies. The Institute consists of an Office of

Standard Reference Materials and a group of divisions organized by the following

areas of materials research

Analytical Chemistry—Polymers—Metallurgy — Inorganic Materials — Physical

Chemistry.

THE INSTITUTE FOR APPLIED TECHNOLOGY provides for the creation of appropriate opportunities for the use and application of technology within the Federal Government and within the civilian sector of American industry. The primary functions

of the Institute may be broadly classified as programs relating to technological meas- urements and standards and techniques for the transfer of technology. The Institute

consists of a Clearinghouse for Scientific and Technical Information,3 a Center for

Computer Sciences and Technology, and a group of technical divisions and offices organized by the following fields of technology:

Building Research—Electronic Instrumentation — Technical Analysis — Product

Evaluation—Invention and Innovation— Weights and Measures —Engineering

Standards—Vehicle Systems Research.

THE CENTER FOR RADIATION RESEARCH engages in research, measurement,

and application of radiation to the solution of Bureau mission problems and the

problems of other agencies and institutions. The Center for Radiation Research consists of the following divisions:

Reactor Radiation—Linac Radiation—Applied Radiation—Nuclear Radiation.

1 Headquarters and Laboratories at Gaithersburg, Maryland, unless otherwise noted ; mailing address Washington, D. C. 20234.

2 Located at Boulder, Colorado 80302.

a Locator! at 6285 Port Royal Road, Springfield, Virginia 22151.
UNITED STATES DEPARTMENT OF COMMERCE

C. R. Smith, Secretary

NATIONAL BUREAU OF STANDARDS • A. V. Astin, Director

NBS TECHNICAL NOTE 470

ISSUED JANUARY 1969

Edpac: Utility Programs

for

Computer-Assisted Editing, Copy-Production,

and Data Retrieval

Carla G. Messina

and Joseph Hilsenrath

Office of Standard Reference Data

Institute for Basic Standards

National Bureau of Standards

Washington, D.C. 20234

NBS Technical Notes are designed to supplement the Bureau's regular publications program. They provide a means for making available scientific data that are of transient or limited interest. Technical Notes may be

listed or referred to in the open literature.

For sale by the Superintendent of Documents, U.S. Government Printing Office, Washington, D.C, 20402

Price 75 cents.
FOREWORD

This report describes one of a series of computer

programs being developed by the Data Systems Design

Group of the NBS Office of Standard Reference Data to

assist the Data Centers affiliated with the National

Standard Reference Data System. The text of this

report was reproduced from a typescript prepared on a typewriter terminal connected to a time-shared

computer system. The program listing was produced on

a phototypesetting machine at the Government Printing

Office from a magnetic tape produced at NBS.

II
TABLE OF CONTENTS

1

Introduction 1

2. Characteristics of the Program SCRAMBLE ....3

2.1 The Control Cards for SCRAMBLE 3

3. Characteristics of the Program SUBSTITUTE 6

3,1 The Control Cards for SUBSTITUTE 6

3

2 The Subroutine SUBSTITUTE 8

4. Characteristics of the Programs SEARCH and

BLOCKSEARCH 12

4.1 The Control Cards for SEARCH 12

4.2 The Operation of BLOCKSEARCH ...13

5. Preparation and Editing of Manuscripts 20

5.1 Characteristics of JUSTIFY 21

5.2 The Control Cards for JUSTIFY 21

5.3 The Format Control Symbols 24

5.4 Two Applications of JUSTIFY 28

APPENDIX

Program Listings 35

Scramble 36

Substitute 37

Subroutine Substitute 45

Search 52

Block Search 56

Justify 61

III
ABSTRACT

A description and listings are given of

EDPAC, a package of five related utility computer

programs: SCRAMBLE, SUBSTITUTE, SEARCH,

BLOCKSEARCH, JUSTIFY, ard their subroutines.

These programs perform transformations on

alphanumeric data. The programs have been written

in FORTRAN, with care taken to make them as system

and machine- independent as possible, permitting

their use on many different computers.

SCRAMBLE scans an input file for specified

characters, which it replaces by different

characters. SUBSTITUTE similarly replaces strings

of characters by other strings. SEARCH and

BLOCKSEARCH scan for the occurrence of certain

strings and list the lines or blocks,

respectively, in which they occur. JUSTIFY

p/oduces text, for printing on a card-controlled

typewriter or on an extended character printer,

which has been left and right- justified between

specified margins.

Some applications of the EDPAC programs are

discussed. Emphasis is placed on computerassisted text preparation.

Key words: alphanumeric data files, computerassisted text preparation, data retrieval, FORTRAN

programs, free field text files, mechanized text

editing

IV
1. Introduction

An important ingredient, even a necessity, for an effective solution to

problems of providing critical correlations of standard reference data is the

application of computers to as many facets of the problem as possible.

Computers have been applied to a wide variety of computational jobs, to

many bibliographic problems, and to automatic printing of data tapes. In

each of these areas, however, the existing programs require their own specialized input formats. Most of the time the form of these instructions

or data formats are dictated by considerations other thanjthose of simplicity

of operation or of universal application. Indeed, the two objectives often

seem contradictory.

Such attempts as we have seen in formatting data for computer input have

suffered from one or more serious drawbacks. The most serious of these has

been the inability of even comprehensive systems to cope with the general

case. It is our view that the more profitable line of attack on the problem

of compatibility and interchangeability . of data cards or data tapes is to

provide a series of utility programs which will transform, translate,

transpose, and transcribe information from one format to another.

The feasibility of handling free-field input of numerical data was demonstrated a number of years ago in a general-purpose computer program

developed at NBS.* In that program, a versatile subroutine for scanning a card was written in machine language. Now the facility for reading freefield numerical data is provided in the compilers for FORTRAN IV. The

extension of .the free-field capability to .the letters and characters employed

in English language text poses a variety of problems which cannot be solved

in a single scanning package. Here it seems more natural to provide a facility for translation, and transformation of characters or character

strings

To put the matter bluntly, we deem it less profitable to promulgate

rigid rules on punching formats for data or text, and more profitable to

devise flexible but easily used utility programs for handling mixed input or for recasting the input when other means fail.

This report describes five utility programs: SCRAMBLE, SUBSTITUTION,

SEARCH, BLOCKSEARCH, and JUSTIFY. The five perform non-trivial

transformations on alphanumeric data punched on cards or stored as records on

a magnetic tape.

The programs have been written in a limited subset of FORTRAN IV.

Particular care was taken to make them machine independent with respect to

internal bit configuration and system independent with respect to input and

output, and to minimize the modifications required in conversion to other

FORTRAN dialects. Although the programs are all independent and perform very

specific tasks, they can be used sequentially to carry out a series of

operations in which the results of one code are used as input for the next.

Furthermore, under a suitable operating system, it is possible to carry out a series of operations in a single run.

*Hilsenrath, J., Ziegler, G.G., Messina, C.G., Walsh, P.J., Herbold,

R.J., OMNI TAB: A Computer Program for Statistical and Numerical- Analysis,

National Bureau of Standards Handbook 101, Superintendent of Documents, U. S. Government Printing Office, Washington, D. C. 20402 (March 4, 1966).
An important application of such utility programs arises in the

preparation of manuscripts and reports, especially where it is important to

produce right-hand justified copy (flush right-hand margins). Furthermore,

the programs allow for a variety of precedence characters (used for shifting

from lower to upper case of a card-controlled typewriter or with an extended

character printer on a computer) . The combination provides reproduction copy

suitable for publication. Where graphic arts quality is needed, the programs

can be used to insert instructions for font changes on a photocomposing

machine.

When text is to be prepared for photoreproduction on a card-controlled

typewriter, it is useful to provide simple instructions for such things as: case shift, tab stops, and card eject with and without a line-feed. These

are achieved by assigning a symbol for each function. As choice of symbols

depends somewhat on the text, it is important for the system to allow for

their specification in a simple manner with a control card.

"reface to the Second Edition

That the stock of the first printing of this Handbook

should have been exhausted almost coincident with the

appearance

of the reviews of it, points up the keen interest in

user—oriented

systems for problem solving on modern computers. Equally

gratifying is the recognition by the designers of more conventional computer languages of the need to free

programmers from many of the tedious, annoying and err or—generating

rules and restrictions of early versions of FORTRAN - restrictions which are largely absent in OMNITAB.

Preface to the Second Edition

That the stock of the first printing of this

Handbook should have been exhausted almost coincident

with the appearance of the reviews of it, points up the

keen interest in user—oriented systems for problem

solving on modern computers- Equally gratifying is the

recognition by the designers of more conventional

computer languages of the need to free programmers from

many of the tedious, annoying, and error—generating

rules and restrictions of early versions of FORTRAN — restrictions which are largely absent in OMNITAB.

This edition differs from the first in the

following ways a number of typographical errors have

Figure la. The upper portion shows the condition of lines

of text after editorial changes were made. Each line is punched on a separate card. The lower figure shows the same

text after being processed by one of the Edpac programs.

The copy was produced on a card controlled typewriter.

-2-
2. Characteristics of the Program SCRAMBLE

Numerous situations arise in data manipulation where it is necessary to

.jplace one character by another. A common example is the conversion of data

from single precision to double precision format where every E must be

changed to a D. An example at the other end of the application spectrum is

the encoding of straight text via a substitution cipher. The SCRAMBLE

program handles both of these problems with equal facility. The substitution

is achieved by having two sets of symbols punched in one-to-one

correspondence in corresponding fields of the first two control cards. In

this way, the symbols on the second card always replace the symbols in

corresponding positions on the first. It is possible, for example, to

replace all vowels by a single letter or by a special symbol. If the vowels

are replaced by a blank and words are otherwise separated, one has a useful

tool for computerized exercises in linguistics. The code will perform as many as 80 single character substitutions in a single pass through the

machine.

2.1 The Control Cards for SCRAMBLE.

The first control card contains those characters for which substitutions

are to be made in accordance with corresponding instructions punched on the

second card.

The second card contains those characters to be substituted for the

characters in the corresponding fields of the first control card.

The third card contains four switches in FORMAT (312,114).

a. Switch one should be a 1 (one) when a special output unit is to be

written and a zero if not. The special output unit is specified by switch

number 3 (see paragraph c. below).

b. The second switch is the unit from which to read the input file. (If

the switch is zero, the program sets the input to unit 5 for the card

reader.) The first three control cards are always read from unit 5 but the

choice of a unit for the input file is left up to the user.

c. The third switch is the unit, separate from the printer, on which

to write the output files. When this switch is zero i.ne cunt is set to 3

(the card punch)

d. The fourth switch contains the width (number of characters) of the

text of the input file. SCRAMBLE assumes a width of 80 if "width" is less

than one or greater to 132.

The program will come to a normal stop if it encounters an input record

containing a duplicate of the first 26 columns of the first control card,

otherwise it will read input records until it runs out of records to read.

The program will terminate at once if the first two control cards are identical in all 80 positions.
XY

YX

g, o 0< 360 Z(I) = BLK 360 Z(I) =BLK

370 DO 700 1=1*51 370 DO 700 1 = 1 » 51

375 Z6=I 375 Z6=I

380 Z7=Y1-(Z6-1. )*Y3 380 Z7=X1-(Z6-1. )*X3

X8=Z7-Y4 Y8=Z7-X4

X7=Z7+Y4 Y7=Z7+X4

Ml=(51-I )*2 Ml=(51-I )*2

420 IF (Y(M)-X7) 450*430*430 420 IF (X(M)-Y7) 450*430*430

430 M = M+1 430 M = M+1

GO TO 420 GO TO 420

450 IF (Y(M)-X8) 690*520*520 450 IF (X(M)-Y8) 690*520*520

520 DO 560 I 3 = 1 » 1 1 520 DO 560 13=1*101

Z3=I3 Z3=I3

Z4=X1+(Z3-1. )*X3 Z4=Y1+(Z3-1. )*Y3

Z5=Z4+X4 Z5 = Z4 + Y.4 550 IF (X(M)-Z5) 590*590,560 550 IF (Y(M)-Z5) 590.590*560

560 CONTINUE 560 CONTINUE

Figure 2a. An application of SCRAMBLE to modification of a computer program

wherein every X was replaced by a Y and vice versa. The old program is on

tlje left, the transformed version is on the right. Note the simplicity of

the three control cards on the left. The zero designates no special card or tape output. ,0n the computer used at NBS, a blank is read as a zero.

0UU30U

0UU400

0UU50U

0uu60U

0uU700

1" n "

ui)3300

Uio90U

0u*+00U

0U41OU

ou<+20u

0U430U

0U440U

OOUSOU

0u<+600

0U470U

0UH80U

0U490U

division.

alphabetic emploree listing.

3?4 OF SYSTEM hOOK.

1 5 $

0U0000 IDENTIFICATION

OuOlOU IRRuGrAm-iD.

0U0200 AlMHuR. LA7AK.

REMARKS. SEE PAGE

DA lE-CoMPlLEU.

F.Nv/iNOvjMtNT DIVISION,

CO.mFIGuKATIoi

SOu^~ r -lFVEL

ui FlLLfaR

pRiNl-FlLE

LAdEL RECOkOS mR(- RECORU CONTAINS 132 LHARAC1EKS

UATA RECORD IS PRlNT-RhC.

PRINT -REC PICTURE xC 1321.

WOrfKINb-STORMGt SECTION.

01 PP-UI PlCTURt 4Cb].

PAt>E-CT PICTURE 9CfaJ VALUE ZEROES.

Ul t-ERSoNwAST PICTURE XT 78 J.

113 tLAH PICTURE XC r> 1 VALUE : IHUk X!.

U3 ULLrR PlCTuRL XI" 1 H J VALUE SPACES.

ULLhR PICTURE X[ 24 I VALUE IMmSTER PERSONNEL RElORO

Ft)

01

01

r-lCTUKfc

PICTUWF

kTCTURE

OmITTEu

,>C I J. XC1U0 .1. XXX.

XC335D.

u3

/-r-» . y*" r

Figure 2b. In this application to a COBOL program, the six symbols

+ ( ) - ' X are changed to < [ ] > :\) respectively.
pa^e number: **i AbCDEFGHIJKLMNOPQRSl UVWXYZ(U23^5fe789

2A8C6eFGHIJKLMNOPQRS"TUVWXY9012345678'

1.5.8'." 3. S»GDNGDSHBZK •K'NKHC »P>SZSD »0» GXRHBR » •

)

»U». »K„._ ».OJ IJSDQRNM ) ... ...

)

-CB

•w'DKDZGdG NE dTOQDMS HMSDQDRS HM RNKHC RS2SD 0GXRH8R HMBKTCDR ) CDUDKNOLDMS ZMC ZOOI\HBZSHNM Nt. MNMKHMDZQ SOZMRONQS SGDNQX.r .DWSDMRHNMR NE.)_ St»D DtEOBSHUD EHDKC SUONQHDR NE LZFMUSHRLr ZMC HMUDRShFZSHNMR NE RDUDQZK)

ZRODBSR UE ROHM QUKZBSHNMr OZQSHBTKZQKX MDZQ SQZMRHSHNM SDLODQZSTQDR . )_

) f,._,._l T • MHS_Z QX.il L ».ZS«HW J E_» HDKC » S • GDNQX ' » ) C

i F

t •l'NGMRNM* »I«Q.)

•tt'DRDZQtJG HR TMCUQVZX SN CDSDQLHMU HE SGHR SGDNQX^'R MNMKHMDZQ)

DPTZSHlMM bZR SGU DKDLOMSZQX OZQSHRKO RODBSQZr HM OZQSHBTKZOr SGD ) DKDBSONM. 'B'TQQUMS RSZSTR NE SGn VN«J HR SGU EHMCHMF NE Z BNMSHMTTL)

NE..' 1H ' FOUU OZQSHHKU M-4 y RNKTSHNMR » ZLNMF..yGHBG ^ZQp ._SG D__MD TS_QHMNRJL X

•S»GD OQNAKDL ZS OQURUMS HR SN""RDKUBS EQNr SGHR BNMSHMTTL SGD)

RNKTShNMR VbHdG ZQD RSZAKD TMCDU SGU HMSUQZBSHNM NE SGU OZQSHBKU VHSG HSR)

DMUHQNMLDMS. 'S'&D OQHLD DEENQS HMUNKUDC HR SQXHMF SN CN SGD MTLDQHBZK)

ZmZKXRHR NM S(j[) BNLOTSDQ BNMRHRSZMSKX RN SGZS SGD MTLDQHBZK BGDBJR

)

ENQ PHrrMl l"/K Tl - ^5 ^ ' "^^"j^tim^nn nMr.-wjnn<;_. »7J MXMMn HMSnonR SDC HM SGHR)

PAbE number: 43

AbCDEFGHIJKLMNOPQRST UVWX_YZ(U23U56789_ _ __ _ _ _. BCDEFGHlJKLMN6pti^STUV«/XYZA1234567ft90

u 8 . ._....„ ;

.

.

'

i»»" tftHEORETICAL 'S'OLID «S»TATE »P«HYSICS« 1 •

)

»R». »L». »P»ETERSGN) _.

) ~^R»ESEARCH OF CURRENT INTEREST IN SOL

DEVELOPMENT AND APPLICATION OF NONLINEAR T THE EFFECTIVE FIELD THEORIES OF MAGNETISM*

ASPECTS OF SPIN RELACTION. PARTICULARLY NE

5. 1U_NIT ARY 1NPATR I X ' F » IELQ IT.' HEOR.Y.IU

' t ' • ' G » . ' J • OHNSON * • J • R .

)

i

ID STATE PHYSICS INCLUDES ) RANSPORT THEORY t EXTENSIONS.OF!.. AND INVESTIGATIONS OF SEVERAL)

AR TRANSITION TEMPER A.TURESj.)

'r"'ESEARCH IS UNDERWAY

EQUATION HAS THE ELEMENTARY

ELECTRON. •CURRENT STATUS

OF ' 5bf FREE _P_ARJ I CLE! 55_1

PRESENT

TO DETERMINE I PARTICLE SPECT

OF THF WORK IS

SOLU T.LQ N 5_» _.

. A MQNG

IS TO SELECT FROM »T»HE PROBLEM AT SOLUTIONS WHICH ARE STABLE.. _NuEK_TH_.._INTER

ENVIRONMENT. » T • HF PRIME EFFORT INVOLVED I

F THIS THEORY »5'S NONLINEAR)

RA» IN PARTICULAR?.. .THE I - THE FINDING OF A CONTINUUM)

wh I ch _ARj;_JDd&j!iEyifiJUi2St_L»_—

THIS CONTINUUM THE)

ACTION OF THE_.PARTI.CLE WITH US

S TRYING TO DO THE NUMERICAL)

Figure 2c. The top portion is tne result of a linear substitution of

characters. The bottom portion results from a restoration of the

original characters. The figures 1, 5, and 8 on the third control

card set input to read from the card reader (unit 5) and output to be

placed on unit 8. On the lower portion, no cards are punched and the

input is from unit 8.

-5-
3. Characteristics of the Program SUBSTITUTE

The program SUBSTITUTE is a more versatile version of SCRAMBLE and is

therefore more complex. It has a provision for replacing any character

string by any other character string regardless of where it occurs in the

text.

Among the diverse jobs this program can do are the following:

a. Convert text punched on cards in BCD format (all capital letters) to

upper and lower case, such as initial capitalization of the start of each

sentence, or names and initials of authors.

b. Replace any arbitrary set of symbols by corresponding instructions

for a phototypesetting machine.

c. Recognize typesetting instructions in a text and either delete them

or replace them with other codes.

d. Anglicize text written by Americans, and the reverse.

e. Replace journal abbreviations by their five letter CODEN designations

or vice versa, or by the full title.

f. Replace citation numbers in the body of a paper by new ones resulting from

insertion of new references.

g. Insert complex mathematical expressions when they occur frequently in

a text, thereby avoiding needless retyping and subsequent proofreading.

h. Insert typesetting instructions in place of code words for special

symbols not available on the input device but available on a phototypesetting

device.

i. Screen for and correct automatically inconsistent use of

abbreviations or symbols.

j. Change variable names in a computer program to avoid conflicts when

incorporating other programmers' work or to recover from the incompatability

of various FORTRAN dialects.

SUBSTITUTE is presented in two forms: as a stand-alone main program,

and as a subroutine suitable for incorporation into another main program.

3.1 The Control Cards for SUBSTITUTE

The first control card serves to define the punch configuration for the

characters in the text as well as the control characters upon which the

operations depend. The presence of the characters on the first card obviates

the need to define them explicitly in the program. This simple device makes

the program independent of a variety of incompatabilities xvhich are such a source oi trouble in adapting programs to different computers.

The program logic uses the disposition of the characters on the first

control card in such a way as to avoid entirely the need to know how a particular machine recognizes a character on a card, what the internal bit

representation of that character is, and where that character is placed in a machine word. In this way the program is independent of whether the

particular machine stores away 3 characters per machine word, or 6, or even

7. Nor is it dependent on whether a single character is stored leftadjusted, right-adjusted or any other way. The alphabet is punched in order

into the first 26 card columns hereinafter referred to as cc, and the digits

0,1 9 follow. in cc27 through 36. The character to be used to delineate

the 'strings in the output of this program is designated in cc38; while cc47

must be left blank in this program and in all programs in this series.
The second card contains three switches in FORMAT (312). They serve exactly the same purpose as the first three switches of the third control

card for the SCRAMBLE program.

The third and fourth control cards in FORMAT (Al, 13, 2A1, 12),

respectively specify the format of the input and output records. The five

items on each card perform the following tasks:

a. The first tells which symbol is used to designate a continuation when

the line is longer than the designated record length.

b. The second item defines the length (in character) of a record.

c. The next two items designate the characters used for case-shift lock

and case-shift unlock. Their use is required only under circumstances

described below.

d. The fifth item instructs the program to insert on input and delete on output, the case-shift symbols designated in item c. If this number is set

to zero, the option is bypassed, in which case the third and fourth items

discussed in c above may be left blank. If this item is a non-zero integer,

it distributes, when present on the third control card, and deletes, if

present on the fourth control card, the shift case symbols indicated by the

two previous items on the control card. See Figure 4a for applications of

this feature of program.

Immediately following the fourth control card is a deck of cards

containing the instructions for the string substitutions. In this version of

the program, each card carries two strings — the original one and its

substitute. The length of the strings this program handles is limited to a total of 76 for the string and its substitute. Thus a "long" string can be

replaced by a "short" one and vice versa.

Each of the strings is delimited by a balanced character which is read

from the first column of the substitution card. In this way each card can have its own string delimiter. The only requirement is that the delimiter

character must not be one which is in the string it delimits. See Figure 3d

for a sample set of control cards for this program.

The substitution table must be followed by a card with the t\'ord FINIS

starting in ccl. It may be followed by the text to be manipulated if the

input is from a card reader.

A number of text editing systems reserve one character as a precedence

symbol to indicate an upper case letter. Thus if we punch *WASHINGTON we would expect a suitable printer to print out Washington. A single symbol

could be used to print the word in all caps if one were prepared to type

*W*A*S*H*I*N*G*T*0*N. This is obviously too time consuming as well as wasteful of valuable computer space. The problem is easily solved by

reserving another symbol such as an apostrophe to indicate shift lock and

shift unlock. In that case our test word would be keyboarded as follows:

'WASHINGTON'

Subsequent transformation of these symbols as would be required in going

to automatic typesetting or converting from the BCD representation to EBDIC

would have to treat the character following the W differently in the strings

•WASHINGTON' and *WASIIINGTON. This problem is solved by this program in the

following way. When instructed to do so via the third control card, the

program changes 'WASHINGTON' to 'W' A' S'H» I 'N'G 'T'O'N. If instructed to do so via the fourth control card and after carrying out the substitution, the

interior shift symbols are deleted and the word is imbedded between the shift

and lock symbol.

•7-
Since one often replaces a short string by a larger one, some provisiion

must be made for spilling text over to the next record or line. Care is

taken not to split words in the process.

3.2 The Subroutine SUBSTITUTE

The substitution capability has been incorporated into a subroutine

whose name is SUBST. It can be called from a main program by using the words

CALL SUBST (IB, IW, ITYPE) . It must be called once to read in the control

cards and the substitution table for which purpose ITYPE is set to zero and

IB, and IW are ignored. It must be called again for each line to be

processed with ITYPE equal to 1 . At this time the variable IB denotes a singly dimensioned array on which the program is to operate. IW is the

number of characters in the vector IB.

On return from this subroutine, IB contains the altered line which the

main program handles in whatever manner is desired. IW contains the length

of the altered line. On the first call of SUBST (when ITYPE is zero) the

control cards are identical to those described for the program SUBSTITUTE.

In the interest of clarity the control cards for the subroutine SUBST

have been kept identical with those for program SUBSTITUTE even though

certain parameters required for the program are not needed for the

subroutine. They may be left blank without disturbing the operation of the

subroutine on those machines that equate a blank to a zero. Otherwise all

integer switches that are not needed must be set to zero.

='H». »H'. 'H'ENKEL* 'SSE'OUATION OF 'S'TATE AND THE 'T'HERMAL 'D'EPENDF

=»H. »H. 'HENkEL, '5'5'EQUATION OF 'STATE AND THE 'THERMAL 'DEPENDENCE

•H'. 'H'. 'H'ENKEL, '55E'QUATION OF 'S'TATE AND 2'3' 'DEPENDENCE OF 2 = 'E'LASTIC "COEFFICIENTS OF 'CRYSTALLINE 'A'RGON,'55» 'J'. 'CHEM. ='ELASTIC 'COEFFICIENTS OF 'CRYSTALLINE 'ARGON, '5'5 'J. 'CHEM. «PHY C •E'LTIC 'COEFFICIENTS OF 'CRYSTALLINE ALPHARGON, • 55 • 'J'OURNAL OF

Figure 3a. A printout of a problem to test the "lock" and "unlock" features

of SUBSTITUTE. The first line shows what was read from the input unit. The

second line shows the transformation required in order to recognize strings

of characters such as THERMAL. The third line shows the result after

substitution and restoration of the shift and lock mode. The final

transformation (the 3rd and 6th lines) were achieved via the following substitution table.

/'J. 'CHEM/ /'JOURNAL OF 'CHEMISTRY/

/'A/ /ALPHA/

*THE * *2*

' THERMAL ' ' 3

*

: LAST : : LT : The last line of the substitute table replaces the = sign by a null string.

•8-
:ilVF ANl J NEGATIVE IONS ARE PRODUCED In THIS FASHION DEPENDING

UPON CERTAIN SURFACE AND FREE ATOM PROPERTIES. 'EXPERIMENTS HAVE

BEEN CARRItU OUT WITH

- THE SURFACE IONIZATION OF FOREIGN ATOMS

IMP INGING UPON A TRANSITION METAL SURFACE '('I.E.* ALKALI ATOMS

ow Tungsten ( as wfll as the selfc »o» i surface ionization of

SUBSTRATF ATOMS » ( ' 1 .E. , TUNGSTEN, NIOjBJUM, AjMO RHENIUM(. *T'HF

AFPLICARILITY OF THE EqITTlIhR IuM 'S'AHAE'O'D 'L'ANGMUIR EQUATION

IS BEING STUDIED FOR A WluE SPECTRUM OF MATERIALS.

) r'CJ/'HEMICAL 'R'FACTIONS IN THE 'CRYOGENIC • R • EGION 1 I ' / ' ='M'. 'D'. 'S' CHEER AND 'K'. 'K'LEIN

'P'ROCESSES OCC URRING WHEN _G AS GFNERATFD FREE RADICALS REACT

WITH SOLIDS BELOW fuoT'K' ARE BEING STUDIED. 'R 'FACTIONS OF 'H»,

'JJ '' * T'> AND 'O' WITH CONDENSED OLEFINS PERMIT DETAlLED_

OBSERVATIONS On DIFFUSION IN THE SOLID, PRECISE RELATIVE RATES OF

COMPETITIVE REACTIONS* QUANTUM MECHANICAL TUNNELING^ THE NATURE

OF DISPROPORTIONATION AND COMBINATION REACTIONS, AND THE EFFECT

OF STRUCTURE ON RFACTIVITY.

Figure 3b. This text was punched on cards for a card-controlled typewriter.

The first and subsequent odd apostrophies shift and lock the carriage while

the second and succeeding even ones unshift the carriage (restores to lower

case). The transformation of this text stream to produce the results in

Figure 3c was achieved via the SUBSTITUTE program and the control cards in

Figure 3d.

PuSITlVF AND NEGATIVE IONS ARE PRODUCED IN THIS FASHION DEPENDING

'UPON CER T AIN Sl)RFATE^AKr[r?RFE"ATo1CT PROPERTIES . ">E<XPER fMENTS HAVE

BEEN CARRIED OUT WITH THE SURFACE IONIZATION OF FOREIGN ATOMS

TkiPI1TgiNG~UP"On' A "TRANSITION METAL SURFACE >9<I.E.» ALKALI ATOMS

ON TUIMCSTENXK AS WELL AS THE SELF- SURFACE IONIZATION OF

SUBSTRATE ATOMS >9<T7E . » TUNGSTEN. NlOHlUM, AND RHENH IM>f)< .. >T<HF

APPLICABILITY OF THE EQUILIBRIUM _>S<AHA_- >L<ANGMUIR EQUATION,

lb BEING STUDIED FOR." A WIDE SPECTRUM OF MATERIALS.

T>Ct f<HEMICAL >R<FJVXTTONS"nrN THE ">C<RYOGENIC >R<EGION : > ! < L>M<. >D<. >S<CH£ER AND >R<. >K<LFIN

COP<ROCESSES OCCURRING WHEN GAS GENERATED FREE RADICALS REACT

wiTH SOLIUS BELOW JUO_ >K< ARE BEING STUDIED . >R <EACTIQNS OF >HO

>U<. >T<» AND >U<TlwTfH CONDENSED OLEFINS PERMIT DETAILED

ObSFrtVATIuiMb ON DIFFUSION T N THE SOLID, PRFCISE RELATIVE RATES OF

"COMPETITIVE REACTIONS, QUANTUM MECHANICAL TUNNELING* THE NATURE

OF DISPROPORT10NATIUN_ANrj_COMBINAT10N REACTIONS, AND THEJEFFECT _

Of STRUCTURE ON RF ACT I V I T Y

Figure 3c. This text stream was produced by SUBSTITUTE from the text shown

above. The control cards to achieve this transformation are shown in the

next figure. The ATS System uses two tabs to achieve an indented line at the

start of each paragraph. The tabs are actuated by a square bracket ([).

SUBSTITUTE must therefore replace the four blanks by two square brackets.

This is achieved in this problem by 26 control cards which change each

capital letter of the alphabet that is preceded by four blanks to that same: letter preceded by two tab symbols ([[). One control card would have been

sufficient here if we were certain that the text did not contain four or more,

consecutive blanks in the interior of a paragraph.
AHCnEFGHIJKLMN0PQRSlU\/MtXYZ(U23U567f

$ flO» 1 3 73X 1

19 /

757"

/n/

75/

/6/

/7/

/H/

/ 'A/ /rc>A/

/ «H/

/ 'C/

/few

/roc/

f /L3V

/Lf D/

/ 'D/

/ »£/

/COD/

/re>E/

/L51/

A 6 3/

/L7l/

/L8 1/

/ »F/

/ »G/

/[[>F/

/cog/

/ »H/

/ '1/

/[[>H/

/col/

/L 9 J/

/LOV /()/

/ »J/

/ »K/

/COJ/

/rc>K/

/J-C/

/ D /

/-/

//

/ 'L/

/ ».M/ /COL//COM/

/ C /

/)C/

~" 2~

/ «N/

/ '0/

/CON/

/roov /•o/ />-/

//

/>9/

/ »P/

/ »Q/

./COP/

/roo/

/cor/

/COS/

/»1/

/•2/

/ 'K/

/ 'S/

/ •!/

/ »U/|

/•3/

/'<+/

//

/ = /

* /r l >"t/

/rou/ , /•6/

/•/

/>U/

/ »v/

/ »w/,

/rov/

/row/

/•7/

/»H/

/>//

// ! / »x/

/ 'Y/

/ •/•/ / » 5 • 5/

/rox/

/roY/

/COZ/ "7?"*—* />•/

/'9/

/»u/

/>57

//

/'+/

/•//

/><+/

/>.'/

/l»o:/

/i;»//

/.*./ 1 />IJ>.'/

/•*/

/•»/

//

/'/

/ J2C/ /2/

,/•'(/

/» /

/>9/

/ /

/Jit/

/J*+C/

/3/

/<+/

/:/

/'/

/ /

/>/ ; /J5C/

/J6C/

/5/

/h/

/-/

/%/

/C/

/]/

/>(J/

/>*/

/"JTC/

/ J8C/

/7>

/ft/

/(/

/*/

/jyc/

/Joe/

/Q/

/o/

/)/

/+/

//

/>+/

/L 1 3/

/L2V

/I/ 1 /2/ i

/"/

/L/

//

//

_^_ 1

1 1' 1 *

/J/

FINIS

Figure 3d. These are the control cards and substitution table required to

transform the text in the previous figures for loading °n the ATS System.

The solidus (/) at the end of the first control card defines the string

delimiter to be used in the output. On the next card: the 1 signals the use

of a special output unit; the 7 tells the unit from which to read the input

text; and the 3 indicates the special output unit. On the third control

card: the $ is the continuation symbol used on the input records which

contain 80 characters each; next follow the shift-lock and the shift-unlock

symbols; and the 1, switches on the "unlock" feature of the program. On the

fourth control card the square bracket (]) is the continuation symbol used to

extend to the next card a record which is longer than the 73 positions

designated; next follow the ATS shift-lock and shift-unlock symbols; and the

1 restores th* "lock" feature required by the ATS System.

10-
/>»A.'a!/

. /&A.A./—

/ttA>A»/

/Ua 'a'/

/>8>A>./

/>tf>A>'/

/>8A>./

/a>A>'/—

/>8A>«/

'ftA^JLA

/!G5>tt!G2/

/LLG6».'G2/

/!G5«.'G2/

_X!i358!-G2/

/!G6>rt/

/!G6>8/

/!G6>«/

yLG6#/

/!G6>«/

^!G68/

/!G5>8/

/!G6>«/

/!G5>«/

/JG68/

/.'G58/

/!G5»/ _

/>«A.A./

.^^MaIa!/.

/8A.r A!/

„_ZMA.A./

/>8>A>./

/>a>A>'/

/»G6>«!G3/

_V!G5>a!G3Z_

/.'G5S.'G3/

/-l£6t

/!G6>8/

/.'Gfi>8/

/>«A>./

_ys>A>'/

/>8a>»/

_ZMA>JL/_.

/>HA!/

_^>AA..y_.

/>SAr/

/UA'./

/majJ:

/!G6>«/

/I.G.68/

/!G6>H/

/fG68

/!G5>8/

_ZJ G6>M/

/!G5>«/

/.'G68/ .. /!G58/

/ I G587

/ !G4>»!G3/

Figure 3e. A partial listing of a substitution table which tranforms the

character stream produced on the ATS System to the character stream required

by another program for processing the text for a photo-typesetting machine.

Although the first string must start in cc 1, the position of the string

to be substituted is not rixed on tne caru.

/ M=*/ / iv,= ANY/ /<;CO/ /CO + Co/

/ M -/ / m= / /^CO/ /CO + CO/

/ fv|= */ / M= ANT/ /tC2/ /C2 + C<;/

/ M=/ / M= / V«iNH/ /NH +.NH/

/ M=*/ / M= ANY/ /#l"0/ / NO + NO/

/ 20H/ / un + Oh/ /<.CH/ /CH + Cri/

/ 2H7 / H + H/ /cm/ /H + h/

/ 2N/ / N + N/ /mLHO/ /AlOH/

/ L/ / EC-J/ /uFO/ /hOt-Z

/»/ / / /oLNA/ /NmCL/

/-L»/ / => EC-3 / /oLLI/ /LiCL/

/-t / / -> tt-J / /OLNA/ /NmCL/

/-2H/ /=> h + h/ /CHOf/ /CrlO /

/->/ /=>/ /Ci_H/ /hCi_/

/=./ / => / /OLK/ /KCl_/

/+20H/ /on + Oh / /OHO/ /CHO/

/+ M/ /+ !»(/ /cOH/ /CHO/

/ + 2H/ /+ n + h/ /I-LI/ /Lit-/

/+£/ / F.L-J/ /t-oO/ /HUl-/

/ + t/ / LL-J/ /hNA/ /NAh/

/+M/ / + |.|/ /H\/ /KF/

/+/ / + / /l-B/ /bl-/

/<iCHO / /CHO + CHO/ /FK/ /KF/

/^BH2/ /BH2 + BH2/ /FH/ /HF/

/criF2/ /HF2 + bh2/ /HUNA/ /NmOH/

/<iC2H/ /Cs.h + L^H/ /n2C0/ /CH20/

/*CH2/ /CH2 + Ch2/ /nUH/ /H2o/

/«;H20/ /H2o + hdO/

Figure 3f. A portion of a representing chemical reactions

substitute table for editim equations

-11-
4. Characteristics of the Programs SEARCH and BLOCKSEARCH

SEARCH and BLOCKSEARCH are useful for data retrieval. The

searches a card image of a single line of text for the presence

of a group of words or strings or fragments; it prints out

punches out a card when such items are located.

first program

of any- or all

the line or

BLOCKSEARCH is able to scan an entire block of lines, making it

generally more useful in data retrieval. This search is made not on a single

line but on a suitably delineated block, such as a paragraph, a page, a full

bibliographic citation, or an abstract. On a successful match the entire

block is printed or punched.

An importan

handle fragment

interior of word

the word. For e thermodynamics

,

the program is

Aero thermo dynami

(represented her

endings or suffi

CELLUFLEX, but

strings °CEL and

and/or ending wi

t feature of these searching programs is the ability to

s such as prefixes or suffixes or even fragments in the

s. Ordinarily the scanning is anchored to the beginning of

xample, asking for the word "thermo" would produce lines with

Thermodynamics, thermo-chemistry , and Thermochemistry. If

set to the unanchored mode, it will locate the word

cs as well. In this search mode, imbedding a blank

e by a °) at the end of a string restricts the search to xes Thus, when asked to locate FLEX° , the program will find

not FLEXIBLE. Set to locate all lines containing both of the

LEX° , this program would locate all words beginning with CEL

th LEX, such as °CELLUFLEX° or COMPLEX CELLS.

A feature of both the SEARCH and BLOCKSEARCH programs is the ability to

identify fragments of words as easily as entire words or phrases. Another

interesting and important feature of these programs is their ability to

recognize word fragments in the interior of words as well as at the ends.

Since recognition of interior fragments requires more machine time, a switch

has been provided to designate whether the search is to be "anchored" at the

beginning of a word or allowed to proceed into the interior of a word. The

combination of spaces (°) and anchor switch setting provide for the following

search strategies.

ASKING FOR WITH MODE GIVES

ION

ION°

ION

ION

ION

anchored

unanchored

anchored

unanchored

unanchored

ION

ION

IONIZED

ACTION

MENTIONED

Note that asking for ION in the unanchored mode will find lines

containing prefixes and suffixes as well as interior fragments.

4.1 The Control Cards for SEARCH

The first control card is the same as the first card of the program

SUBSTITUTE. It performs the same functions here. Here again cc47 is left

blank but cc50 is now used to designate which character is used to terminate

the search strings. If the strings are single words, a space will suffice;

but if phrases are to be allowed the space cannot be used to terminate

strings. In this, a period or any other symbol not appearing in the search

text can be used.

12-
The second card contains four switches in FORMAT (412).

a. This switch should be a non-zero number if a permanent file of the

selected cards is desired either on cards or tape in addition to

the normal printed output. In this case the unit on which the copy- is made is designated by the fourth switch (see d. below). If this

switch is zero, results appear only on the printer.

b. The second switch should be set to zero for searching in the

anchored mode and non-zero for an unanchored search.

c. This switch instructs the machine to read the original data file

from the specified unit. iThe unit is set to 5 i^ this switch is 0.

d. This switch instructs the machine on which unit to write the copy of

the abridged file. The unit is set to 3 if this switch is 0.

The third control card carries either the word AND or OR. If the card

carries the word OR, a line will be printed out if it contains any one of the

designated words or fragments. The use of the word AND imposes the condition

that all of the words must be found on a single card image for successful

selection. The order in which they appear is immaterial.

The control cards which follow contain the words, phrases or fragments

for which the file is to be searched. The search strings must start in ccl

and must be terminated by the character designated in cc50 of the first

control card. The entire list is terminated on a card carrying the word

FINIS, starting in column 1 and terminated by the designated string

terminator. This last seemingly unnecessary requirement permits one to

include in the search such words as FINISHING which would otherwise terminate

the search list.

Here again, when the program encounters any card which matches the first

control card (a card with the normal alphabet punched in the first 26

columns) ,

, it comes to a normal machine halt.

4.2 The Operation of BLOCKSEARCH

As presently constituted, this program recognizes any fixed block

separators (delimiters) starting in the first character of a record. The

length of the block delimiter is optimal as is also its content. Thus if one wished to delimit blocks by identifying each block with the word BLOCK

followed 'by a sequence of numbers, the string BLOCK nnn could be the first

few characters in a paragraph.

A more natural delimiter for paragraphs would be the three or more spaces

a typist normally uses to indent the first line of a paragiaph: or a Dlank

line which is often used in text having blocked paragraphs or more generally

in separating items in a bibliography etc.

What is more important in this connection is the fact that many

systematically structured books, reports or documents contain useable flags

or separators which are part of the normal text. In these circumstances it

is not necessary to include artifical block separators. This makes it

possible to apply this program to many existing data files without special

restructuring.

Blocks may be as small as one record (one line) or as large as the space

reserved in the program in the dimension statement governing the size of the

block. If a block is larger than the number of characters set aside in the

program, the search is performed first on the front portion: independent of

the remainder, and then independently on the remaining portions. The lines

-13-
^MoMaM-anttMsnM MEYER

20CH

APK

APK

127

128

253

497

1865

1866

KUND 1 WIEDEMANNAPK

APK

15b

157

177

1 18751876

WARBURG

VANITTERbEEK

VASIlESCO

APQ

APQ

19

20

88

137

194*+

1945

VANOONINCK 38700

VASILLSCU

REGNAULT

APQ

ASP

20

2b

292

1 1945

1862

38700

MICHELS

MICHELS

ASR

ASR

1

1 94

103

1946

1946

DEGROOT

OEGROOT

MICHELS

TITAlMl J

ASR

BCS

14 52

68

1954

1929

i/JASSENAAR 387U0

38700

ADZUMl

MACCURMALK

BUS

CJC

12

29

199

699

1937

1951 SCHNEIDER

WOOLLEY

COOPER

CJP

CJR

31 604

388

1953

193U MAASS

COOPER

SUTHcRLAlMD

CJR

CJR

2»3

428

1931

1932

HAASS

MAASS 38700

TAPP

WINCKLER

"FITT

DACEY

CJR

CJR

217

613

1933

1933

STEACIE MAASS

MAASS

CJR

CjR

12

17

686

206

1935

1939

JACKSON

MACINTOSH MaASS

MACINTOSH

CLARK

CJR

CJR

17

1M

241

39

1939

1940

MASOn

NALUKETT

~C~jR~

CuR

TUT"

116

UACEY MAASS

KATZ __ iMALL)RETT~MAAS'S"'

MaASS

Lt-VERTON WOOoS

lM

18

1940

194U

KATZMASSUN

XuR~

CPR

~5T

464

27

44

1949

1857

LEUUC

AMAbAT

CPR

CPR

113

113

lbb

446

1891

1891

~AM7\OaT

JAOUlKuU

CPR

CPR

li4

139

1093

1*9

lb92

19U4 P1NTZA

GERMmNN

60 1

CPR

CPR

157

lbS)

92b

2J6

1913

1929

(-ORT1ER

HORTit-R

CPR

CPR

2Uj>

20m

711

50b

193b

1939

KASStL

PIRE

CkV

EHQ

lb

27 2b7

193b

19*9 MULES

l^JTG-bOTELLA EFQ ~~2~7 3T5^ r?Z9~

l^'OLEb EFfc) 3u 162 1932 SALAZAR

MOLES EI-0 ~^2 554" F934" SaLAZaR

MOLEs EKQ 3b 42 19^7 TORAL

MOLES

SACKUk

EHU

ETC

"3b"" 2u

~Zb3~

563

T93T

1914

ROOUERO

~D"AMKCThlEk"

HRANCK

^GCfFf —

MAJUMUAR

SWElbbKl

XTC"

EIC

4rt 55

~52~

6^>b 1942

1951

TTPTT ImS M T25-

171

1946

19^8

bKATCH

PORTLR

UOUGt

JAC

^JaTT

3b- 48185

2059

194b

192b

4S) 610 1927

rtLBER AllETT

PERRY

JaVIS

Figure 4a. A portion of a file of references on data of state used to

illustrate the operation of the program SEARCH. See the following figures for

results.

•14-
- ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 10 5 7 * AND

THE PROGRAM IS SEARCHING FOR LINES CONTAINING ALL OF THE WORDS GIVEN BELOW.

193

ADZUMI BCS 12 199 1937

COOPER

COOPER

CJR

CJR

2

4

388

2.Q3

1930

1931

MAASS

MAASS

' SUTHERLAND

TAPP

CJR

CJR

6

9

428

217

1932

1933

MAASS

STEACIE MAASS

3870

wlNCKLER

PITT

CJR

CJR

9

12

613

686

1933

1935

MAASS

JACKSON

DACEY

MACINTOSH

CJR

CJR

B 17

B 17

206

241

1939

1939

MACINTOSH MAASS

DACEY MAASS

FORTIER

FORTIER

CPR

CPR

203

208

711

506

1936

1939

KASSEL

MOLES

CRV

EFQ

18

30

277

182

1936

1932 SALAZAR

MOLES

MOLlS

EFQ

EFQ

32

35

954

42

1934

1937

SALAZAR

TORAL

MOLES

MAJUMDAR

EFQ

IAS

35

8

263

171

1937

1938

ROQUERO

BARTLETT

BARTLETT

JAC

JAC

52

52

1363

1374

1930

1930

HETHERINGTON

HETHERINGTON - CLAYTON

GlAUQUE

JAC

JAC

54

55

2610

4875

1932

1933

GlAUQUE

CLAYTON

ASTON

BENEDICT

JAC

JAC

57

59

1642

2224

1935

1937

WILLIHNQANZ

BENEDICT

WiEBE

JAC

JAC

59

60

2233

2300

1937

1938 GADDY

HODGE

HUBBARD

JCP

JCP

5

5

974

978

1937

1937 HODGE

3870

KISTIAKOwSKY

ROSSINI

JCP

JRS

7

9

281

733

1939

1932

RICE 3870

3870

MEYERS

VARoAFTlK

JRS

JTP

10

8

381

189

1933

1938

VANDUSEN

PARFENOV

keesom

crommelin

LCS

LCS

19

20

27

10

1931

1931

VANITTERBEEK NO 216D

BIJLEVELD N0217B

KEESOM

BOND

LCS

NAT

22

137

1 1031

1937

1936

BIJL NO 245D

3870

VANITTERBEEK

ROEBUCK

NAT

PAS

142

64

793

287

1938

1930

CLAES

3870

Figure 4b. A portion of the output from the search of the file shown in the

previous figure. The second control card instructs the program to read from

unit 5 and write the output on unit 7. The zero denotes an "anchored"

search. In this case the search is made for 193 as we wished to extract all

papers published in the 1930's. While the AND in the third control card

seems superfluous, it, or the word OR, is required,

would do equally well.

In this case either word

•15-
at which the blocks were broken in this instance, are printed out preceded

by the statement:

BLOCK IS TOO LONG. BLOCK IS CONSIDERED TERMINATED WITH THE FOLLOWING CARD.

In order to operate successfully in the anchored mode, it is necessary

to insure the existence of a space (°) between the first character of a line

and the line before it. This is handled automatically by the program which

inserts a blank space before each line when the block is read in. This

provision allows for carrying sequence numbers extending to column 80 of a card or the last character of the record. Thus, if a card or line ends in

1798 and the word "JONES" appears in the next line, the string to be searched

reads 1798°JONES rather than 1798JONES. In^ the former, a search on JONES in

the anchored mode would be successful; in the latter case, it would not.

The first control card is identical with the first control card for

SEARCH.

The second control card contains 6 switches a, b, c, d, e and f in

FORMAT (512, 114).

a. This switch, when non-zero, causes a magnetic tape to be written on

the unit specified by switch e.

b. This switch should Fe set to zero for an anchored search. Any nonzero number causes the search to be carried out in the unanchored mode.

c. This switch tells how many characters to expect on the next ' control

card which carries the block separator (flag). If this number is not an integer between 1 and 80, the program sets it to 80 automatically.

d. This switch gives the unit number from which to read the data file to

be searched.

e. This switch is the unit on which to write the selected blocks.

f. This switch tells the length of the records which comprise the file

to be searched. If this switch is not between 1 and 132 it is automatically

set to 80 characters. It is also useful in limiting the reading of cards to

72 or less columns to ignore identification or sequence numbers which are normally punched at the extreme right of a card. In this way when the

sequence numbers carry no pertinent information, they are ignored in the

search and deleted on the output. If, on the other hand, they carry useful

information, this switch permits them to be included both in the search and

on the final output.

The third control card contains the block separator starting in ccl and

having a length specified by switch c of the previous card. If c were 5 and

this card were blank, the normal paragraph indention would serve to delimit

paragraphs in straight text. If c were set to 80 and this card were left

entirely blank, a blank line of 80 characters could serve as a block

separator.

The control cards which follow contain the AND or OR switch and the

search list terminated by the word FINIS exactly as in the program SEARCH

(see Section 4.1).

-16-
ABCOEFGH1JKLMNOPQRSTUVWXYZ0123456789 10 7 3

*

OH

THE PROGRAM IS SEARCHING FOR LINES CONTAINING ANY OF THE WORDS GIVEN BELOW.

JAC

JCP

JRS

PITT CJR 12 686 1935 JACKSON

6ARTLETT

BARTLETT

JAC 52 1363 1930

JAC 52 1374 1930

HETHEKINGTON

HETHERINGTON

CLAYTON

GIAUQUE

JAC 54 2610 1932

JAC 55 4875 1933

GIAUQUE

CLAYTON

ASTON

Bt-NtDICT

JAC 57 1642 1935

JA_C.„ _59 .2.224 l-937._. WILLIHNGANZ

dtNtDlCT

WiEbE

JAC 59 2233 1937

JAC 60 2300 1938 GADDY

HODt>E

HUBBARD

JCP 5 974 1937

JCP 5 978 1937 HODGE

3870

KlSTIAKOwSKY

ROSSINI

JCP 7 281 1939

_ JRS 9 733 1932

RICE 3870

. . 3.S70

MEYERS JRS 10 381 1933

AbCDEFgHIJKLMNOPQRSTUVWXYZO 123456789

VANDUSEN

*

- i

Figure

previous

designat

instruct

stored

sequenti

sophisti

that in

producti

4c. The results of a pass through the abridged file shown in the

figure to extract all references appearing in the journals whose

ions are JAC, JCP, and JRS. Note here that the second control card

s the program to read from unit 7, which contained the abridged file

by the previous pass (see Figure 4b). This problem illustrates how

al applications of the simple SEARCH program can result in more

cated search strategies than have been explicitly provided. Note

the first line the JAC in JACKSON also provides a hit. In a on search this can.be avoided by attaching a blank space (JAC°).

17-
AiCDEFGHIJKUMN0PQRSTUV|KXyZ0J2 3H56789

1 3 5 1 : CA

THE PROGRAM IS SEARCHING IN LINES OF LENGTH 80 CONTAINING ANY OF THE WO

RAM * NITR0«

FINIS*

„_ . 06300OCD

VIBRATIONAL SPFCTRA OF fiFM'Q l[frrTR7jP ARAFF IHS* 1. 2,2" ntJOOOEQ

DINITROPROPANE. " "" Q63Q00E0

R ljfZKnWSK I, I 063QQ0EQ

URBANSKI, T 063000EO

SPECTROCHIM . A CT A 22 , 227 * 33 C19 64 3 Q63000EB

MICRO 063000EO

SP * C 06 3000E0

19-66 063000E0

-LAS— 06 3000EO —V-i-B Q6 3000E0

2.2-DINITR0PR0PANE 06300GE0

La 6^nn9nR9Hi it 0630ooeo

VIBRATIONAL SPECTRA Or TR

M£THY L AM I NE OXIDE DIhYDRATE* 063000EO

KuRODA , -X , Q63QQ0C0

KjMURa. M 0630O0E0

S P E CTR OC HIM . A CT A 22 , H7-6 6 C19 66 3 063Q00E0

M ICR0 063000E0

S P A C 06 3000EO

1966 063000EO

-£*£: 06 300,0E q

lK A " f 0630Q0E0

_V-+fi __ 06 30QOEO

THIHETMYLENE OXIDE 063000EO

AiC0 FF S H I,l iaMM PQRSTUVa) X YZ Pl 23'< S 6 7 8 9 - = :

Figure 4d. Results from a run in BLOCKSEARCH for either 'RAM or NITRO. As

the search was made in the unanchored mode, we picked up the word GEMDINITROPARAFFINS, as was intended. Note here that the characters CA° were

used as the block delimitor. The last card containing the alphabet is the

last card of the data file. It is used instead of an "end of file" mark to

signal the end of data because an end of file mark in some machines stops the

operation dead.

18-
ABCOEFGHlJKLMNOPQRSTUywXYZO 123456789

13 5 3

THE PROGRAM IS SEARCHING IN LINES OF LENGTH 80 CONTAINING ANY OF THE WORDS GIVE

SPECT*

SPEKT*

FINIS*

) 01205 'T'IlFQRD > 'S'.'G'.' ' V ' ANDERSLICEr 'J'.'T'. AND 'WILKINSON*)

01205 '^i£Ur +• HIGH. RESOLUTION VACUUM ULTRAVIOLET ABSORPTION')

01205 '(5PECTRlM> 0F THE E «1 'PI ... X SIGMA + TRANSITION IN CO' + ») 01205 ' C~« AN V *J'• . 'P'HYS. 43» 450(1965'(»)

) 01209 'N'AMIOKAf 'T'.» +' ABSORPTION ^PECTRA) OF H2 IN THE VACUUM')

01209 UJLTRAVIOLET JREGION' . 'II'. ' THE B' (PRIME' ( .X

> 'B' + '.X'»)_

01209 41 r) 01209•D.X'» 'AND D'(PRIME'(.X BANDS'+r

2l41(19e>4' (')

J». 'C'HEM. 'P'HYS.

)_01212 ^d'ORlSOVf 'Y'.'A'. r 'G'USAROV r 'A'.'V. AND 'G'OROKHOVr)

012T2 "'L'.'N'.r +« mass

(

Spectrometer investigation of the')

01212 'EVAPORATION OF CESIUM PEROXIDE' +» 'H'lGH ' T'EMPERATURE 2i 01212 440(1964' ('

)

) 01217 'M'UBERf »K'.'P».» +'OIE RYDBERG. SERIEN IM

ABSORPTIONSSPEKTRUf^

01217 'DES NO.MOLEKULS'+r 'H'ELV. 'P'HYS. 'A'CTA 34 , 929

JSSPEKTRU^

:i9bl' rfr

) 01218 'G'LADUSHCHAKr 'V'.'I'. AND 'S'HREIDER* 'E'.'Y'A.r +'THE')

01218 ' MEASUREMENT." OF ABSOLUTE INTENSITIES IN THE VACUUM REGION')

01218 )121 'ofO F theCspectrum> THE (SPECTRUM^ ++ »> 'O'Ptics 'O'PTICS and 'spectroscopy 'ussr «i7» 75)

11218 (1964'(~'r"

"

)CA 64009085DLJLX_

VlBRATlONAL(gpECTRA>OF GEM-DINITROPARAFFINS.

DINITROPRO"PANE

BUCZKQWSKI r Z URHANSKTi,

I. 2»2-

IRS

#m

y/IB 2T2:=D"lTTrTR"0PRoFANE'

)CA 64009055GLIT

THE ELECTRONIC EMISSION (SPECTRUM )AND MOLECULAR CONSTANTS OF

IODINE MONOFL'UORIDE ." JURIE, R A ""CAN." J. PHYS. 44r 337-52 Cl9o6J

M ICRO _ CjPH

063000

063000

063000

063000

063000

063000

063000

063000

063000

063000

063000

063000

063000

0630 00 063000

06300

063000

063000

063000

063000

1650101

2650101

3650101

4650101

164

264

364

464

164020

264020

364020

464020

161010

261010

164010

264010

364010

464010

E07320

E07321

E07321

E07322

E07322

E07323

E07324

E07325

E07325

E07325

E07325

E07325

E07325

E07330

E07331

E 073 31

E07332

E07333

E07334

E07335

Figure 4e. Result of an unanchored block search in a mixed data file. The

search was for the fragments SPECT or SPEKT in order to retrieve titles in

English and German related to spectroscopy. Note that the only format that

the two data files have in common is that each uses the right parenthesis in

column 1 as a block separator.

•19-
5. Preparation and Editing of Manuscripts

Preparation of manuscripts and other material which requires numerous

or periodic revision ordinarily entails repeated retyping and, consequently,

needs repeated proofreading. If such material is prepared originally on punched cards, much of the retyping and subsequent proofreading can be

avoided. Even without a computer, the use of punched cards represents

considerable advantage. Until recently, however, punched card techniques

did not permit the production of text with upper and lower case, thus

limiting the sphere of application. Now a number of manufacturers offer

line-printers with extended character sets. It is therefore now possible to

prepare camera-ready copies from a line printer via punched-card input which

has upper and lower case letters with subscripts and superscripts and greek

letters. Where graphic art quality is desired, the same tape can be

processed by an edit-insertion program now available commercially.

The computer programs discussed here have been developed in the course

of the last three years to assist in the preparation of a number of

documents on an 870 Document Writer (a card-controlled typewriter) for

reports not requiring typesetting.

Any editing system which permits the deletion or addition of substantial

segments of text must have some provision for rearranging the words into

lines of specified length. JUSTIFY is a text formatting program which

provides this facility with or without justified right-hand margins. It can center lines of text, indent, and perform other features useful in preparing

camera-ready copy. When line justification is called for, the extra spaces

are placed first after each period in the line and then between the words,

starting from the left in one line and from the right in the next. Because

simplicity of use is an important factor in the design of these programs, the

rules are kept as conventional as possible. For example, the start of a paragraph is ordinarily signaled by leaving at least one blank space at the

beginning of the line -- just as a typist might indent when starting a new

paragraph -- or by inserting a blank card which is equivalent to leaving a blank line when the first line of a paragraph is not indented.

An example of the application of JUSTIFY to change the line length of

text is afforded by Figures 5j and 5k. In this instance new lines were created with a maximum of 65 characters so as to produce one line per card

without continuation cards. In this option the new text was not justified

and words are separated by a single space, even though the original text

contained extra blanks. This feature of the program permits the reworking of

text which had previously been justified by this program.

The reader's attention is directed to the fact that the JUSTIFY program

does not have a provision for hyphenating words. Hyphenation' becomes

important only when one uses a double column spread or a narrow newspaper

column width. Figures 5a. et seq. show portions of a number of publications

produced from the output of this program. We leave it to the reader to

decide whether the lack of hyphenation effects the readability.

It should be noted that where an exceptionally long word falls just

short of fitting at the end of a line and the space between words is

therefore excessive, it is possible to hyphenate the word at a suitable point

and rejustify the paragraph.

20-
5.1 Characteristics of JUSTIFY

Special instructions to the JUSTIFY program can be given on the input

control cards. The presence of certain characters in card column 72 of any

text card will cause the JUSTIFY program to take special action. Any. symbols

or characters except those stated below will be treated as ordinary text when

appearing in cc 72 of any text card. Since cc 72 is used for sensing control

characters and since these characters may normally appear in straight text,

it is unwise to punch text beyond cc 71. The last paragraph on any run should be followed by several blank cards.

Text prepared on a card usually has a number of precedence characters

for case shift, for card eject (either with or without carriage return), for

tabulation, and for half-line platen shift symbols. The JUSTIFY program

recognizes specific special control symbols wherever they occur on the text

card.

JUSTIFY operates on a "paragraph" at a time. A "paragraph" is

considered started when:

a. the first card of input is encountered.

b. or a blank occurs in cc 1 of any text card.

c. or the previous card contained a special control character in cc 72

(the control field)

d. or the previous card contained only a card ejection symbol (the

symbol appearing in cc 39 of the first control card)

e. or the previous card was totally blank.

A "paragraph" is considered terminated when:

a. the card immediately following contains a blank in cc 1. b. or the following text card contains a control character

The only exception is when cc. 72 carries the ignore character.

c. or the following card contains only a card ejection symbol

d. or the following card is totally blank.

in cc 72

5.2 The Control Cards for JUSTIFY

All control characters and control symbols are indicated

input control GarcTI on the first

on 3.1. As

s card are

ar program.

rminator

bol. Cards

The function of the first control card is described in Secti

with the other programs in this package, card columns 38-80 of thi

reserved for symbols which have meaning specific to the particul

They perform the following functions:

a. The symbol placed in cc 38 indicates the sentence te

normally a period.

b. The symbol placed in cc 39 indicates the card eject sym

are not read beyond that point.

c. Card columns 40-44 are not used in this program.

d. The symbol placed in cc 45 indicates the continuation flag. It signals that the line of text is continued on another card. Although

originally implemented to provide card eject without carriage return or line

feed on a card-controlled typewriter, it is also useful in continuing on another card a string of characters which must be produced in the "as is"

form rather than in the justified mode.

e. | The symbol in cc 46 is a nonprint control character used to indicate

a case shift on a typewriter. It is sensed and used by the subroutines, LOCK

and UNLOCK.

•21-
•A»NY SYMBOLS EXCEPT THOSE STATED ABOVE WILL BE TREATED AS ORDINARY

TEXT WHEN APPEARING IN CARD COLUMN 72. )

) •S'fNCE COLUMN 72 IS USED FOR SENSING THE ABOVE CONTROL CHARACTERS

AND SINCE THESE CHARACTERS MAY NORMALLY APPEAR IN STRAIGHT- TEXT ) IT IS UNWISE TO PUNCH TEXT BEYOND COLUMN 71. )

) •TABLE' 2. ) C

) •SPECIFICATIONS OF •S'PECIAL •S'YMBOLS. ) C

) •T'HE SPECIAL SYMBOLS WILL BE IDENTIFIED BY THEIR POSITION ) ON THE INPUT CONTROL CARD M'SEE 'F'lGURE 1(. 'O^R CURRENT CONVENTION ] USES THE SYMBOLS •(•» »5«. BLANK* •*». AND •©• IN THE LOCATIONS ) DESIGNATED BELOW. (

)

Figure 5a. A listing of cards punched for a card controlled typewriter with

control symbols in cc72 which are recognized by the JUSTIFY program. Th»

right parenthesis produces a carriage return and line feed on the typewriter,

consequently the control symbols in cc72 are not typed on the typewriter copy

(See Figure 5c).

) •A 'NY SYMBOLS EXCEPT THOSE STATED ABOVE WILL BE TREATED)

AS ORDINARY TEXT WHEN APPEARING IN CARD COLUMN 72.)

) 4 •S'INCE COLUMN 72 IS USED FOR SENSING THE ABOVE CONTROL)

CHARACTERS AND SINCE THESE CHARACTERS MAY NORMALLY APPEAR IN)

STRAIGHT TEXT. IT IS UNWISE TO PUNCH TEXT BEYOND COLUMN 71.)

) •TABLE' 2.

) •SPECIFICATIONS OF tS'PECIAL •S'YMBOLS.

) •T'HE SPECIAL SYMBOLS WILL BE IDENTIFIED BY THEIR)

POSITION ON THE INPUT CONTROL CARD M'SEE •F'IGURE 1(. »0«UR)

CURRENT CONVENTION USES THE SYMBOLS •(•» «5» BLANK* •*•• AND ©• IN)

THE LOCATIONS DESIGNATED BELOW.)

)C

)C

•Ah39( IS < )C

A CARD. 'ANYTHING PUNCHED IN)

IGNORED.)

'A(»39( TERMINATES THE READING OF

FURTHER FIELDS OF THE CARD WILL BE

•I«F IT IS THE FIRST NON-BLANK CHARACTER ENCOUNTERED WHILE)

READING A TEXT CARD. THE PREVIOUS PARAGRAPH IS CONSIDERED AT)

AN END. «T'HE CARD ITSELF IS REPRODUCED AS-IS IN THE OUTPUT.)

•I'T IS THE LAST CHARACTER ON ANY TEXT OUTPUT CARD.)

) -«!=ft Figure 5b. A listing of the cards produced by the program JUSTIFY from the

cards listed in Figure 5a. The ragged appearance of the lines results from

the varying numbers of shift symbols from line to line.

22-
Any symbols except those stated above will be treated a? ordinary

text when appearing in card column 72*

Since column 72 is used for sensing the above control characters

and since these characters may normally appear in straight text,

it is unwise to punch text beyond column 71*

TABLE 2* Specifications of Special Symbols*

The special symbols will be identified by their position

on the input control card (see Figure 1) • Our current convention

uses the symbols (, ', blank, =, and __ in the locations

designated below*

Figure 5c. Copy produced on a card-controlled typewriter from the cards

listed in Figure 5a. The ragged lines results from editorial changes or numerous shift symbols which take up space on the card but do not produce

characters on the line.

Any symbols except those stated above will be

as ordinary text when appearing in card column 72*

treated

Since column 7 2 is used for sensing the above control

characters and since these characters may normally appear in

straight text, it is unwise to punch text beyond column 71

TABLE 2* Specifications of Special Symbols*

The special symbols will be identified by their

position on the input control card (see Figure 1) • Our

current convention uses the symbols (, ', blank, =, and _ in

the locations designated below*

A(39) is ) A(39) terminates the reading of a card* Anything punched in

further fields of the card will be ignored*

If it is the first non-blank character encountered while

reading a text card, the previous paragraph is considered at an end* The card itself is reproduced as-is in the output*

It is the last character on any text output card*

Figure 5d. The typewriter output of the justified text

cards listed in Figure 5b.

produced from the

23-
£. The symbol in cc 47 must be a blank. It indicates that a blank is

the character at which lines will be broken. The reason the program removes

excess blanks between words is that cc 47 was left blank. If cc 47 contained

any other symbol, it would be the multiple contiguous occurrences of that

symbol that would be squeezed out.

g. The symbol in cc 48 is a tab indicator. This symbol is treated as a single blank when it is encountered in the input text except that it does

not, therefore, start a new paragraph when it happens to fall in cc 1. h. Card columns 49-59 are not used by this program.

i.|The number in cc 60 indicates how many symbols should be considered

as having no widtn in the line justification process. This number is used to

clarify how many of the subsequent card columns are to be scanned for the

specific "no count" symbols.

j. The symbols to be ignored in counting the characters for line

justification are punched into card columns 61 et seq as required.

The second control card contains seven switches in FORMAT (713).

a. This switch sets the maximum line length (the number of characters

per line) . The symbols discussed in item j above are not counted when

formatting a line of output. Switch a must be between 20 and 120.

b. Here any non-zero entry produces lines with flush right hand margins

(justified)

c. If this switch is "<">" - zero, card images are written on the unit

specified by switch f below. The program provides for continuation cards

when the line is longer than 80 characters. Even a line shorter than 80

characters will often be carried over to the next card because of the space

taken up by the precedence symbols. When a line is broken between two or more cards, care is taken never to split words. The symbol which appears in cc 45 of the first control card is punched as the continuation symbol.

d. This switcn. if non-zero, calls the subroutines LOCK and UNLOCK. For

all application except cards intended for the 870 Document Writer, this

switch should be set to zero.

e. This switch tells from which unit to read the input data.

f. This switch tells on which unit to write the card images or punch the

cards

g. If this switch is zero, the program gives priority to the insertion

of a second space at the end of each sentence before distributing the

necessary spaces between the words. The extra space is inserted

automatically when the lines are not justified.

5.3 The Format Control Symbols

The program has provision for line justification in accord with a specified line width. Practical formatting often requires exempting certain

lines from the justification process. Such exemptions are signaled by the

characters C, D, I, N, and R when they appear in cc 72.

A letter C in card column 72 causes the information in the previous

columns of that card to be centered on the line. The letter D in cc 72 causes the line to be printed exactly as it is punched on the card. The letter N in cc 72 sets a switch to indent the subsequent text lines. The first non-blank characters on the "N" card signals the new width. Another

N card carrying the original width is required to restore the lines to the normal width. The previously defined tab symbol is automatically inserted at

24-
the beginning of each line of the indented text.

Some data and text files contain lines of information which have a specific use in the present format but must be ignored when the file is

reformatted. A letter I in cc 72 causes that line to be ignored completely

by this program.

An R in cc 72 generates a box of depth equal to the number which appears

on the "R" card. This is used to reserve a space for inserting

illustrations. The "R" card is converted to a "D" without further

modification, and positioned as the center line of the box. Thus the "R"

card can be used to indicate which figure is to be placed in the box.

•25-
1. It is hard to overemphasize the importance and usefulness of

self-teaching, described in section 4 '6- One can learn the basic

rules of OMNITAB very quickly, say within two hours, and then

proceed on his own* This is very valuable for those of us who

have difficulty reading manuals carefullyMany times little programs have been added ( at virtually no

cost) at the end of a program to clarify a particular

instruction. For example, it is not completely clear whether the

command RMS described on page 38 stores

i/exT2/^ , t/e^-x) Vn or Vl(x~-x) V(n-1) -

However , the question is readily answered by using the following

instructions;

OMNITAB

GENERATE 1. (1.) 5- STORE 1 RMS 1 STORE 2 PRINT 1 2 STOP

2 (Note, Ex. ' for integers is easily obtained from the formula

l

1 + 2

2 + • • • + n

2 = n(n+l) ( 2n+l)/6 so that Ex

± A =

( n+1) ( 2n+l)/6 •) It would be easy to write many programs like this

in a short period of time and very quickly become an '

' expert'

user. The ease with which this can be done is sometimes

overlooked or unappreciated- The technique of self—teaching has

been used effectively in class instruction2- An obstacle faced by non—programmers is that with some

languages, such as FORTRAN, it is almost necessary to be an expert programmer to do even the simplest calculation- To do

anything in FORTRAN, it is necessary to understand some of the

most troublesome statements of the language such as FORMAT,

DIMENSION and WRITE- An OMNITAB user with no computing experience

can being writing programs to perform non—trivial computations

with less than two hours' study- By self—teaching he can proceed

at his own speed to become an ''expert-''

3 • The very nature of OMNITAB is such as to make logical

branching unnecessary in most instances- In others it may be

possible with a little ingenuity- For example, the following

instructions provide for replacing log ln (a./b, ) by the constant

c whenever a. < • Capital letters A, B, D, and F represent

column numbers; corresponding lower case letters represent

elements in the columns- We assume b . > •

figure 5e. A page of a mechanized text produced on a modified card- controlled typewriter. See the next figure for a listing of the cards that produced this page.

-26-
i.:::»i»t is hard to overemphasize the importance and usefulness of)

SELFL 'G'-JTEACHIWb* DESCRIBED IN SECTION 4.6. . »0»NE CAN LEARN-THE $)

BASIC)

RULES OF OMNITAB 1 VERY QUICKLY. SAY WITHIN TWO HOURS* AND THEN)

PROCEED ON HIS OWN. »T»HIS IS VERY VALUABLE FOR THOSE OF US WHO)

HAVE DIFFICULTY READING MANUALS CAREFULLY.)

) M'ANY TIMES LITTLE PROGRAMS HAVE BEEN ADDED •(AT VIRTUALLY NO)

COST( AT THE END OF A PROGRAM TO CLARIFY A PARTICULAR)

INSTRUCTION. ^OR EXAMPLE' IT IS NOT COMPLETELY CLEAR WHETHER THE)

COMMAND »KMSi DESCRIBED ON PAGE 38 STORES)

AXJICL23/N f A' ( «X DIE C '0' ]X(C2J/N OR A • (

• X 111 C ' DX (C 2 V • ( »N$) D C»0» J1U) I

) 'H'OWEVER, THE QUESTION IS READILY ANSWERED BY USING THE FOLLOWING)

INSTRUCTIONS' 1')

) •OMNITAB'

)

GENERATE' 1. '(!.( 5. 'STORE' 1)

RMS' 1 'STORE' 2)

'PRINT' 1 2)

'STOP'

)

) »(N»OTtr CAXJICC2J FOR INTEGERS IS EASILY OBTAINED FROM THE FORMULA.)

o i 1c1j + 2c2j:+ ... + nc23:'4' n' c'n+ip ('2n+k/6 so that $)

:axjicc2j/n:'4M

U I '(N+l( f (»2N+l(/6.( »I»T WOULD BE EASY TO WRITE MANY PROGRAMS LIKE $)

THIS)

IN A SHORT PERIOD OF TIME AND VERY QUICKLY BECOME AN 55 , EXPERT , 550

USER. »T'HE EASE WITH WHICH THIS CAN BE DONE IS SOMETIMES)

OVERLOOKED OR UNAPPRECIATED. »T»HE TECHNIQUE OF SELFL ^TEACHING $)

HAS)

BEEN USED EFFECTIVELY IN CLASS INSTRUCTION.)

) 2ti::»A»N OBSTACLE FACED BY NONC ^PROGRAMMERS IS THAT WITH $)

SOME)

LANGUAGES, SUCH AS FORTRAN^' IT IS ALMOST NECESSARY TO BE AN)

EXPERT PROGRAMMER TO DO EVEN THE SIMPLEST CALCULATION. T'O DO)

ANYTHING IN 'FORTRAN'* IT IS NECESSARY TO UNDERSTAND SOME OF THE)

MOST TROUBLESOME STATEMENTS OF THE LANGUAGE SUCH AS FORMAT 1 »)

'DIMENSION' AND 'WRITE'. «A'N OMNITAB' USER WITH NO COMPUTING S)

EXPERIENCE)

CAN BEING WRITING PROGRAMS To PERFORM NONE 3TRI VI AL COMPUTATIONS)

WITH LESS THAN TWO H0URS»5' STUDY. B^Y SELFC ITEACHING HE CAN PROCEED)

AT HIS OWN SPEED TO BECOME AN 55 EXPERT. 55

)

) -3.^4-: iJ T !-HE VERY NATURE OF OMNITAB 1 IS SUCH AS TO MAKE LOGICAL)

BRANCHING UNNECESSARY IN MOST INSTANCES. I'N OTHERS IT MAY BE)

POSSIBLE wlTH A ulTTLE INGENUITY. 'F'OR EXAMPLE* THE FOLLOWING)

INSTRUCTIONS PROVIDE FOR REPLACING LOG310C : ( ' A DIC/B JIC ( BY THE $)

CONSTANT)

U I C WHENEVER A 3IC : 8' a: . CAPITAL LETTERS «A'» »B»> -*D»# AND $) 'F' REPRESENT)

Figure 5£. A listing of cards produced by JUSTIFY to prepare the text in the

previous figure. See Section 5.4 for a discussion of this application.

27-
5.4 Two Applications of JUSTIFY

In this section we describe briefly two applications which motivated the

development and influenced the design of the programs JUSTIFY and SUBSTITUTE.

Both of these resulted in publications produced from camera-ready copy on a modified 870 Document Writer (a card-controlled typewriter). Figure 5e stiows

a page from NBS Handbook 101 (loc. cit.). The subscripts and superscripts

were obtained by automatic platen rotation signaled by two special

multipunches . As with shift symbols, the program recognizes them as being

characters of zero width for line justification. The program has room for as many as nine such special symbols.

The listing in Figure 5f shows the character stream produced by JUSTIFY

to generate the contents of Figure 5e on a modified card-controlled

typewriter . Among the features to be noted in Figure 5e are these:

a. the colon (:) designates a special blank which is treated like any

other character to retain the spacing in the first line of each of

the numbered paragraphs.

b. the square brackets cause fractional platen rotation, are ignored in

the character count, and do not appear in the typed copy.

c. the delta is a stop code to permit the insertion of characters not

present on the typewriter.

d. when the line contains a large number of shift symbols, it is

continued on the next card and the $ sign signals the typewriter to

eject the card without returning the carriage. Note that the

JUSTIFY program does not break words.

e. the "U" in cc72 signifies a line that was reproduced as is - without

justification.

f. the lines with a "I" in the control field (cc72) were inserted by

hand to produce a half-line space before lines with superscripts

and after lines with subscripts. Because of the "I" in cc72, these

lines will be ignored on any subsequent pass through. JUSTIFY.

An important motivation in the development of the general purpose

programs discussed here has been our desire to be able to reformat and recast

data and text files at will. The typset page from the NBS Postdoctoral

Research Associateships announcement booklet for 1968-1969 shown in Figure 5g

affords a good example of the utility of the EUPAC programs. The 94 page

booklet of which Figure 5g is an sample was typset automatically from cards

punched in previous ) years to drive a card-controlled typewriter. In order to

achieve the typsetting without rekeyboarding , it was necessary to transform

the information to conform to the punching convention used by the

Administrative Terminal System (ATS) on a 1440 computer, from which system

the material went forward for typsetting. Figures 5j , 5k, 3b and 3c show how

existing cards from the earlier publication were transformed to produce the

typset version in Figure 5g. A page from this publication for the previous

year produced on a card-controlled typewriter with the help of JUSTIFY is

shown in Figure 5h. Prior to the development of JUSTIFY the same material

appeared with ragged right hand margins as can be seen from Figure 5i.

The circled characters in Figure 5k were inserted by an ad hoc

modification of JUSTIFY as they were required by the typsetting system on which the 1968-1969 version of the Postdoctorial booklet was produced. The = sign instructs the ATS to produce a new line positioned at the left margin

(quad left). The sequence ;/ was inserted after the first character and the

last character of a title (a card with a "D" in cc72) in order to set the

title in boldface type. Since the ATS has its own justification program

which does not remove extra blanks, the chore of justification was delegated

to the ATS. JUSTIFY in Figure 5k produced unjustified lines by removing the

extra spaces which were present in the existing cards.

-28-
Hydraulics and Hydrodyaaarics

G. Kulin

Research is currently centered on water surface waves (with emphasis on

various phenomena affecting wave damping) and internal waves in densitystratified water (with emphasis on wave generation by motion of submerged

objects). There is opportunity for theoretical as well as experimental work in these areas. Facilities are also available for open- channel flow and sedimenttransport research.

Dynamic Measurement of Properties of Solids and Liquids at Temperatures

C. W. Beckett and A. Cezairliyan

Very High

Current research includes the investigation of thermodynamic and related properties of solids and liquids at high temperatures by dynamic experimental

techniques, such as, pulse calorimetry, exploding wires, electrical discharges,

etc. Advanced measurement techniques for obtaining both microscopic and

macroscopic properties are being explored. The equipment includes pulse calo- rimeters of millisecond and ' microsecond time resolution, high-speed photoelectric pyrometers, and ultra high-speed framing camera, a high-speed digital recording system and other auxiliary dynamic and steady-state measurement

instruments.

Combustion and Reaction Calorimetry

G. T. Armstrong

Relationships between binding energy and structure are being investigated among organic and inorganic compounds. Recent emphasis has been on fluorine compounds, nitro compounds, and compounds of biological interest. A rotating bomb calorimeter, facilities for bomb or flow colorimetry with fluorine, and

other calori metric facilities are available for high precision measurements. The calorimetric process, reference materials for reaction calorimetry, and new

forms for correlating calorimetric measurments may also be investigated.

Production and Measurement of Very High Temperatures

John B. Shumaker

A program of research in the measurement of temperatures above 10,000°C is being conducted in the High Temperature Measurements Laboratory. Current

interests include the detailed investigation of stable high current density arcs and plasma jets and the measurement of their temperatures and related physical

parameters by a variety of spectroscopic techniques.

r-igure 5g. A typical page from the NBS Postdoctoral

Research Associateships announcement booklet which was

typset from cards transformed by JUSTIFY and SUBSTITUTE.

See Figure 5h for the same section for the year 1967-1968.

-29-
Hydraulics and Hydrodynamics:

G. Kulln

Research Is currently centered on water surface waves (with emphasis on various phenomena affecting wave damping) and internal waves In densitystratified water (with emphasis on wave generation by motion of submerged

objects). There is opportunity for theoretical as well as experimental work in these areas. Facilities are also available for open- channel flow and sedimenttransport research. Dynamic Measurement of Properties of Gases Liquids)

anM Bolide at Very High Temperatures^

" C. W. Beckett

Current research includes the investigation of thermodynamic and related

properties of gases, liquids, and solids at high temperatures by dynamic

experimental techniques, such as shock tubes, exploding wires, and electrical

discharges. Advanced measurement techniques for obtaining both microscopic and macroscopic properties are being explored. The equipment includes an ultra— high

speed framing camera, a time-resolved spectrometer, and high-speed photoelectric

pyrometers. Molecular Spectra and Energy LevelB^

M. Bass Studies of energy levels and structures of diatomic and small polyatomic molecules as determined from the analysis of spectroscopic data. Facilities

include spectroscopic instrumentation permitting observations from 500 A in the vacuum ultraviolet to 53 microns in the infrared. A 21-foot focal length vacuum

spectrograph provides the capability for obtaining high-resolution spectra. Also

available are various sources for exciting spectra, including electric

discharges, flames, flash photolysis and flash heating. The program also includes studies of transient species stabilized by condensation in low—temperature inert matrices. Microwave Spectra of Gaseous Radicals' -""-"-- -— H. E. Radford

Experiments are performed to determine the hyperfine structure, Zeeman

effect and lambdatype doubling of simple diatomic radicals produced in gas mixtures by electric discharges, chemical reactions, triggered explosions, and photolysis. The paramagnetic resonance technique is used mainly, and spectrometers of various types are available for work at 3 Gc, 9 Gc and 24 Gc In magnetic field strengths up to 24 Kg. Optical and radio—frequency apparatus is also available for radio^optlcal resonance experiments on diatomic molecules,

and for measurements of radio spectra in molecular excited states. Recent successful experiments in these two fields of study have been performed on the paramagnetic resonance spectra of OH and SH, and on the rotational perturbation microwave spectrum of excited CN. Other experiments are in progress on the kinetics of radical reactions, using paramagnetic resonance detection methods. Production and Measurement of Very High Temperatures ! John B. Shumaker

A program of research in the measurement of temperatures above 10, 000 C is being conducted in the High Temperature Measurements Laboratory, current interests include the detailed investigation of stable high current density arcs and plasma jets and the measurement of their temperatures and related physical

parameters by a variety of spectroscopic techniques.

Figure 5h. A page from the NBS Postdoctoral Research

Associateships announcement booklet produced via the cardcontrolled typewriter from cards processed by JUSTIFY. The

cards that produced this page were rearranged and edited

where necessary prior to the transformation described in

Section 5.4.

30-
w

fnamlc Measurement of Properties of Gases

at Very High Temperatures : C. W. Beckett Current research includes the investigation of thermodynamic and related

properties of gases at high temperatures by dynamic experimental techniques, such as shock tubes, exploding wires, and electrical discharges. Advanced

measurement techniques for obtaining both microscopic and macroscopic

properties are being explored. The equipment includes an ultra high speed

framing camera and a time-resolved spectrometer. Molecular Energy Levels and Intensities : A. M. Bass Studies of energy levels of diatomic and small polyatomic molecules

as determined from the analysis of spectroscopic data. Facilities include spectroscopic instrumentation permitting observations from 500 A in the vacuum ultraviolet to 50 microns in the infrared. Also available are various sources for exciting spectra, including electric discharges, flames, flash photolysis and flash heating. The observation of radicals and transient molecules produced in low—temperature matrices and the investigation of matrix effects on molecular energy levels is also of interest. Microwave Spectra of Gaseous Radicals : H. E. Radford

Experiments are performed to determine the hyperfine structure, Zeeman

effect and lambdatype doubling of simple diatomic radicals produced in gas mixtures by electric discharges, chemical reactions, triggered explosions, and photolysis. The paramagnetic resonance technique is used mainly, and spectrometers of various types are available for work at 3 Gc, 9 Gc and

24 Gc in magnetic field strengths up to 24 Kg. Optical and radiofrequency apparatus is also available for radio-optical resonance experiments

on diatomic molecules, and for measurements of radio spectra in molecular excited states. Recent successful experiments in these two fields of study

have been performed on the paramagnetic resonance spectra of OH and SH, and on the rotational perturbation microwave spectrum of excited CN. Other experiments are in progress on the kinetics of radical reactions, using

paramagnetic resonance detection methods. Plasma Physics : C. K. McLane

An experimental and theoretical study of transport processes in the plasma state has as its object a fundamental understanding of the contribution

of collective interactions. Facilities available include a magnetically

confined arc discharge apparatus for study of the steady state magneto—plasma

in fields up to 7000 gauss, and the usual electronic and optical spectroscopic equipment for plasma diagnostics. Equipment for the study of the transient plasma by capacitor discharge techniques is also available. Production and Measurement of Very High Temperatures; John B. Shumaker

A program of research in the measurement of temperatures above 10, 000°C

is being conducted in the High Temperature Measurements Laboratory. Current interests include the detailed investigation of stable high current density arcs and plasma jets and the measurement of their temperatures and related physical parameters by a variety of spectroscopic techniques.

-I figure 5i. A page from an earlier issue of the NBS Postdoctoral Research Associateships announcement booklet produced prior to the development of JUSTIFY. Note the ragged right hand margins.

-31-
•d'ynamic 'measurement of 'p'roperties of 's'olids and 'l'lquids at ) d

•very 'h'igh 'temperatures)

•c». 'jul!... 'beciett and 'a». 'cezairliyan) c •current research includes the investigation of thermodynamic)

and related properties of solids and liquids at high temperatures byj

dynamic experimental techniques* such as, pulse calorimetry, ) exploding wires, electrical discharges, etc. 'a'dvanced measurement)

techniques for obtaining both microscopic and macroscopic properties)

are being explored. 't'he equipment includes pulse calorimeters of)

millisecond and microsecond time resolution, highc » » 3speed)

photoelectric pyrometers, and ultra hlghc • 3speed framing camera, a)

hlghc'o'jbpeed digital recording system and other auxiliary dynamic)

measurment instruments.)

) •C'OMBUSTION AND 'REACTION ' C

AlORIMETRY) D G'. 'T'. «A»RMSTRONG) C

) 'RELATIONSHIPS BETWEEN BINDING ENERGY AND STRUCTURE ARE BEING)

INVESTIGATED AMONG ORGANIC AND INORGANIC COMPOUNDS. 'RECENT EMPHASIS)

HAS BEEN ON FLUORINE COMPOUNDS, NITRO COMPOUNDS, AND COMPOUNDS OF)

BIOLOGICAL INTEREST. »A' ROTATING BOMB CALORIMETER, FACILITIES FOR)

BOMB OR FLOW COLORIMETRY WITH FLUORINE, AND OTHER CALORIMETRIC

)

FACILITIES ARE AVAILABLE FOR HIGH PRECISION MEASUREMENTS. 'T'HE)

CALORIMETRIC PROCESS, REFERENCE MATERIALS FOR REACTION CALORIMETRY ,

)

AND NEW FORMS FOR CORRELATING CALORIMETRIC MEASURMENTS MAY ALSO)

BE INVESTIGATED.)

) PRODUCTION AND 'MEASUREMENT OF 'VERY 'H'IGH •TEMPERATURES' 1 ' ) D •J'OHN »B». 'S'HUMAKER ) )C

) 'A' PROGRAM OF RESEARCH IN THE MEASUREMENT OF TEMPERATURES ABOVE $

1Q,000'/C' IS)

BEING CONDUCTED IN THE 'H'IGH 'TEMPERATURE 'MEASUREMENTS $

•L'ABORATORY. CURRENT)

INTERESTS INCLUDE THE DETAILED INVESTIGATION OF STABLE HIGH CURRENT S

DENSITY ARCS)

AND PLASm m JETS AND THE MEASUREMENT OF THEIR TEMPERATURES AND RELATED $

PHYSICAL)

PARAMETERS BY A VARIETY OF SPECTROSCOPIC TECHNIQUES.) RES AND RELATE $

)

Figure 5j . The text shown above represents editorial changes in existing

cards prior to conversion via JUSTIFY to produce the character stream shown

in the next figure.

32-
ABCREFGHIJKLMNOP_OSTUVWXYZ01234567ft9+. )$/, (S' = 1» *)»

65 1 1 5 T 6

THE WIDTH OF OUTPUT TEXT IS 65

YNAMIC 'MEASUREMENT OF .P'ROPFRTIES OF 'S'OLIDS AND »L'IQUIDS AT|

•H'IGH 'T'FMPERATURFS

•W«. 'R'ECKFTl AND «A». »C • FZAIRLI Y AN

£3

•CURRENT RESEARCH INCLUDES THE INVESTIGATION OF

THERMODYNAMIC AND RELATED PROPERTIES OF SOLIDS AND LIQUIDS AT

1 HIGH TEMPERATURES BY DYNAMIC EXPERIMENTAL TECHNIQUES* SUCH AS.

PULSE CAL0R1METRY> EXPLODING W

RES ,._ ELECTR ICAL DISCHAR GES^ ETC

' A • DVANCED MEASUREMENT" tECHNI Ql IES FOR OBTAIN I NG BOTH" MI CROSCQP I

AND MACROSCOPIC PROPERTIES ARE BETNG EXPLORED. • T HE EQUIPMENT

INCLUDES PULSE CALORIMETERS OF MILLISECOND AND MICROSFCOND TIME

RESOLUT ION. H1GHC , < DSPEEU PiHOTOELECTR IC PYROMETERS. AND ULTRA _____

HlGHC • » 1SPEED "FRAMING CAMERA** a" HIGH! » » .SPEED DIGITAL RECORDING

SYSTEM AND OTHER AUXI L_I AY DYNAMIC ME ASURMENT INSTRUMENTS.

§' CQ' OMBUS TI ON AND * R ' F ACTION_« C ^_ALOR I METRY<fy_) G». »T». » A

RMSYrDNG

) rRiELA xiON_HlP5~HETW__TF_lNDING ENERGY AND STRUCTURE "ARE

BEING INVESTIGATED AMONG ORGANIC AND INORGANIC COMPOUNDS . ^^ R'ECENI EMPHA^-HiAS^RFE'N ON "FTjroRTNTTTTMPoONDST'l^TT^ir" TM~~~

COMPOUNDS. AND COMPOUNDS OF BIOLOGICAL INTEREST. »A' ROTATING

TWMH^CAEnR'IFiETFTR ."FACT L ITTE_ ToR"rOMr OR FLOW COTO'R IMETRT WITH"

" FLUOR1NF. AND OTHER CALORIMETRIC FACILITIES ARE AVAILABLE FOR

ITKiH^T^ETTSTDTv.'Tre aSUreM E N TS . * T» HE C A LORT M E T RTC PROC ESS

.

REFERENC E MA TERIALS FOR REACTION CALORIMETRY. AND NEW_FORMS_ FOR __ TTJTTRTLxrTNrxAT^TTT^FTTrnririsu^

^bO*"RODUCT I"ON~AND"""» M~» F ASITrEMENT^OF "•VtER Y~ "• H» IGH ""» T • EMPEH! ATW_SM7(?^5>"

(=)*J'OHN 'H*. 'S 'HUMAKER ;_____

)

I A I J___*__.°_JlL_LARCH JLN J_H_F MEASUREMENT OF TEMPERATURES

ABOVE ln.UOO'/C IS BE"ING CONOUCTFDTn'

=THE 'H'TGH » TEMPERATURE

•MEASUREMENTS ' L ' AdORATORY . CURRENT INTERESTS INCLUDE THE

DETAILED INVESTIGATION" OF STABLE HIGH CURRENT DENSITY ARCS AND

PLASMA JFI S AND T HE MEASUREMENT OF THEIR TEMPERATURES AND RELATFD

PHYSICAL PARAME1 ERS BY A VAR I_TY OF SPECTROSCOPIC TECHNIQUES.

. w • T • EMPER ATuftE * C°rS_0=RTMl

___!______•_ 'FMiRUKAwA _____

) 'CURRENT RESEARCH INTERESTS INCLUDE THE INVESTIGATIONS OF

HEAT CAT^AXTTT7v7iP0T?"P~RESSUR_T_HEATS OF" FUS I ON AND TRANSTTTOn . HEAT OF VAPORIZATION, CHEMICAL PURITY, AND PHASE EQUILIBRIA OF

sele c t tn~wpunfm^orrujmmeT~^mfiw^nit^xm^r ltght

Figure 5k. Results from a pass through a slightly modified ad hoc version of

JUSTIFY preparatory to the production of the typset page shown in Figure 5g.

See Section 5.4 for a discussion of the circled characters.

15-

APPENDIX

PROGRAM LISTINGS

The program listings which follow were produced on a photocomposing machine at the Government Printing Office

from a magnetic tape produced at NBS by a Fortran program

called TYPSET. That program accepts a symbolic program deck

as input data and produces a magnetic tape formatted to be

processed by an Autoset Composition Program or the Master

Typography Program at the Government Printing Office.

The listings were reduced 10% from paper positives set

in 10 point type with 12 point leading in the Clarinda

typeface.

A magnetic tape containing card images of the programs

in this appendix will be prepared for sale by the

Clearinghouse for Federal Scientific and Technical

Information if the demand warrants it. A self-addressed

card is provided for this purpose at the back of this

report.

-35
10

SCRAMBLE

ITAPE - THE NORMAL SYSTEM INPUT TAPE.

IOTAPE - THE NORMAL SYSTEM OUTPUT TAPE.

IRTAPE - A SPECIAL INPUT TAPE. IF ONE INPUT TAPE WILL DO, SET IRTAPE

EQUAL TO ITAPE

IPTAPE - A SPECIAL OUTPUT TAPE. IT CAN BE USED AS AN INPUT TO OTHER

PROGRAMS, BUT CANNOT BE EQUATED WITH IOTAPE AS IOTAPE, IN

ADDITION TO NORMAL OUTPUT, CONTAINS OTHER PROGRAM MESSAGES

AND ERROR REMARKS.

THE FIRST CARD CONTAINS THOSE CHARACTERS FOR WHICH SUBSTITUTIONS ARE

TO BE MADE. THE SECOND CARD CONTAINS THE CHARACTERS TO BE SUBSTITUTED

FOR THE CHARACTERS IN THE CORRESPONDING FIELDS OF FIRST CONTROL CARD.

THE THIRD CONTROL CARD CONTAINS IN 12 FORMAT THE PUNCH SWITCH ITEST

WHICH IS NONZERO TO PUNCH AND IRTAPE AND IPTAPE

CODE BY MRS CARLA G. MESSINA NSRDS - NBS 1967

20

21

22

23

11

12

13

14

15

16

17

IS

39

25

30

40

60

IA(J) ,J==1 80)

(IA(J) J==1,80)

IB(J) ,J==1 80)

(IB(J) J==1 , 80

)

DIMENSION ICOL ( 140 ), IA ( 80 ), IB ( 80 ), IS ( 80

ITAPE=5

I0TAPE=6

FORMAT (132A1)

READ (ITAPE, 10) | WRITE (IOTAPE, 75)

READ (ITAPE, 10) I WRITE (IOTAPE, 75)

READ (ITAPE, 20) ITEST , IRTAPE, IPTAPE , IWIDE1

FORMAT (312,114)

IF (IWIDE1) 21,21,22

IWIDE1=80

IF (IWIDE1-132) 23,23,21

IF (IRTAPE) 11,11,12

IRTAPE = 5 GO TO 14

IF (IRTAPE -6) 14,14,13

REWIND IRTAPE

IF (IPTAPE) 15,15,16

IPTAPE = 3

GO Td 18

IF (IPTAPE - 6) 18,18,17

REWIND IPTAPE

WRITE (IOTAPE, 39

FORMAT (IX, 312)

DO 40 1=1,80

IF (IA(I) - IB(I) ) 25,30,25

IS(I)=1

GO TO 40

IS ( I

) =0

CONTINUE

DO 60 1=1,80

M=I

IF (IS(I) ) 90,60,90

CONTINUE

IF (M-80) 90,70,70

ITEST , IRTAPE , IPTAPE

SCRA0010

SCRA0020

SCRA0030

SCRA0040

SCRA0050

SCRA0060

SCRA0070

SCRA0080

SCRA0090

SCRA0100

SCRA0110

SCRA0120

SCRA0130

SCRA0140

SCRA0150

SCRA0155

SCRAM160

SCRA0165

SCRAM170

SCRAM180

SCRAM190

SCRAM200

SCRAM210

SCRAM220

SCRAM230

SCRAM240

SCRAM250

SCRAM260

SCRAM261

SCRAM262

SCRAM263

SCRAM270

SCRAM280

SCRAM290

SCRAM300

SCRAM310

SCRAM320

SCRAM330

SCRAM340

SCRA0350

SCRA0360

SCRA0370

SCRA0380

SCRA0390

SCRA0400

SCRA0410

SCRA0420

SCRA0430

SCRA0440

SCRA0450

SCRA0460

SCRA0470

SCRA0480

SCRA0490

-36-
70 WRITE (IOTAPE, 75) ( IA( J ) , J=l , 80

)

WRITE (IOTAPE, 75) ( IB( J ) , J=l , 80

)

75 FORMAT ( 1X,131A1)

WRITE (IOTAPE, 8)

8 FORMAT (72H0THE ABOVE CARDS ARE IDENTICAL AND THEREFORE NO

1TI0N IS NEEDED. ) 1111 STOP

90 DO 100 1=1,80

N=81-I

IF (IS(N) ) 50,100,50

100 CONTINUE

50 READ (IRTAPE.IO) ( ICOL( J ) , J=l , IWIDE1

)

CALL CHECK ( IA , ICOL , K , ITEST , IPTAPE , IOTAPE

IF (K) 1111,110 ,1111

110 DO 150 I=1,IWIDE1

DO 130 J=M,N

IF (IS(J) ) 120,130,120

120 IF (ICOL(I) - IA(J)) 130,140,130

130 CONTINUE

GO TO 150

140 ICOL(I) = IB (J)

150 CONTINUE

WRITE ( IOTAPE , 75 )

( ICOL ( J ) , J=l , IWIDE1

)

IF (ITEST) 160,50,160

160 WRITE (IPTAPE, 10) ( ICOL( J ) , J=l , IWIDE1

GO TO 50

END

SCRA0500

SCRA0510

SCRA0520

SCRA0530

SUBSTITUSCRA0540

SCRA0550

SCRA0560

SCRA0570

SCRA0580

SCRA0590

SCRA0600

SCRA0610

SCRA0620

SCRA0630

SCRA0640

SCRA0650

SCRA0660

SCRA0670

SCRA0680

SCRA0690

SCRA0700

SCRA0710

SCRA0720

SCRA0730

SCRA0740

SCRA0750

SCRA0760

10

20

30

50

60

19

29

SUBROUTINE CHECK ( IA , II , K , ITEST , IPTAPE , IOTAPE

DIMENSION IA( 80) ,11(140)

DO 10 1=1,26

IF (IA(I) - II(I) ) 50,10,50

CONTINUE

K=l

WRITE (IOTAPE, 19) ( IA ( I ) , 1=1 , 80

IF (ITEST) 20,60,20

WRITE (IPTAPE, 29) ( IA ( I ) , 1=1 , 80

IF (IPTAPE -6) 60,60,30

END FILE IPTAPE

GO TO 60

K=0

RETURN

FORMAT (1X.80A1)

FORMAT (80A1)

END

SCCK0010

SCCK0020

SCCK0030

SCCK0040

SCCK0050

SCCK0060

SCCK0070

SCCK0080

SCCK0090

SCCK0100

SCCK0110

SCCK0120

SCCK0130

SCCK0140

SCCK0150

SCCK0160

SCCK0170

C SUBSTITUTE SUB 10

C SUB 20

C TEXTUAL SUBSTITUTION PROGRAM WRITTEN BY C. MESSINA FOR IBM 7094 SUB 30

C RECOMPILED NOV 1966 FOR USE ON CDC 3100, MAY 1967 FOR UNIVAC 1108 SUB 40

C THE PROGRAM SUBSTITUTES AN ITEM OF TEXT WHENEVER IT OCCURS IN SUB 50

C THE SET OF RECORDS IN THE LIBRARY, PUTTING IN A NEW PRESCRIBED SUB' 60

C ITEM. THE PROGRAM IS DESIGNED TO HANDLE, BUT IS NOT LIMITED SUB 70

C TO, IBM 870 DOCUMENT-WRITER DRIVER RECORDS. SUB 80

37-
C THE INPUT DECK AT OBJECT TIME IS THE FOLLOWING SET OF CARDS SUB 90

C THE FIRST CARD IS A DICTIONARY OF THE ALPHABET STARTING WITH THE SUB 100

C LETTER A IN CARD COL ONE, A LETTER B IN COL 2 AND SO FORTH. THE NOSUB 110

C FOLLOW THE ALPHABET STARTING WITH ZERO. COL 38 CONTAINS THE PRINTSUB ISO

C OUT STRING DELIMITER. COL 47 CONTAINS A BLANK. SUB 130

C THE SECOND CARD HAS A ZERO IN COL TWO IF NO CARDS ARE TO BE PUNCHESUB 140

C 1 IF THE PUNCH TAPE IS TO BE WRITTEN. THE NEXT 212 FIELDS ON THIS SUB 150

C CARD IF NON BLANK CONTAIN THE IRTAPE NUMBER AND THE IPTAPE NO. SUB 160

C IF IRTAPE OR IPTAPE ARE GREATER THAN 6 THEY WILL REWIND AT START SUB 170

C OF RUN. UNLESS CHANGED ON THE SECOND CARD IRTAPE=5 AND IPTAPE=3 SUB 180

C THE THIRD AND FOURTH CARDS, BOTH IN A1,I3,2A1,I2 FORMATS CONTROL ISUB 190

C AND OUTPUT RECORD FORMATS RESPECTIVELY. THE FIRST ITEM IS THE SUB 200

C CONTINUATION CARD SYMBOL, THE SECOND IS THE RECORD LENGTH, THE SUB 210

C THIRD IS THE SHIFT TO UPPER CASE SYMBOL, THE FOURTH IS THE SHIFT SUB 220

C TO LOWER CASE SYMBOL, AND THE FIFTH IS THE SHIFT AND LOCK SWITCH SUB 230

C THAT IS IF THE' MODE IS NOT SHIFT AND LOCK AND 1 IF IT IS . SUB 240

C CARDS FIVE ET SEQ CONTAIN THE LIST OF STRINGS TO BE EXCHANGED. SUB 250

C ON EACH CARD THE OLD RECORD OR STRING APPEARS ON THE LEFT SIDE ANDSUB 260

C THE NEW STRING ON THE RIGHT. THE CHARACTER WHICH APPEARS IN CARD SUB 270

C COLUMN 1 IS THE STRING DELIMITER WHICH REMAINS IN FORCE FOR THAT SUB 280

C CARD. IT MAY, HOWEVER, CHANGE FROM CARD TO CARD. SUB 290

C THE FORMAT IS PRESCRIBED. A CHARACTER IN COL 1 DEFINES THE STARTSUB 300

C OF A STRING. THE SAME CHARACTER MUST APPEAR AFTER THE END SUB 310

C OF THE STRING. THE THIRD APPEARANCE OF THE COLUMN 1 CHARACTER ON SUB 320

C THE CARD STARTS THE 2ND STRING AND THE FOURTH APPEARANCE ENDS IT. SUB 330

C SUB 340

C EXAMPLE /REAL/ /TRUE/ SUB 350

C SUB 360

C AFTER THE SUBSTITUTION LIST MUST COME A CARD WITH THE WORD FINIS SUB 370

C STARTING IN CARD COLUMN ONE. SUB 380

C AT THIS POINT THE PROGRAM' STARTS TO READ THE LIBRARY RECORDS FROM SUB 390

C THE UNIT CALLED IRTAPE. THE OTHER UNITS ARE INPUT DECK SUB 400

C AND SEARCH LIST FROM UNIT ITAPE , PRINTER OUTPUT TO UNIT IOTAPE ANDSUB 410

C PUNCH TO UNIT IPTAPE. IPTAPE CONTAINS THE SAME INFORMATION AS SUB 420

C UNIT IOTAPE EXCLUDING PROGRAM MESSAGES, I.E. ONLY TEXT. SUB 430

C INPUT AND OUTPUT RECORD LENGTHS MUST BE AT LEAST 1 CHARACTER LONG SUB 440

C NO MORE THAN 132 CHARACTERS LONG. SUB 450

C SUB 460

DIMENSION IA ( 86 )

, N ( 400 ) , IC ( 8000 ) , IB ( 361

)

SUB 470

COMMON ITAPE, IOTAPE, IRTAPE, IPTAPE , IWIDE1 , IWIDE2 , IA , IW, N, IC , IB SUB 480

ITAPE=5 SUB 490

I0TAPE=6 SUB 500

IEND=0 SUB 510

READ (ITAPE, 1060) ( IA( J ) , J=l , 80

SUB 520

WRITE (IOTAPE, 1110) ( IA( J ) , J=l ,80) SUB 530

READ (ITAPE, 1070) ITEST , IRTAPE, IPTAPE SUB 540

IF (IRTAPE) 20,20,30 SUB 550

20 IRTAPE=5 SUB 560

GO TO 50 SUB 570

30 IF (IRTAPE-6) 50,50,40 SUB 580

40 REWIND IRTAPE SUB 590

50 IF (IPTAPE) 60,60,70 SUB 600

60 IPTAPE=3 SUB 610

GO TO 90 SUB 620

70 IF (IPTAPE-6) 90,90,80 SUB 630

38-
80

90

100

110

120

130

140

C150

160

170

180

190

200

210

220

230

240

250

260

270

280

290

300

REWIND IPTAPE

WRITE (I0TAPE.1150) ITEST , IRTAPE, IPTAPE

READ (ITAPE.1080) IA(81 ), IWIDE1 , IA(83 ) , IA(85) , L0CK1

WRITE (I0TAPE,1140) IA(81 ) , IWIDE1 , IA(83 )

, IA(85 ) ,L0CK1

READ (ITAPE,1080) IA(82) , IWIDE2, IA(84) , IA(86) ,L0CK2

WRITE (I0TAPE,1140) IA(82) , IWIDE2 , IA(84) , IA (86) , L0CK2

IF (IWIDE1-1) 100,110,110

WRITE (I0TAPE.1090)

GO TO 1050

IF (IWIDE1-132) 120,120,100

IF (IWIDE2-1) 100,130,130

IF (IWIDE2-132) 140,140,100

N1=0

N3=l

START OF READING IN SUBSTITUTE LISTS

READ (ITAPE,1060) ( IB( J ) , J=l , 80

)

N2=0

N22=0

IF (IBl

IF

IF

IF

IF

:ib

IB

IB

IB

-IA(6))

-IA(9))

-ia(i4;

-IA(9))

-IA(19)

200,160,200

200,170,200

i 200,180,200

200,190,200

i 200,430,200

I)-IB(l)) 220,210,220

150,150,230

DO 220 1=2,78

IF (IB

IF (N2

N2=I-1

J=N2+3

IF (J-79) 250,240,240

WRITE (I0TAPE,1120) IB(i;

GO TO 1050

K=J+1

DO 260 I=J,79

IF (IB(I)-IB(i;

K=I+2

GO TO 240

DO 280 I=K,80

IF (IB(I)-IB(i;

N22=I-K+1

GO TO 240

Nl=Nl+2

N(N1-1)=N2

N(N1)=N22

N4=N3+N2-1

IF (N4-7920) 310,310,300

WRITE (I0TAPE,1100) N4,N1

GO TO 1050

IB(I) ,1=1, 80 :

260,270,260

280,290,280

310 IF (Nl-400) 320,320,

320 J=2

DO 330 I=N3,N4

IC(I)=IB(J)

330 J=J+1

N3=N3+N2

IF (N22) 360,360,340

340 N4=N3+N22-1

SUB 640

SUB 650

SUB 660

SUB 670

SUB 680

SUB 690

SUB 700

SUB 710

SUB 720

SUB 730

SUB 740

SUB 750

SUB 760

SUB 770

SUB 780

SUB 790

SUB 800

SUB 810

SUB 820

SUB 830

SUB 840

SUB 850

SUB 860

SUB 870

SUB 880

SUB 890

SUB 900

SUB 910

SUB 920

SUB 930

SUB 940

SUB 950

SUB 960

SUB 970

SUB 980

SUB 990

SUB1000

SUB1010

SUB1020

SUB1030

SUB1040

SUB1050

SUB1060

SUB1070

SUB1080

SUB1090

SUB1100

SUB1110

SUB1120

SUB1130

SUB1140

SUB1150

SUB1160

SUB1170

SUB1180

-39-
350

360

370

380

390

400

410

420

430

440

450

460

470

480

490

500

510

520

J=K

DO 350 I=N3,N4

IC(I)=IB(J)

J=J+1

IF (N2-38) 370,370,380

K=42

K1=K+N22-1

J=N2+3

DO 390 L=J,80

IB(L)=IA(47)

IB(1)=IA(38)

IB(N2+2)=IA(38)

IB(K-1)=IA(38)

IB(K1+1)=IA(38)

IF (N22) 420,420,400

DO 410 I=N3,N4

IB(K)=IC(I)

K=K+1

N3=N3+N22

WRITE (I0TAPE.1110) ( IB ( J ) , J=l ,80 \ GO TO 150

N44=N4

IF (Nl-4) 540,440,440

N7=Nl+2

N3=l

K1=0

N7=N7-2

IF (N7-4) 460,470,470

N7=N7+2

DO 530 1=4, N7, 

N2=N(I-3)+N(I-2)

N22=N(I-1)+N(I)

IF ( N ( 1-3 ) -N ( 1-1 ) ) 490 , 480 , 480

N3=N3+N2

GO TO 530

N4=N ( 1-3 

N(I-3)=N(I-1)

N(I-1)=N4

N4=N ( I 

N(I)=N(I-2)

N(I-2)=N4

K1=K1+1

N4=N3+N2-1

K=0

DO 500 J=N3,N4

K=K+1

IB(K)=IC(J)

DO 510 J=1,N22

K=N3+J-1

N6=N4+J

IC(K)=IC(N6)

N3=N3+N22

DO 520 J=1,N2

K=N3+J-1

IC(K)=IB(J)

SUB1190

SUB1200

SUB1210

SUB1220

SUB1230

SUB1240

SUB1250

SUB1260

SUB1270

SUB1280

SUB1290

SUB1300

SUB1310

SUB1320

SUB1330

SUB1340

SUB1350

SUB1360

SUB1370

SUB1380

SUB1390

SUB1400

SUB1410

SUB1420

SUB1430

SUB1440

SUB1450

SUB1460

SUB1470

SUB1480

SUB1490

SUB1500

SUB1510

SUB1520

SUB1530

SUB1540

SUB1550

SUB1560

SUB1570

SUB1580

SUB1590

SUB1600

SUB1610

SUB1620

SUB1630

SUB1640

SUB1650

SUB1660

SUB1670

SUB1680

SUB1690

SUB1700

SUB1710

SUB1720

SUB1730

-40-
530 CONTINUE

IF (Kl) 540,540,450

540 WRITE (IOTAPE.lllO) IA(6) , IA(9) , IA( 14) , IA(9 )

, IA ( 19 ] C START OF SUBSTITUTION

550 IF (IEND) 570,560,570

560 IB(IWIDE1+1)=IA(47)

READ (IRTAPE,1060) ( IB( J ) , J=l , IWIDE1

)

570 CALL CHECK2 ( IEND , ITEST, 1

IF (IEND) 580,590,580

580 STOP

590 N3=l

DO 600 I=1,IWIDE1

IF (IA(81)-IB(I) ) 600,630,600

600 CONTINUE

I=IWIDE1

IF (IB(IWIDE1)-IA(47) ) 700,610,700

610 DO 620 J=1,IWIDE1

IF (IB(I)-IA(47) ) 690,620,690

620 1=1-1

GO TO 690

630 J=I+IWIDE1-1

IF (J-360) 640,640,700

640 K=I

READ ( IRTAPE , 1060 )( IB ( I ), I=K , J

IEND=2

CALL CHECK2 ( IEND , ITEST ,K) IF (IEND) 650,660,650

650 I=K-1

GO TO 700

660 DO 670 I=K,J

IF (IA(81)-IB(I) ) 670,630,670

670 CONTINUE

I=J

DO 680 L=K,J

IF (IB(I)-IA(47) ) 700,680,700

680 1=1-1

690 1=1+1

700 IW=I

IB(IW+1)=IA(47)

IF (L0CK1) 710,

710 CALL SUNLOK

720 K2=l

ILK=0

730 N6=0

N7=0

DO 760 K=K2,IW

N3=l

DO 750 1=2, Nl,

N2=N(I-1)

N22=N(I)

K1=K

N4=N3+N2-1

DO 740 J=N3,N4

IF (IB(Kl)-IC(J

740 K1=K1+1

) 750,740,750

SUB1740

SUB1750

SUB1760

SUB1770

SUB1780

SUB1790

SUB1800

SUB1810

SUB1820

SUB1830

SUB1840

SUB1850

SUB1860

SUB1870

SUB1880

SUB1890

SUB1900

SUB1910

SUB1920

SUB1930

SUB1940

SUB1950

SUB1960

SUB1970

SUB1980

SUB1990

SUB2000

SUB2010

SUB2020

SUB2030

SUB2040

SUB2050

SUB2060

SUB2070

SUB2080

SUB2090

SUB2100

SUB2110

SUB2120

SUB2130

SUB2140

SUB2150

SUB2160

SUB2170

SUB2180

SUB2190

SUB2200

SUB2210

SUB2220

SUB2230

SUB2240

SUB2250

SUB2260

SUB2270

SUB2280

41-
K1=K1-1 SUB2290

N7=I SUB2300

N6=N3 SUB2310

GO TO 770 SUB2320

750 N3=N3+N2+N22 SUB2330

760 CONTINUE

GO TO 910

SUB2340

SUB2350

770 IF (Kl-IW) 790,790,780 SUB2360

780 IW=K1

ILK=1

IF (IW-360) 790,790,900

SUB2370

SUB2380

SUB2390

790 K1=K

N2=N(N7-1)

N22=N(N7)

N3=N6+N2

N4=N3+N22-1

N5=N22-N2

IF (N5) 870,800,840

SUB2400

SUB2410

SUB2420

SUB2430

SUB2440

SUB2450

SUB2460

800 DO 810 J=N3,N4

IB(K1)=IC(J)

SUB2470

SUB2480

810 K1=K1+1 SUB2490

820 IF (ILK) 830,830,910 SUB2500

830 K2=K1

GO TO 730

SUB2510

SUB2520

840 IF (IW+N5-360) 850,850,900 SUB2530

850 IW=IW+N5

K2=IW

DO 860 J=K1,IW

K9=K2-N5

IB(K2)=IB(K9)

SUB2540

SUB2550

SUB2560

SUB2570

SUB2580

860 K2=K2-1

GO TO 800

SUB2590

SUB2600

870 DO 880 J=K1 , IW

K9=J-N5

SUB2610

SUB2620

880 IB(J)=IB(K9)

K9=IW+N5+1

DO 890 J=K9,IW

SUB2630

SUB2640

SUB2650

890 IB(J)=IA(47)

IW=IW+N5

IF (N22) 820,820,800

SUB2660

SUB2670

SUB2680

900 WRITE (I0TAPE.1130) SUB2690

910 IF (L0CK2) 920,930,920 SUB2700

920 CALL SLOCK SUB2710

C PRINT OUT INSTRUCTIONS 1WITH THE CONDITION THAT WHEN A LINE IS SUB2720

C BROKEN INTO TWO OR MORE CARDS THE NEW CARD WILL ALWAYS START WITHSUB2730

C THE BEGINNING OF A WORD. SUB2740

930 K=l

K1=IWIDE2-1

IF (IW-K1-1) 940,940,970

SUB2750

SUB2760

SUB2770

940 WRITE (I0TAPE.1110) . (IB(J)

IF (ITEST) 950,550,950

,J=K IW) SUB2780

SUB2790

950 WRITE (IPTAPE,1060) (IB(J)

GO TO 550

,J=K IW) SUB2800

SUB2810

960 K=K1+1

K1=K1+IWIDE2-1

SUB2820

SUB2830

42-
970

980

990

1000

1010

1020

1030

1040

1050

C1060

1070

1080

1090

1100

1110

1120

1130

1140

1150

C

C

IF (IW-K1-1) 940,940,970

J=K1

DO 980 I=K,K1

IF (IB(J)-IA(47) ) 980,1010,980

J=J-1

WRITE (I0TAPE,1110) ( IB( J ) , J=K, Kl ), IA(82)

IF (ITEST) 1000,960,1000

WRITE (IPTAPE.1060) (IB( J) , J=K,K1 ) , IA(82)

GO TO 960

K1=J

IF (IB(K1+1)-IA(47) ) 990,1020,990

DO 1030 I=K,K1

IF (IB(J)-IA(47) ) 1040,1030,1040

J=J-1

GO TO 990

K1=J

GO TO 970

STOP

SUB2840

SUB2850

SUB2860

SUB2870

SUB2880

SUB2890

SUB2900

SUB2910

SUB2920

SUB2930

SUB2940

SUB2950

SUB2960

SUB2970

SUB2980

SUB2990

SUB3000

SUB3010

SUB3020

SUB3030

SUB3040

SUB3050

OR GSUB3060

SUB3070

FORMAT (132A1)

FORMAT (4012)

FORMAT (1A1,1I3,2A1,1I2)

FORMAT (70H INPUT OR OUTPUT IMAGE WIDTH CANNOT BE LESS THAT 1 1REATER THAN 132/6H STOP .

FORMAT (33H LIST OF REPLACEMENTS IS TOO L0NG/67H MAXIMUM CHARACTERSUB3080

1 LENGTH IS 8000, MAXIMUM NUMBER OF PHRASES IS 400/20H CURRENT VALUSUB3090

2ES ARE ,2I6,6H STOP.) SUB3100

FORMAT (1X.131A1) SUB3110

FORMAT (16H THE CHARACTER ,1A1,48H DID NOT APPEAR 4 TIMES ON THE SUB3120

1CARD BELOW. STOP . /1X, 80A1

SUB3130

FORMAT (86H0THE LINE FOLLOWING WOULD HAVE EXCEEDED 360 CHARACTERS SUB3140

1IF SUBSTITUTION HAD CONTINUED. ) SUB3150

FORMAT (1X,1A1,1I3,2A1,1I2) SUB3160

FORMAT (IX, 5012) SUB3170

END SUB3180

SUBROUTINE SUNLOK

DIMENSION IA(86), N(400), IC(8000), IB(361)

COMMON ITAPE , IOTAPE , IRTAPE , IPTAPE , IWIDE1 , IWIDE2 , IA , IW , N ,'lC , IB L=0

J=0

K=0

DO 60 1=1, IW

IF ( IB ( I

) -IA ( 83 )

) 40 , 20 , 40

20 L=L+1

IF (L-J-l) 30,60,30

30 K=l

GO TO 60

40 IF (IB(I)-IA(85)) 60,50,60

50 J=J+1

IF (L-J) 30,60,30

60 CONTINUE

IF (L-J) 80,70,90

70 IF (K) 80,120,80

SULK 10

SULK 20

SULK 30

SULK 40

SULK 50

SULK 60

SULK 70

SULK 80

SULK 90

SULK100

SULK110

SULK120

SULK130

SULK140

SULK150

SULK160

SULK170

SULK180

43-
80 WRITE (IOTAPE, 280) SULK190

GO TO 150 SULK200

90 IF (IA(83)-IA(85) ) 80,100,80 SULK210

100 K=2*(L/2)-L SULK220

IF (K) 110,120,110 SULK230

110 IW=IW+1 SULK240

IB(IW)=IA(85) SULK250

120 J=l SULK260

130 IF (IB(J)-IA(83) ) 140,160,140 SULK270

140 J=J+1 SULK280

IF (J-(IW+1) ) 130,150,150 SULK290

150 RETURN SULK300

160 IF (IB(J+1)-IA(85) ) 190,170,190 SULK310

170 J=J+2 SULK320

DO 180 I=J,IW SULK330

180 IB(I-1)=IB(I) SULK340

GO TO 220 SULK350

190 IF (IB(J+2)-IA(85) ) 230,200,230 SULK360

200 J=J+3 SULK370

DO 210 I=J,IW SULK380

210 IB(I-1)=IB(I) SULK390

220 IW=IW-1 SULK400

IB(IW+1)=IA(47) SULK410

J=J-1 SULK420

GO TO 130 SULK430

230 IF ((IW+D-360) 250,250,240 SULK440

240 WRITE (I0TAPE.270) SULK450

GO TO 150 SULK460

250 IW=IW+1 SULK470

J=J+3 SULK480

K=IW SULK490

DO 260 L=J,IW SULK500

IB(K)=IB(K-1) SULK510

260 K=K-1 SULK520

J=J-1 SULK530

B(R)= A( 3) SULK540

GO TO 160 SULK550

C SULK560

270 FORMAT (116H0THE WORK ON THE FOLLOWING LINE WAS HALTED JUST BEF0RESULK570

1 THE 360 CHARACTER LINE LIMIT WAS EXCEEDED IN SHIFT AND UNLOCK) SULK580

280 FORMAT (69H0THE FOLLOWING LINE DID NOT CONTAIN A BALANCED SET OF SSULK590

1HIFT SYMBOLS. ) SULK600

C END SULK610

SUBROUTINE SLOCK SUUC 10

DIMENSION IA(86), N(400), IC(8000), IB(361) SUUC 20

COMMON ITAPE , IOTAPE , IRTAPE , IPTAPE , IWIDE1 , IWIDE2 , IA , IW , N , IC , IB SUUC 30

J=l SUUC 40

20 IF (IB(J)-IA(84) ) 30,60,30 SUUC 50

30 J=J+1 SUUC 60

IF (J-(IW+1)) 20,20,50 SUUC 70

40 WRITE (IOTAPE, 140) SUUC 80

50 RETURN SUUC 90

60 J=J+2 SUUC100

70 IF (IB(J)-IA(84) ) 110,80,110 SUUC110

44.
80

90

100

110

120

130

C140

IW=IW-1

DO 90 K=J,IW

IB(K)=IB(K+1)

IB(IW+1)=IA(47

J=J+1

IF (J-IW

IW=IW+1

IB(IW)=IA(86

GO TO 50

IF (IW-360)

IW=IW+1

J=J+1

K=IW

DO 130 L=J,IW

IB(K)=IB(K-1)

K=K-1

IB(J-1)=IA(86

GO TO 20

SUUC120

SUUC130

SUUC140

SUUC150

SUUC160

70,70,100 SUUC170

SUUC180

) SUUC190

SUUC200

120,100,40 SUUC210

SUUC220

SUUC230

SUUC240

SUUC250

SUUC260

SUUC270

SUUC280

SUUC290

SUUC300

FORMAT (116H0THE WORK ON THE FOLLOWING LINE WAS HALTED JUST BEF0RESUUC310

1 THE 360 CHARACTER LINE LIMIT WAS EXCEEDED IN SHIFT AND LOCK ) SUUC320

END SUUC330-

(K.ITEST.J)

N(400), IC(8000), IB(361)

IRTAPE , IPTAPE , IWIDE1 , IWIDE2 , IA , IW , N , IC , IB

20

30

40

50

60

70

80

90

C100

110

IA(I) ,1=1,80'

i) ,1=1, so

SUBROUTINE CHECK2

DIMENSION IA(86)

COMMON ITAPE.IOTAPE

IF (K-l) 20,40,20

L=J-1

DO 30 1=1,26

L=L+1

IF (IA(I)-IB(L) ) 70,30,70

CONTINUE

IF (K-2) 40,90,90

K=l

WRITE (I0TAPE,100;

IF (ITEST) 50,80,50

WRITE (IPTAPE, 110) (IAl

IF (IPTAPE-6) 80,80,60

END FILE IPTAPE

GO TO 80

K=0

RETURN

K=l

GO TO 80

FORMAT (1X.80A1)

FORMAT (80A1)

END

SUBROUTINE SUBST ( IB, IW , ITYPE)

SUBSTITUTE SUBROUTINE

TEXTUAL SUBSTITUTION PROGRAM WRITTEN BY C. MESSINA NSRDS-NBS

IB (999) IS THE STRING TO BE PROCESSED. ON RETURN FROM SUBST, IB

SUCK 10

SUCK 20

SUCK 30

SUCK 40

SUCK 50

SUCK 60

SUCK 70

SUCK 80

SUCK 90

SUCK100

SUCK110

SUCK120

SUCK130

SUCK140

SUCK150

SUCK160

SUCK170

SUCK180

SUCK190

SUCK200

SUCK210

SUCK220

SUCK230

SUCK240

SUCK250

SUBS

SUBS

SUBS

SUBS

SUBS

SUBS

12

3

4

40

41

45-
20

30

60

70

100

150

C

CONTAINS THE REMADE LINE. SUBS

IW IS THE LENGTH OF THE INPUT STRING IN IB. ON RETURN FROM SUBST.SUBS

IW CONTAINS THE NEW LENGTH OF IB. SUBS

ITYPE = WHEN THE SUBSTITUTION TABLE IS READ IN AND ITYPE = 1 WHEN THE SUBSTITUTION IS TO TAKE PLACE.

SUBS

SUBS

SUBS

SUBS

SUBS

SUBS 10

SUBS 11

SUBS 12

42

43

44

56

7

8

9

THE INPUT DECK AT OBJECT TIME IS THE FOLLOWING SET OF CARDS

THE FIRST CARD IS A DICTIONARY OF THE ALPHABET STARTING WITH THE

LETTER A IN CARD COL ONE, A LETTER B IN COL 2 AND SO FORTH. THE

NUMBERS FOLLOW THE ALPHABET STARTING WITH ZERO. COL 38 CONTAINS

THE PRINT OUT STRING DELIMITER. COL 47 CONTAINS A BLANK.

THE SECOND CARD HAS A ZERO IN COL 2 IF NO CARDS ARE TO BE PUNCHED SUBS 13

1 IF THE PUNCH TAPE IS TO BE WRITTEN. THE NEXT 212 FIELDS ON THIS SUBS 14

CARD, IF POSITIVE NON ZERO INTEGERS, CONTAIN THE IRTAPE NUMBER SUBS 15

AND IPTAPE NUMBER, OTHERWISE THEY ARE SET TO IRTAPE=5 AND IPTAPE=3SUBS 16

THE THIRD AND FOURTH CARDS ARE BOTH IN A1,I3,2A1,I2 FORMATS. SUBS 18

THE FIRST TWO FIELDS ARE IGNORED ON BOTH CARDS IN THIS VERSION. SUBS 19

THE 3RD FIELD IS THE SHIFT TO UPPER CASE SYMBOL, THE 4TH IS SHIFT SUBS 21

TO LOWER CASE SYMBOL, AND THE FIFTH IS THE SHIFT AND LOCK SWITCH SUBS 22

THAT IS IF THE MODE IS NOT SHIFT AND LOCK AND 1 IF IT IS. SUBS 23

CARDS FIVE ET SEQ CONTAIN THE LIST OF STRINGS TO BE EXCHANGED. SUBS 24

ON EACH CARD THE OLD RECORD OR STRING APPEARS ON THE LEFT SIDE ANDSUBS 25

THE NEW STRING ON THE RIGHT. THE CHARACTER WHICH APPEARS IN CARD SUBS 26

COLUMN 1 IS THE STRING DELIMITER WHICH REMAINS IN FORCE FOR THAT SUBS 27

CARD. IT MAY, HOWEVER, CHANGE FROM CARD TO CARD. SUBS 28

THE FORMAT IS PRESCRIBED. A CHARACTER IN COL 1 DEFINES THE STARTSUBS 29

OF A STRING. THE SAME CHARACTER MUST APPEAR AFTER THE END SUBS 30

OF THE STRING. THE THIRD APPEARANCE OF THE COLUMN 1 CHARACTER ON SUBS 31

THE CARD STARTS THE 2ND STRING AND THE FOURTH APPEARANCE ENDS IT. SUBS 32

EXAMPLE

/REAL/ /TRUE/

AFTER THE SUBSTITUTION LIST MUST COME A CARD WITH THE WORD

STARTING IN CARD COLUMN ONE.

DIMENSION IA(86) ,N(1000) ,IC(8000) ,IB(999)

ITAPE=5

I0TAPE=6

IEND=0

MAXIW=998

IF (ITYPE) 20,20,560

READ (ITAPE,840) ( IA( J ) , J=l ,80

WRITE ( IOTAPE , 890 )

( IA ( J ) , J=l , 80

)

READ (ITAPE,850) ITEST , IRTAPE , IPTAPE

IF (IRTAPE) 30,30,60

IRTAPE=5

IF (IPTAPE) 70,70,100

IPTAPE=3

WRITE (IOTAPE, 930) ITEST, IRTAPE, IPTAPE

READ (ITAPE.860) IA(81 ) , IWIDE1 , IA(83) , IA(85) , L0CK1

WRITE (IOTAPE, 920) IA(81 )

, IWIDE1 , IA (83) , IA(85 )

, L0CK1

READ (ITAPE.860) IA(82 ) , IWIDE2 , IA(84) , IA(86) , L0CK2

WRITE (IOTAPE, 920) IA (82) , IWIDE2, IA(84) , IA(86) , L0CK2

N1=0

N3=l

START OF READING IN SUBSTITUTE LISTS

SUBS 33

SUBS 34

FINIS SUBS 36

SUBS 37

SUBS 38

SUBS 39

SUBS 40

SUBS 41

SUBS 42

SUBS 43

SUBS 44

SUBS 45

SUBS 46

SUBS 47

SUBS 48

SUBS 49

SUBS 53

SUBS 54

SUBS 58

SUBS 59

SUBS 60

SUBS 61

SUBS 62

SUBS 69

SUBS 70

SUBS 71

46-
160 READ (ITAPE.840) (IB(J),.

N2=0

N22=0

r=l,80)

IF (IB(1)-IA(6) ) 210,170 210

170 IF (IB(2)-IA(9) ) 210,180 210

180 IF (IB(3)-IA(14) ) 210, 19C),210

190 IF (IB(4)-IA(9) ) 210,200 210

200 IF (IB(5)-IA(19)) 210, 44C),210

210 DO 230 1=2,78

IF (IB(I)-IB(l) ) 230,220 230

220 IF (N2) 160,160,240

230 N2=I-1

240 J=N2+3

IF (J-79) 260,250,250

250 WRITE (I0TAPE.900) IB(1),

GO TO 830

(IB(I) ,1=1,80

260 K=J+1

DO 270 I=J,79

IF (IB(I)-IB(l) ) 270,280, 270

270 K=I+2

GO TO 250

280 DO 290 I=K,80

IF (IB(I)-IB(l) ) 290,300, 290

290 N22=I-K+1

GO TO 250

300 Nl=Nl+2

N(N1-1)=N2

N(N1)=N22

N4=N3+N2-1

IF (N4-7920) 320,320,310

310 WRITE (I0TAPE,880) N4,N1

GO TO 830

320 IF (Nl-1000) 330,330,310

330 J=2

DO 340 I=N3,N4

IC(I)=IB(J)

340 J=J+1

N3=N3+N2

IF (N22) 370,370,350

350 N4=N3+N22-1

J=K

DO 360 I=N3,N4

IC(I)=IB(J)

360 J=J+1

370 IF (N2-38) 380,380,390

380 K=42

390 K1=K+N22-1

J=N2+3

DO 400 L=J,80

400 IB(L)=IA(47)

IB(1)=IA(38)

IB(N2+2)=IA(38)

IB(K-1)=IA(38)

IB(K1+1)=IA(38)

IF (N22) 430,430,410

SUBS 72

SUBS 73

SUBS 74

SUBS 75

SUBS 76

SUBS 77

SUBS 78

SUBS 79

SUBS 80

SUBS 81

SUBS 82

SUBS 83

SUBS 84

SUBS 85

SUBS 86

SUBS 87

SUBS 88

SUBS 89

SUBS 90

SUBS 91

SUBS 92

SUBS 93

SUBS 94

SUBS 95

SUBS 96

SUBS 97

SUBS 98

SUBS 99

SUBS1.00

SUBS101

SUBS102

SUBS103

SUBS104

SUBS105

SUBS106

SUBS107

SUBS108

SUBS109

SUBS110

SUBS111

SUBS112

SUBS113

SUBS114

SUBS115

SUBS116

SUBS117

SUBS118

SUBS119

SUBS120

SUBS121

SUBS122

SUBS123

SUBS124

SUBS125

SUBS126

47-
410 DO 420 I=N3.N4

IB(K)=IC(I)

420 K=K+1

N3=N3+N22

430 WRITE (IOTAPE, 890) ( IB( J) , J=l ,80)

GO TO 160

440 IF (Nl-4) 550,450,450

450 N7=Nl+2

460 N3=l

K1=0

N7=N7-2

IF (N7-4) 470,480,480

470 N7=N7+2

480 DO 540 1=4, N7,

N2=N(I-3)+N(I-2)

N22=N(I-1)+N(I)

IF ( N ( 1-3 ) -N ( 1-1 )

) 500 , 490 , 490

490 N3=N3+N2

GO TO 540

500 N4=N(I-3)

N(I-3)=N(I-1)

N(I-1)=N4

N4=N ( I

N(I)=N(I-2)

N ( 1-2 ) =N4

K1=K1+1

N4=N3+N2-1

K=0

DO 510 J=N3,N4

K=K+1

510 IB(K)=IC(J)

DO 520 J=1,N22

K=N3+J-1

N6=N4+J

520 IC(K)=IC(N6)

N3=N3+N22

DO 530 J=1,N2

K=N3+J-1

530 IC(K)=IB(J)

540 CONTINUE

IF (Kl) 550,550,460

550 WRITE (I0TAPE,890) IA(6 ) , IA (9 ) , IA( 14) , IA(9) , IA( 19

GO TO 820

C START OF SUBSTITUTION

560 IF (IW-MAXIW) 580,580,570

570 WRITE (I0TAPE.940) IW.MAXIW. ( IB(I) , 1=1 . IW)

GO TO 830

580 CALL CHECKI ( IA , IB, ITEST , IOTAPE , IPTAPE, IEND , 1

IF (IEND) 830,590,830

590 N3=l

IB(IW+1)=IA(47)

IF (L0CK1) 600,610,600

600 CALL SUNLK ( IA, IB, IW, IOTAPE)

610 K2=l

ILK=0

SUBS127

SUBS128

SUBS129

SUBS130

SUBS131

SUBS132

SUBS133

SUBS134

SUBS135

SUBS136

SUBS137

SUBS138

SUBS139

SUBS140

SUBS141

SUBS142

SUBS143

SUBS144

SUBS145

SUBS146

SUBS147

SUBS148

SUBS149

SUBS150

SUBS151

SUBS152

SUBS153

SUBS154

SUBS155

SUBS156

SUBS157

SUBS158

SUBS159

SUBS160

SUBS161

SUBS162

SUBS163

SUBS164

SUBS165

SUBS166

SUBS167

SUBS 168

SUBS169

SUBS170

SUBS171

SUBS172

SUBS173

SUBS174

SUBS175

SUBS176

SUBS177

SUBS178

SUBS179

•SUBS 180

SUBS181

48-
620 N6=0

N7=0

DO 650 K=K2,IW

N3=l

DO 640 1=2, Nl, 

N2=N(I-1)

N22=N(I)

K1=K

N4=N3+N2-1

DO 630 J=N3,N4

IF (IB(Kl)-IC(J) ) 640,630,640

630 K1=K1+1

K1=K1-1

N7=I

N6=N3

GO TO 660

640 N3=N3+N2+N22

650 CONTINUE

GO TO 800

660 IF (Kl-IW) 680,680,670

670 IW=K1

ILK=1

IF (IW-MAXIW) 680,680,790

680 K1=K

N2=N(N7-1)

N22=N(N7)

N3=N6+N2

N4=N3+N22-1

N5=N22-N2

IF (N5) 760,690,730

690 DO 700 J=N3,N4

IB(K1)=IC(J)

700 K1=K1+1

710 IF (ILK) 720,720,800

720 K2=K1

GO TO 620

730 IF (IW+N5-MAXIW) 740,740,790

740 IW=IW+N5

K2=IW

DO 750 J=K1,IW

K9=K2-N5

IB(K2)=IB(K9)

750 K2=K2-1

GO TO 690

760 DO 770 J=K1,IW

K9=J-N5

770 IB(J)=IB(K9)

K9=IW+N5+1

DO 780 J=K9,IW

780 IB(J)=IA(47)

IW=IW+N5

IF (N22) 710,710,690

790 WRITE (I0TAPE,910) MAXIW

800 IF (L0CK2) 810,820,810

810 CALL SULOCK ( IA, IB, IW, IOTAPE)

SUBS182

SUBS183

SUBS184

SUBS185

SUBS186

SUBS187

SUBS188

SUBS189

SUBS190

SUBS191

SUBS192

SUBS193

SUBS194

SUBS195

SUBS196

SUBS197

SUBS198

SUBS199

SUBS200

SUBS201

SUBS202

SUBS203

SUBS204

SUBS205

SUBS206

SUBS207

SUBS208

SUBS209

SUBS210

SUBS211

SUBS212

SUBS213

SUBS214

SUBS215

SUBS216

SUBS217

SUBS218

SUBS219

SUBS220

SUBS221

SUBS222

SUBS223

SUBS224

SUBS225

SUBS226

SUBS227

SUBS228

SUBS229

SUBS230

SUBS231

SUBS232

SUBS233

SUBS234

SUBS235

SUBS236

49.
820 RETURN SUBS237

830 STOP SUBS238

840 FORMAT (132A1) SUBS240

850 FORMAT (4012) SUBS241

860 FORMAT ( 1A1 , 113 , 2A1 , 112

SUBS242

880 FORMAT (33H LIST OF REPLACEMENTS IS TOO L0NG/67H MAXIMUM CHARACTERSUBS245

1 LENGTH IS 8000, MAXIMUM NUMBER OF PHRASES IS 400/20H CURRENT VALUSUBS246

2ES ARE ,2I6,6H STOP.) SUBS247

890 FORMAT (1X.131A1) SUBS248

900 FORMAT (16H THE CHARACTER ,1A1,48H DID NOT APPEAR 4 TIMES ON THE SUBS249

1CARD BELOW. STOP . /1X,80A1SUBS250

910 FORMAT (40H0THE LINE FOLLOWING WOULD HAVE EXCEEDED ,1I6,43H CHARACSUBS251

ITERS IS SUBSTITUTION HAD CONTINUED. SUBS252

920 FORMAT ( IX, 1A1 , 113 , 2A1 , 112) SUBS253

930 FORMAT (IX, 5012) SUBS254

940 FORMAT ( 19H STRING OF LENGTH =,1I6,43H IS TOO LONG FOR SUBROUTINE SUBS255

1SUBST. LENGTH =,1I6,6H STOP . / , IX, 120A1) SUBS256

END SUBS257-

C

C SUBROUTINE SUNLK ( IA , IB , IW , IOTAPE

DIMENSION IA(86) ,IB(999)

MAXIW=998

L=0

J=0

K=0

DO 60 1=1, IW

IF (IB(I)-IA(83) ) 40,20,40

20 L=L+1

IF (L-J-l) 30,60,30

30 K=l

GO TO 60

40 IF (IB(I)-IA(85) ) 60,50,60

50 J=J+1

IF (L-J) 30,60,30

60 CONTINUE

IF (L-J) 80,70,90

70 IF (K) 80,120,80

80 WRITE (IOTAPE, 280)

GO TO 150

90 IF (IA(83)-IA(85) ) 80,100,80

100 K=2*(L/2)-L

IF (K) 110,120,110

110 IW=IW+1

IB(IW)=IA(85)

120 J=l

130 IF (IB(J)-IA(83) ) 140,160,140

140 J=J+1

IF (J-(IW+1)) 130,150,150

150 RETURN

160 IF (IB(J+1)-IA(85) ) 190,170,190

170 J=J+2

DO 180 I=J,IWA

180 IB(I-1)=IB(I)

GO TO 220

50-
190 IF (IB(J+2)-IA(85) ) 230,200,230

200 J=J+3

DO 210 I=J,IW

210 IB(I-1)=IB(I)

220 IW=IW-1

IB(IW+1)=IA(47)

J=J-1

GO TO 130

230 IF ( (IW+D-MAXIW) 250,250,240

240 WRITE (I0TAPE.270)

GO TO 150

250 IW=IW+1

J=J+3

K=IW

DO 260 L=J,IW

IB(K)=IB(K-1)

260 K=K-1

J=J-1

IB(J)=IA(83)

GO TO 160

270 FORMAT (116H0THE WORK ON THE FOLLOWING LINE WAS HALTED JUST BEFORE

1 THE MAXIMUM CHARACTER LINE LIMIT WAS EXCEEDED IN SUNLK ) 280 FORMAT (69H0THE FOLLOWING LINE DID NOT CONTAIN A BALANCED SET OF S 1HIFT SYMBOLS. ) END

SUBROUTINE SULOCK ( IA , IB , IW , IOTAPE ] DIMENSION IA ( 86 ) , IB ( 999

MAXIW=998

J=l

20 IF (IB(J)-IA(84) ) 30,60,30

30 J=J+1

IF (J-(IW+1)) 20,20,50

40 WRITE (IOTAPE, 140)

50 RETURN

60 J=J+2

70 IF (IB(J)-IA(84) ) 110,80,110

80 IW=IW-1

DO 90 K=J,IW

90 IB(K)=IB(K+1)

IB(IW+1)=IA(47)

J=J+1

IF (J-IW) 70,70,100

100 IW=IW+1

IB(IW)=IA(86)

GO TO 50

110 IF (IW-MAXIW) 120,100,40

120 IW=IW+1

J=J+1

K=IW

DO 130 L=J,IW

IB(K)=IB(K-1)

130 K=K-1

IB(J-1)=IA(86)

-51-
GO TO 20

G140 FORMAT (116H0THE WORK ON THE FOLLOWING LINE WAS HALTED JUST BEFORV

1 THE MAXIMUM CHARACTER LINE LIMIT WAS EXCEEDED IN SULOCK ") END

CC SUBROUTINE CHECKI ( IA , IB , ITEST , IOTAPE , IPTAPE , K , J

DIMENSION IA(86) ,IB(999)

IF (K-l) 20,40,20

20 L=J-1

DO 30 1=1,26

L=L+1

IF (IA(I)-IB(L) ) 70,30,70

30 CONTINUE

IF (K-2) 40,90,90.

40 K=l

WRITE (IOTAPE, 100) ( IA( I ), 1=1 ,80)

IF (ITEST) 50,80,50

50 WRITE (IPTAPE, 110) ( IA( I ) , 1=1 ,80)

IF (IPTAPE-6) 80,80,60

60 END FILE IPTAPE

GO TO 80

70 K=0

80 RETURN

90 K=l

GO TO 80

100 FORMAT (1X.80A1)

110 FORMAT (80A1)

END

C

CC

C SEARCH SEAR0010

C SEAR0020

C THIS CODE WAS WRITTEN IN FOUR SECTIONS DESIGNED TO WORK INDEPENDENTLY SEAR0030

C INPUT SEAR0040

C THE FIRST CARD FOLLOWING $DATA CONTAINS THE SPECIAL SEARCH CHARACTER SEAR0050

C IA(47) CONTAINS THE THE CHARACTER PRECEDING THE START OF A WORD SEAR0060

C 'NORMALLY A BLANK SEAR0070

C IA(50) CONTAINS THE CHARACTER SIGNALING THE END OF A SEARCH W0RDSEAR0080

C OR PHRASE , NORMALLY A BLANK OR A PERIOD. SEAR0090

C THE SUGGESTED FORMAT FOR THE FIRST CARD IS GIVEN BELOW WHERE CARD SEAR0100

C COLUMN ONE IS FOUND IN 11,2 IN 12 , AND SO FORTH SEAR0110

C ABCDEFGHIJKLMN0PQRSTUVWXYZ0123456789+. )$*/, (=' - SEAR0120

C THE SECOND CARD CONTAINS FOUR SWITCHES IN 12 FORMAT SEAR0130

C ITEST IS ONE WHEN THE CHOSEN LINES ARE TO BE WRITTEN AS CARD SEAR0140

C IMAGES ON IPTAPE. ITEST = WHEN NO CARDS ARE TO BE MADE . SEAR0150

C INSIDE IS IN THE ANCHORED MODE WHEN THE PROGRAM IS LOOKING SEAR0160

C AT THE START OF ANY WORD IN THE CARD IMAGE. INSIDE IS SEAR0170

C 1 IN THE UNANCHORED MODE WHEN THE SEARCH PHRASE IS TO SEAR0180

C BE LOCATED ANYWHERE ON THE CARD IMAGE. SEAR0190

C IRTAPE - A SPECIAL INPUT TAPE. IF ONE INPUT TAPE WILL DO , SET IRTAPE SEAR0200

C EQUAL TO ITAPE SEAR0210

C IPTAPE - A SPECIAL OUTPUT TAPE. IT CAN BE USED AS AN INPUT TO OTHER SEAR0220

52-
PROGRAMS, BUT CANNOT BE EQUATED WITH IOTAPE AS IOTAPE, IN ADDITION TO NORMAL OUTPUT, CONTAINS OTHER PROGRAM MESSAGES

AND ERROR REMARKS.

200

201

61

62

63

64

65

66

67

68

69

70

71

THE THIRD CARD CONTAINS EITHER THE WORD 'AND' OR THE WORD 'OR' STARTING IN CARD COLUMN ONE. 'AND' BEING EQUAL TO 1. THE 'AND' DEMANDS THAT ALL SEARCH WORDS OR PHRASES MUST

BE FOUND IN A CARD IMAGE IN ORDER TO BE CHOSEN.

THE 'OR' REQUIRES ONLY THAT ONE OF THE SEARCH WORDS OR

PHRASES BE FOUND IN ORDER TO BE CHOSEN.

NOW FOLLOW THE SEARCH WORDS OR PHRASES . EACH STARTING IN CARD COLUMN

ONE AND ENDING WITH THE SYMBOL STORED IN IA(50)

THE LAST CARD IS TO CONTAIN THE WORD FINIS STARTING IN CARD

ONE AND ENDING WITH THE SYMBOL IA(50)

TAPES ARE LABELED ACCORDING TO THEIR USE.

ITAPE - THE NORMAL SYSTEM INPUT TAPE.

IOTAPE - THE NORMAL SYSTEM OUTPUT TAPE.

CODE WRITTEN BY MRS CARLA G. MESSINA NSRDS NBS 1966

DIMENSION IA(81) ,IB(81) ,IC0L(82) ,N(200) ,IC(8000;

ITAPE=5

I0TAPE=6

READ ( ITAPE, 1) ( IA( J ) , J=l ,80

FORMAT (80A1)

WRITE (IOTAPE, 2) ( IA( J) , J=l ,80)

FORMAT ( IX, 80A1)

READ (ITAPE, 200) ITEST , INSIDE , IRTAPE , IPTAPE

FORMAT (4012)

FORMAT (IX, 4012)

IF (IRTAPE) 61,61,62

IRTAPE=5

GO TO 64

IF (IRTAPE- 6) 64,64,63

REWIND IRTAPE

IF (IPTAPE) 65,65,66

IPTAPE = 3

GO TO 68

IF (IPTAPE - 6) 68,68,67

REWIND IPTAPE

WRITE (IOTAPE, 201) ITEST, INSIDE , IRTAPE , IPTAPE

READ ( ITAPE , 1 )

( IB ( J ) , J=l , 80

)

WRITE I IF (IBI

IF (IBI

IF (IB(

IAND = WRITE I FORMAT

IB(J) ,J=1,80)

4 , 69 ,

) 4,70,4

) 4,71,4

; IOTAPE, 2)

ID - IA(1)

2) - IA(14

3) - IA( 4

1

; IOTAPE, 3) IA(1) ,IA(12) ,IA(12)

(47H0THE PROGRAM IS SEARCHING FOR LINES CONTAINING ,3A1

1H OF THE WORDS GIVEN BELOW. //)

GO TO 5 IAND = WRITE (IOTAPE, 3) IA ( 1 )

, IA( 14) , IA( 25

N1=0

SEAR0230

SEAR0240

SEAR0250

SEAR0260

SEAR027&

SEAR0280

SEAR0290

SEAR0300

SEAR0310

SEAR0320

SEAR0330

SEAR0340

C0LUMNSEAR0350

SEAR0360

SEAR0370

SEAR0380

SEAR0390

SEAR0400

SEAR0404

SEAR0406

SEAR0410

SEAR0420

SEAR0430

SEAR0440

SEAR0450

SEAR0460

SEAR0470

SEAR0480

SEAR0490

SEAR0500

SEAR0510

SEAR0520

SEAR0530

SEAR0540

SEAR0550

SEAR0560

SEAR0570

SEAR0580

SEAR0590

SEAR0600

SEAR0610

SEAR0620

SEAR0630

SEAR0640

SEAR0650

SEAR0660

SEAR0670

SEAR0680

SEAR0690

26SEAR0700

SEAR0710

SEAR0720

SEAR0730

SEAR0740

SEAR0750

-53-
72

73

74

75

76

8

9

10

11

12

13

999

14

15

16

17

18

19

190

20

22

24

N3=l

READ

N2=0

J=l

IF

IF

IF

IF

IF

IF

DO

IF

ITAPE.l) (IB(J) ,J=1,80;

ia( 6; ia(9);

IA(14! - IA( 9; - IA(19) - IA(50;

1 8,72,8

8,73,8

1 8,74,8

1 8,75,8

1 8,76,8

1 8,17,8

,80- IA(50) ) 9,10,9

IB

IB

IB

IB

IB

;ib

9 1=1

IB(I

N2=I

IF (N2) 6,6,11

Nl=Nl+l

N(N1)=N2

N4=N3+N2-1

IF (N4-8000) 14,14,12

WRITE (I0TAPE.13) N4,N1

FORMAT (47H0LIST OF SEARCH WORDS TOO LONG. PLEASE SHORTEN.

1MAXIMUM CHARACTER LENGTH IS 8000 MAXIMUM NUMBER OF PHRASES

2 /21H CURRENT VALUES ARE ,216)

STOP

IF (Nl-200) 15,15,12

J=l

DO 16 I=N3,N4

IC(I) = IB(J)

J=J+1

N3=N3+N2

WRITE (I0TAPE.2)

GO TO 6

f ICOL(l) =IA(47)

WRITE (I0TAPE.2)

WRITE (I0TAPE,2)

WRITE (I0TAPE,2)

IF (IAND) 40,18,40

IF (INSIDE) 19,30,19

READ (IRTAPE.l) (ICOL(j;

CALL CHECK1 ( IA , ICOL , K , ITEST , IPTAPE , IOTAPE

)

IF (K) 999,190,999

N3=l

DO 24 K1=1,N1

N2=N(K1)

N4=N3+N2-1

I2=82-N2

DO 22 1=2,12

Jl=l

DO 20 J=N3,N4

K=I+J1-1

IF (ICOL(K)

J1=J1+1

GO TO 26

CONTINUE

N3=N3+N2

GO TO 19

'IB(J) ,J=1.N2!

IA(47;

IA(47)

IA(47]

J=2,81)

- IC(J] 22,20,22

SEAR0760

SEAR0770

SEAR0780

SEAR0790

SEAR0800

SEAR0810

SEAR0820

SEAR0830

SEAR0840

SEAR0850

SEAR0860

SEAR0870

SEAR0880

SEAR0890

SEAR0900

SEAR0910

SEAR0920

SEAR0930

SEAR0940

,/68H0SEAR0950

IS 200SEAR0960

SEAR0970

SEAR0980

SEAR0990

SEAR1000

SEAR1010

SEAR1020

SEAR1030

SEAR1040

SEAR1050

SEAR1060

SEAR1070

SEAR1080

SEAR1090

SEAR1100

SEAR1110

SEAR1120

SEAR1130

SEAR1140

SEAR1150

SEAR1160

SEAR1170

SEAR1180

SEAR1190

SEAR1200

SEAR1210

SEAR1220

SEAR1230

SEAR1240

SEAR1250

SEAR1260

SEAR1270

SEAR1280

SEAR1290

SEAR1300

-54-
26

28

30

300

77

78

32

34

36

38

39

40

42

420

44

46

48

49

50

500

WRITE ( IOTAPE , 2 ) ( ICOL ( J ) , J=2 , 81

)

IF (ITEST) 28,19,28

WRITE ( IPTAPE , 1 )

( ICOL ( J ) , J=2 , 81

GO TO 19

READ (IRTAPE.l) ( ICOL( J) , J=2 ,81

CALL CHECK1 ( IA , ICOL , K , ITEST , IPTAPE , IOTAPE

IF (K) 999,300,999

N3=l

DO 36 K1=1,N1

N2=N ( Kl

N4=N3+N2-1

I2=82-N2

DO 34 1=2,12

IF (ICOL(I) - IA(47)

)

IF (ICOL(I-l) - IA(47;

Jl=l

DO 32 J=N3,N4

K=I+J1-1

IF (ICOL(K) - IC(J

J1=J1+1

GO TO 38

CONTINUE

N3=N3+N2

GO TO 30

WRITE (IOTAPE,

77 , 34 , 77

) 34,78,34

34,32,34

ICOL(J) ,J=2,81)

IF (ITEST) 39,30,39

WRITE ( IPTAPE, 1) (ICOL(J) ,J=2,81)

GO TO 30

IF (INSIDE) 42,50,42

READ (IRTAPE.l) ( ICOL( J ) , J=2 , 81

CALL CHECK1 ( IA , ICOL , K , ITEST , IPTAPE , IOTAPE ] IF (K) 999,420,999

N3=l

DO 48 K1=1,N1

N2=N ( Kl

)

N4=N3+N2-1

I2=82-N2

DO 46 1=2,12

Jl=l

DO 44 J=N3,N4

K=I+J1-1

IF (ICOL(K)

J1=J1+1

GO TO 48

CONTINUE

GO TO 42

N3=N3+N2

WRITE (IOTAPE,

IC(J) ) 46,44,46

ICOL(J) ,J=2,81

IF (ITEST) 49,42,49

WRITE ( IPTAPE , 1 )

( ICOL ( J ) , J=2 , 81

GO TO 42

READ (IRTAPE,1) ( ICOL( J ) , J=2 ,81

CALL CHECK1 ( IA , ICOL , K , ITEST , IPTAPE , IOTAPE

)

IF (K) 999,500,999

N3=l

SEAR1310

SEAR1320

SEAR1330

SEAR1340

SEAR1350

SEAR1360

SEAR1370

SEAR1380

SEAR1390

SEAR1400

SEAR1410

SEAR1420

SEAR1430

SEAR1440

SEAR1450

SEAR1460

SEAR1470

SEAR1480

SEAR1490

SEAR1500

SEAR1510

SEAR1520

SEAR1530

SEAR1540

SEAR1550

SEAR1560

SEAR1570

SEAR1580

SEAR1590

SEAR1600

SEAR1610

SEAR1620

SEAR1630

SEAR1640

SEAR1650

SEAR1660

SEAR1670

SEAR1680

SEAR1690

SEAR1700

SEAR1710

SEAR1720

SEAR1730

SEAR1740

SEAR1750

SEAR1760

SEAR1770

SEAR1780

SEAR1790

SEAR1800

SEAR1810

SEAR1820

SEAR1830

SEAR1840

SEAR1850

-55-
DO 58 K1=1,N1

N2=N(K1)

N4=N3+N2-1

I2=82-N2

DO 56 1=2,12

IF (ICOL(I) - IA(47)) 79,56,79

79 IF (ICOL(I-l) - IA(47) ) 56,80,56

80 Jl=l

DO 54 J=N3,N4

K=I+J1-1

IF (ICOL(K) - IC(J) ) 56,54,56

54 J1=J1+1

GO TO 58

56 CONTINUE

GO TO 50

58 N3=N3+N2

WRITE (IOTAPE ,2) (ICOL(J) ,J=2,81)

IF (ITEST) 59 ,50,59

59 WRITE (IPTAPE

GO TO 50

END

,1) (ICOL(J) ,J=2,81)

SEAR1860

SEAR1870

SEAR1880

SEAR1890

SEAR1900

SEAR1910

SEAR1920

SEAR1930

SEAR1940

SEAR1950

SEAR1960

SEAR1970

SEAR1980

SEAR1990

SEAR2000

SEAR2010

SEAR2020

SEAR2030

SEAR2040

SEAR2050

SEAR2060

40

10

20

30

50

60

19

29

C

C

C

C

C

Cc

C

Cc

c

cc

c

50,10,50

SUBROUTINE CHECK1(IA,II

DIMENSION IA(81) ,11(82)

DO 40 I = 2, 81

IJ(I-l) =11(1)

DO 10 1=1,26

IF (IA(I)-IJ(I))

CONTINUE

K=l

WRITE (IOTAPE, 19) IF (ITEST) 20,60,

WRITE (IPTAPE, 29) IF (IPTAPE -6) 60

END FILE IPTAPE

GO TO 60

K=0

RETURN

FORMAT

FORMAT

END

BLOCK

K, ITEST,

IJ(82)

IPTAPE, IOTAPE

(ia(i:

20

(IA(I

,60,30

1=1 , so

1=1, so

;iX,80Al

;80"A1)

SEARCH

SECK0010

SECK0020

SECK0030

SECK0040

SECK0050

SECK0060

SECK0070

SECK0080

SECK0090

SECK0100

SECK0110

SECK0120

SECK0130

SECK0140

SECK0150

SECK0160

SECK0170

SECK0180

SECK0190

BSEA0001

BSEA0002

BSEA0004

BSEA0006

BSEA0008

BSEA0010

THIS PROGRAM PERFORMS A SEARCH IN A FILE MADE UP OF VARIABLE

LENGTH BLOCKS, SUITABLY DELIMITED, FOR THE OCCURANCE OF ONE OR MORE

SPECIFIED STRINGS OF CHARACTERS. THE BLOCK IS SELECTED FOR OUTPUT

IF THE DESIRED STRING OR STRINGS ARE FOUND WITHIN IT. THE BLOCK

DELIMITER, SEARCH STRATEGIES AND DESIRED STRINGS ARE INPUT PARAMETERS . BSEA0012

BSEA0020

THE FIRST CARD FOLLOWING THE XQT CONTAINS THE SPECIAL SEARCH CHARACTERBSEA0030

A (47) CONTAINS THE THE CHARACTER PRECEDING THE START OF A WORD BSEA0040

NORMALLY A BLANK BSEA0050

A (50) CONTAINS THE CHARACTER SIGNALING THE END OF A SEARCH W0RDBSEA0060

-56-
OR PHRASE , NORMALLY A BLANK OR A PERIOD. BSEA0070

THE SUGGESTED FORMAT FOR THE FIRST CARD IS GIVEN BELOW WHERE CARD BSEA0080

COLUMN 1 IS IN LOCATION 11, 2 IS IN 12 ETC. BSEA0090

ABCDEFGHIJKLMN0PQRSTUVWXYZ0123456789+. )$*/, (-' = BSEAOIOO

THE SECOND CARD CONTAINS FIVE SWITCHES IN (12) FORMAT BSEAOllO

ITEST IS NONZERO WHEN THE CHOSEN ONES ARE TO BE WRITTEN AS CARDBSEA0120

IMAGES ON LOGICAL UNIT IPTAPE. ITEST =0 WHEN NO CARDS

ARE TO BE MADE.

INSIDE IS WHEN THE CODE IS TO LOOK ONLY AT THE START OF ANY

WORD IN THE CARD IMAGE. INSIDE = 1. WHEN THE SEARCH

STRING IS SOUGHT ANYWHERE ON THE CARD IMAGE.

IFLAG IS THE LENGTH OF THE BLOCK FLAG ON THE FOLLOWING CARD.

IF IFLAG IS LEFT BLANK, THE ENTIRE CARD WILL BE

THE FLAG.

IRTAPE IS THE LOGICAL UNIT TO READ THE INPUT RECORDS FROM. IF

ZERO, IT IS SET TO 5(UNIVAC 1108 CARD READER)

IPTAPE IS THE LOGICAL UNIT TO WRITE THE OUTPUT RECORDS ON. IF

ZERO, IT IS SET TO 3(UNIVAC 1108 CARD PUNCH)

IWIDE1 IS THE WIDTH OF THE LIBRARY IMAGES ON UNIT IRTAPE. IF

IWIDE1 IS NOT A VALUE BETWEEN AND 132 IT IS SET TO 80

THE THIRD CARD CONTAINS THE BLOCK FLAG STARTING IN CARD COLUMN ONE

CONTINUING UP TO CARD COLUMN IFLAG OR 80

THE FOURTH CARD CONTAINS EITHER THE WORD 'AND' OR THE WORD 'OR' STARTING IN CARD COLUMN ONE. 'AND' BEING EQUAL TO 1. THE 'AND' DEMANDS THAT ALL SEARCH WORDS OR PHRASES MUST

BE FOUND IN A CARD IMAGE IN ORDER TO BE CHOSEN.

THE 'OR' REQUIRES ONLY THAT ONE OF THE SEARCH WORDS OR

PHRASES BE FOUND IN ORDER TO BE CHOSEN.

NOW FOLLOW THE SEARCH WORDS OR PHRASES . EACH STARTING IN CARD

ONE AND ENDING WITH THE SYMBOL STORED IN A (50)

THE LAST CARD IS TO CONTAIN THE 'WORD FINIS STARTING IN CARD COLUMN

ONE. AND ENDING WITH THE SYMBOL A (50).

THE CODE NOW STARTS READING THE LIBRARY IMAGES FROM UNIT IRTAPE.

10

20

25

30

52

CODE WRITTEN BY MRS CARLA G. MESSINA NSRDS NBS 1966

DIMENSION IA(81) ,IB(81) ,IC(8080) , ID ( 140 ) ,IFLAGS(80) , N ( 200

DIMENSION IC0L(8300)

COMMON ITES.T , ITAPE , IOTAPE , IRTAPE , IPTAPE , IA , IB , IC , ID , IFLAGS , N ITAPE=5

I0TAPE=6

IEND=1

READ (ITAPE, 9) (IA(J) ; WRITE (IOTAPE, 19) (IA'

READ (ITAPE, 29) ITEST

IF (IRTAPE) 10,10,20

IRTAPE=5

GO TO 30

IF (IRTAPE - 6) 30,30

REWIND IRTAPE

IF (IPTAPE) 32,32,34

IPTAPE=3

IWIDE3=81

GO TO 36

IF (IPTAPE

J=l,80)

I) ,1=1,80)

INSIDE, IFLAG,

25

IRTAPE , IPTAPE , J , IWIDE1

- 6 32,32,35

BSEA0130

BSEA0140

BSEA0150

BSEA0160

BSEA0170

BSEA0180

C0NDIDEREDBSEA0190

BSEA0200

BSEA0210

BSEA0220

BSEA0230

BSEA0240

BSEA0244

BSEA0246

ANBSEA0250

BSEA0260

BSEA0270

BSEA0280

BSEA0290

BSEA0300

BSEA0310

BSEA0320

COLUMN BSEA0330

BSEA0340

BSEA0350

BSEA0360

BSEA0370

BSEA0375

BSEA0380

BSEA0390

BSEA0400

BSEA0410

ICOL BSEA0420

BSEA0430

BSEA0440

BSEA0450

BSEA0460

BSEA0470

BSEA0480

BSEA0490

BSEA0500

BSEA0510

BSEA0520

BSEA0530

BSEA0540

BSEA0550

BSEA0560

BSEA0570

BSEA0580

-57-
35 REWIND IPTAPE

36 IF (IFLAG)50,50,40

40 IF (IFLAG-80) 60,60,50

50 IFLAG =80

60 WRITE (IOTAPE, 39) ITEST , INSIDE , IFLAG, IRTAPE , IPTAPE

IF (J-l) 63,61,62

61 IWIDE1= IWIDE1 + 100

IF (IWIDE1 - 132) 63,63,62

62 J=0

IWIDE1 = 80

GO TO ' 64

63 IF (IWIDE1) 62,62,64

64 READ ( ITAPE , 9 )

( IFLAGS ( J ) , J=l , IFLAG

)

WRITE (I0TAPE.19) ( IFLAGS (J ), J=l , IFLAG

IF (IPTAPE-6) 66,66,65

65 IWIDE3=IWIDE1+1

66 READ ( ITAPE , 9 ) ( IB ( J ) , J=l , 80

)

IF (IB(1) - IA(1) ) 90,70,90

70 IF (IB (2) - IA(14)) 90,80,90

80 IF (IB(3) - IA(4) ) 90,85,90

85 IAND =1

WRITE (I0TAPE,49) IWIDE1 , IA( 1 ) , IA( 12)

GO TO 100

90 IAND = WRITE (I0TAPE.49) IWIDE1 , IA( 1 ) , IA( 14) ,

100 N1=0

N3=l

L4=0

110 READ ( ITAPE , 9 )

( IB ( J ) , J=l , 80

)

WRITE ( IOTAPE , 19 )( IB ( J ) , J=l , 80

)

N2=0 < IF (IB(1) - IA(6)) 170,120,170

120 IF (IB(2) - IA(9)) 170,130,170

130 IF (IB(3) - IA( 14)) 170, 140. 170

140 IF (IB(4) - IA( 9))170,150,170

150 IF (IB(5) - IA( 19)) 170, 160, 170

160 IF (IB (6) - IA(50) ) 170, 260, 170

170 DO 180 1=1,80

IF (IB(I) - IA(50)) 180,190,180

180 N2=I

190 IF (N2) 110,110,200

200 N1=N1+1

210

9999

220

230

240

260

IA(25|

N(N1)=N2

N4=N3+N2-1

IF (N4-8000) 220,220,210

WRITE (IOTAPE, 59) N4.N1

STOP

IF (Nl-200) 230,230,210

J=l

DO 240 I=N3,N4

IC(I)=IB(J)

J=J+1

N3=N3+N2

GO TO 110

WRITE (IOTAPE, 19) IA(47)

BSEA0590

BSEA0600

BSEA0610

BSEA0620

3SEA0630

BSEA0640

BSEA0650

BSEA0660

BSEA0670

BSEA0680

BSEA0690

BSEA0700

BSEA0710

BSEA0720

BSEA0730

BSEA0740

BSEA0750

BSEA0760

BSEA0770

BSEA0780

BSEA0790

BSEA0800

BSEA0810

BSEA0820

BSEA0830

BSEA0840

BSEA0850

BSEA0860

BSEA0870

BSEA0880

BSEA0890

BSEA0900

BSEA0910

BSEA0920

BSEA0930

BSEA0940

BSEA0950

BSEA0960

BSEA0970

BSEA0980

BSEA0990

BSEA1000

BSEA1010

BSEA1020

BSEA1030

BSEA1040

BSEA1050

BSEA1060

BSEA1070

BSEA1080

BSEA1090

BSEA1100

BSEA1110

BSEA1120

BSEA1130

58-
WRITE (I0TAPE.19) IA(47) BSEA1140

WRITE (I0TAPE.19) IA(47) BSEA1150

IWIDE2= IWIDE1+1 BSEA1160

DO 270 1=1, 8250, IWIDE2 BSEA1170

270 IC0L(I)=IA(47) BSEA1180

280 L1=-IWIDE1+1 BSEA1190

L2=0 BSEA1200

L3=0 BSEA1210

290 IF (L2-8181) 310,300,300 BSEA1220

300 WRITE ( IOTAPE , 69 )( ID ( J ) , J=l , IWIDE1

)

BSEA1230

L4=0 BSEA1240

GO TO 380 BSEA1250

310 READ (IRTAPE.9) ( ID( J) , J=l , IWIDE1

)

BSEA1260

CALL CHECK4(1,IEND) BSEA1270

IF (IEND) 305,325,305 BSEA1280

305 DO 320 I=1,IFLAG BSEA1290

IF (IFLAGS(I) - ID(I)) 350,320,350 BSEA1300

320 CONTINUE BSEA1310

C THIS CARD SIGNALS THE END OF A BLOCK OF CARDS, IF L3 IS ZERO THE LASTBSEA1320

C CARD WAS ALSO THE END OF A BLOCK. BSEA1330

325 IF (L3) 330,330,370 BSEA1340

330 L4=0 BSEA1350

L3=l BSEA1360

L2=IWIDE2 BSEA1370

Ll=2 BSEA1380

J=l BSEA1390

DO 340 I=L1,L2 BSEA1400

ICOL(I) =ID(J) BSEA1410

340 J=J+1 BSEA1420

GO TO 380 BSEA1430

350 L3=L3+1 BSEA1440

L2=L2+IWIDE2 BSEA1450

L1=L1+IWIDE2 BSEA1460

J=l BSEA1470

DO 360 I=L1,L2 BSEA1480

ICOL(I) =ID(J) BSEA1490

360 J=J+1 BSEA1500

GO TO 290 BSEA1510

370 L4=l BSEA1520

380 IF (IAND),490,390,490 BSEA1530

390 IF (INSIDE) 400,440,400 BSEA1540

400 N3=l BSEA1550

DO 430 K1=1,N1 BSEA1560

N2=N(K1) BSEA1570

N4=N3+N2-1 BSEA1580

I2=L2-N2+1 BSEA1590

DO 420 1=2,12 BSEA1600

Jl=l BSEA1610

DO 410 J=N3,N4 BSEA1620

K=I+J1-1 BSEA1630

IF (ICOL(K) - IC(J)) 420,410,420 BSEA1640

410 J1=J1+1 BSEA1650

GO TO 590 BSEA1660

420 CONTINUE BSEA1670

430 N3=N3+N2 BSEA1680

59-
GO TO 630

440 N3=l

DO 480 K1=1,N1

N2=N(K1)

N4=N3+N2-1

I2=L2-N2+1

DO 470 1=2,12

IF (ICOL(I) - IA(47)) 450,470,450

450 IF (ICOL(I-l) - IA(47)) 470,455,470

455 Jl=l

DO 460 J=N3,N4

K=I+J1-1

IF (ICOL(K) - IC(J)) 470,460,470

460 J1=J1+1

GO TO 590

470 CONTINUE

480 N3=N3+N2

GO TO 630

490 IF (INSIDE) 500,540,500

500 N3=l

DO 530 K1=1,N1

N2=N(K1)

N4=N3+N2-1

I2=L2-N2+1

DO 520 1=2,12

Jl=l

DO 510 J=N3,N4

K=I+J1-1

IF (ICOL(K) - IC(J)) 520,510,520

510 J1=J1+1

GO TO 530

520 CONTINUE

GO TO 630

530 N3=N3+N2

GO TO 590

540 N3=l

DO 580 K1=1,N1

N2=N(K1)

N4=N3+N2-1

I2=L2-N2+1

DO 560 1=2,12

IF (ICOL(I) - IA(47)) 545,570,545

545 IF (ICOL(I-l) - IA(47)) 570,550,570

550 Jl=l

DO 560 J=N3,N4

K=I+J1-1

IF (ICOL(K) - IC(J)) 570,560,570

560 J1=J1+1

GO TO 580

570 CONTINUE

GO TO 630

580 N3=N3+N2

590 DO 600 I=1,L2,IWIDE2

L5=I+IWIDE1

600 WRITE (I0TAPE.19) ( ICOL( J ) , J=I , L5

BSEA1690

BSEA1700

BSEA1710

BSEA1720

BSEA1730

BSEA1740

BSEA1750

BSEA1760

BSEA1770

BSEA1780

BSEA1790

BSEA1800

BSEA1810

BSEA1820

BSEA1830

BSEA1840

BSEA1850

BSEA1860

BSEA1870

BSEA1880

BSEA1890

BSEA1900

BSEA1910

BSEA1920

BSEA1930

BSEA1940

BSEA1950

BSEA1960

BSEA1970

BSEA1980

BSEA1990

BSEA2000

BSEA2010

BSEA2020

BSEA2030

BSEA2040

BSEA2050

BSEA2060

BSEA2070

BSEA2080

BSEA2090

BSEA2100

BSEA2110

BSEA2120

BSEA2130

BSEA2140

BSEA2150

BSEA2160

BSEA2170

BSEA2180

BSEA2190

BSEA2200

BSEA2210

BSEA2220

BSEA2230

-60-
610

620

630

640

650

,J=L4,L5

660

9

19

29

39

49

59

69

IF (ITEST) 610,630,610

DO 620 I=1,L2,IWIDE3

L5=I+IWIDE3-1

WRITE (IPTAPE,9) (ICOL(j;

CALL CHECK4(0,IEND)

IF (IEND) 640,9999,640

IF (L4) 280,280,650

L4=0

L3=l

L2=IWIDE1+1

Ll=2

J=l

DO 660 I=L1,L2

ICOL(I) =ID(J)

J=J+1

GO TO 310

FORMAT (132A1)

FORMAT (1X.131A1)

FORMAT (4012)

FORMAT (IX, 4012)

FORMAT (46H0THE PROGRAM IS SEARCHING IN LINES OF LENGTH ,1.14

112H CONTAINING ,3A1,26H OF THE WORDS GIVEN BELOW. //

FORMAT (47H0LIST OF SEARCH WORDS TOO LONG. PLEASE SHORTEN

1MAXIMUM CHARACTER LENGTH IS 8000. MAXIMUM NUMBER OF PHRASES IS 200BSEA2470

2 /21H CURRENT VALUES ARE ,216) BSEA2480

FORMAT (74H0BL0CK IS TOO LONG. BLOCK IS CONSIDERED TERMINATED WITHBSEA2490

1 THE FOLLOWING CARD , //1X, 131A1//) BSEA2500

END BSEA2510

BSEA2240

BSEA2250

BSEA2260

BSEA2270

BSEA2280

BSEA2290

BSEA2300

BSEA2310

BSEA2320

BSEA2330

BSEA2340

BSEA2350

BSEA2360

BSEA2370

BSEA2380

BSEA2390

BSEA2400

BSEA2410

BSEA2420

BSEA2430

BSEA2440

BSEA2450

/68H0BSEA2460

SUBROUTINE CHECK4(IT,K)

DIMENSION IA ( 81 ), IB ( 81 ), IC ( 8080 ), ID ( 140 ) , IFLAGS ( 80 ) , N ( 200

DIMENSION IC0L(8300)

COMMON ITEST , ITAPE , IOTAPE , IRTAPE , IPTAPE , IA , IB , IC , ID , IFLAGS ,

IF (IT) 10,60,10

10 DO 20 1=1,26

IF (IA(I)-ID(I) ) 40,;20,40

20 CONTINUE

K=0

GO TO 50

30 ENDFILE IPTAPE

GO TO 50

40 K=l

50 RETURN

60 IF (K) 50,70,50

70 WRITE (IOTAPE, 9) ( IA

IF (ITEST) 80,50,80

(J) ,J=1,80

80 WRITE (IPTAPE, 19) ( IA (J) ,J=1,80

IF (IPTAPE-6) 50,50 ,30

9 FORMAT (1X.131A1)

19 FORMAT (13241)

END

C

C

C JUSTIFY

BSCK0010

BSCK0020

BSCK0030

ICOL BSCK0040

BSCK0050

BSCK0060

BSCK0070

BSCK0080

BSCK0090

BSCK0100

BSCK0110

BSCK0120

BSCK0130

BSCK0140

3SCK0150

3SCK0LS0

3SCX0170

BSCK0180

BSCK0190

BSCK0200

BSCK0210

BSCK0220

JUAT 1 JUAT 2

61-
JUAT 25

JUAT 26

JUAT 27

JUAT 28

JUAT 29

JUAT 30

C JUSTIFY PRODUCES RIGHT-HAND JUSTIFIED TEXT WHILE RECOGNIZING JUAT 3

C THE START OF A NEW PARAGRAPH BY LEADING BLANKS AND RECOGNIZING JUAT 4

C SYMBOLS IN CONTROL FIELD 72 OF THE CARD FOR INDENTING (N) , FOR JUAT 5

C CENTERING LINES (C), FOR IGNORING LINES (I), FOR LEAVING LINES JUAT -6 C UNALTERED (D), AND FOR CREATING RUNAROUNDS (R) . JUAT 7

C JUSTIFY REFORMATS PARAGRAPHS BY FIRST REMOVING ALL EXTRANEOUS JUAT 8

C BLANKS AND THEN REMAKES THE PARAGRAPH INTO LINES OF THE SPECIFIED JUAT 9

C WIDTH WITHOUT HYPENATING WORDS. TO MAKE RIGHT HAND JUSTIFIED LINJUAT 10

C EXTRA SPACES ARE REINSERTED AS NECESSARY. JUAT 11

C JUAT 12

C THE FIRST INPUT DATA CARD, STORED IN THE DIMENSIONED ARRAY A (80), JUAT 13

C CONTAINS CONTROL LETTERS AND SYMBOLS. THE CARD FIELDS ARE TREATEDJUAT 14

C FOLLOWS. JUAT 15

C JUAT 16

C A(l) TO A (26) CONTAINS THE ALPHABET JUAT 17

C THEREFORE A (3) IS ASSUMED TO BE C, A (4) TO BE D, ETC JUAT 18

C A (27) TO A (36) CONTAINS THE INTEGERS STARTING WITH ZERO JUAT 19

C A (38) CONTAINS A PERIOD OR END OF SENTENCE SYMBOL . JUAT 20

C A (39) TERMINATES THE READING OF A CARD. ANYTHING JUAT 21

C FOUND IN FURTHER FIELDS OF THE CARD WILL BE IGNORED JUAT 22

C EXCEPT CONTROL LETTERS IN CARD FIELD 72. JUAT 23

C A (45) IS USED TO INDICATE THAT THE OUTPUT LINE IS JUAT 24

C CONTINUED ONTO THE NEXT CARD.

C A (46) SHIFT SYMBOL USED IN LOCK AND UNLOCK

C A (47) NORMALLY A BLANK, IS THE CHARACTER WHICH

C SEPARATES WORDS. IT IS, THEREFORE, THE ONLY VALID

C CHARACTER AT WHICH TO BREAK A LINE. NOTE THAT THIS

C PROGRAM REMOVES ALL EXTRA SPACES BETWEEN WORDS. IF

C RESERVED SPACES ARE DESIRED A SPECIAL CHARACTER OTHERJUAT 31

C THAN A (47) MUST BE USED. JUAT 32

C A (48) IS A TAB INDICATOR. THIS SYMBOL IS TREATED JUAT 33

C AN A (47) WHEN ENCOUNTERED IN THE INPUT TEXT EXCEPT JUAT 34

C THAT IT WILL NOT START A NEW PARAGRAPH IF ENCOUNTEREDJUAT 35

C IN CARD COLUMN ONE. JUAT 36

C A (60) CONTAINS AN INTEGER COUNT OF THE NUMBER OF JUAT 37

C FIGURING THE LENGTH OF THE OUTPUT LINE, ALL OTHER JUAT 39

C CHARACTERS AND SYMBOLS HAVE A WIDTH OF ONE. THESE NO JUAT 40

C COUNT SYMBOLS ARE PUNCHED STARTING IN A (61). JUAT 41

C JUAT 42

C THE SECOND INPUT CARD CONTAINS CONTROL SWITCHES IN (13) FORMAT. JUAT 43

C

" JUAT 44

C FIELD USE JUAT 45

C JUAT 46

C 1 WIDTH OF OUTPUT RECORDS JUAT 47

C 2 NONZERO INSERTS SPACES TO RIGHT JUSTIFY LINES. JUAT 48

C A ZERO FORMATS LINES WITHOUT EXTRA SPACES INSERTED. JUAT 49

C 3 NONZERO WRITES A PUNCH TAPE, ZERO SUPRESSES PUNCH. JUAT 50

C 4 NONZERO CALLS SUBROUTINES LOCK AND UNLOCK. JUAT 51

C 5 UNIT NO. OF READ TAPE (SET TO 5 IS ZERO) JUAT 52

C 6 UNIT NO. OF PUNCH TAPE (SET TO 3 IF ZERO) JUAT 53

C 7 ZERO INSERTS ONE EXTRA SPACE AFTER A PERIOD A (38) JUAT 54

C WHEN POSSIBLE. JUAT 55

C JUAT 56

C A

'

' PARAGRAPH '

' IS CONSIDERED ENDED BY ONE OR MORE BLANKS AT THE JUAT 57

C BEGINNING OF A NEW LINE, A CARD CONTAINING ALL BLANKS, A CARD JUAT 58

-62-
CONTAINING ONLY BLANKS AND A (39) 'S, LETTERS, A(3). A(4), A(14), 0RA(18;

OR A CARD CONTAINING

IN CARD COLUMN 72.

THE

20

30

40

50

60

70

80

90

100

110

120

130

140

150

160

170

180

190

200

210

CODE WRITTEN BY MRS. CARLA G. MESSINA OF NSRDS-NBS 1965

COMMON ITAPE , IRTAPE , IOTAPE , IPTAPE

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST , I JUST

IW,

MESSINA

ICP(360)ICTi

NSRDS - NBS

360) ,IC(8002)

CODE BY MRS CARLA G

DIMENSION IC0L(80)

DIMENSION ISWIT(IOO)

ITAPE=5

I0TAPE=6

N=0

N1=0

NOPAR=0

READ (ITAPE, 670) ( IA( J) , J=l ,80)

WRITE ( IOTAPE , 680 )( IA ( J ) , J=l , 80

)

READ ( ITAPE , 690 ) IW , I JUST , ITEST , ( ISWIT (

IRTAPE=ISWIT(2)

IPTAPE=ISWIT(3)

IF (IRTAPE) 20,20,30

IRTAPE=5

GO TO 50

IF (IRTAPE-6) 50,50,40

REWIND IRTAPE

IF (IPTAPE) 60,60,70

IPTAPE=3

GO TO 90

IF (IPTAPE-6) 90,90,80

REWIND IPTAPE

DO 100 J=l,100

SWITCH(J)=0.0

SWITCH(1)=1.

K=l

DO 120 J=2,21

IF (ISWIT(J

K=J

SWITCH(J)=ISWIT(J

CONTINUE

WRITE (ldTAPE,700

IF (ISWIT(l)) 130

SWITCH(3)=ISWIT(1

WRITE (IOTAPE, 730

DO 150 1=1,8002

IC(I)=IA(47)

IF (IW-20) 480,470,470

READ ( IRTAPE , 670 )( ICOL ( J ) , J=l , 80

CALL CHECK3 (K)

IF (K) 170,180,170

STOP

IF (IC0L(72)-IA(4) ) 500,590,500

IF (NOPAR) 200,210,200

NOPAR=0

CALL OUTPUT

GO TO (540,550,560,570), IS

IA,ICOL,ICP,ICT,IC

1967

IA(80) .SWITCH

,J=1,21

120,120,110

IW , I JUST , ITEST , ( ISWIT ( J

140,130

IW

,j=i,k;

SPECJUAT 59

JUAT 60

JUAT 61

JUAT 62

JUAT 63

JUAT 64

,IC JUAT 65

JUAT 66

00) JUAT 67

JUAT 68

JUAT 69

JUAT 70

JUAT 71

JUAT 72

JUAT 73

JUAT 74

JUAT 75

JUAT 76

JUAT 77

JUAT 78

JUAT 79

JUAT 80

JUAT 81

JUAT 82

JUAT 83

JUAT 84

JUAT 85

JUAT 86

JUAT 87

JUAT 88

JUAT 89

JUAT 90

JUAT 91

JUAT 92

JUAT 93

JUAT 94

JUAT 95

JUAT 96

JUAT 97

JUAT 98

JUAT 99

JUAT100

JUAT101

JUAT102

JUAT103

JUAT104

JUAT105

JUAT106

JUAT107

JUAT108

JUAT109

JUAT110

JUAT111

JUAT112

JUAT113

63-
220 N2=0

IF (IC0L(1)-IA(47) ) 230, 260, 230

230 IF (IC0L(1)-IA(39) ) 250, 590, 250

240 N1=0

N=0

N0PAR=1

GO TO 330

250 IF (NOPAR) 330,240,330

260 IF (NOPAR) 270,280,270

270 CALL OUTPUT

NOPAR=0

280 DO 290 J=l,80

N1=J

IF (IC0L(J)-IA(47) ) 300, 290, 300

290 CONTINUE

GO TO 590

300 IF (IC0L(N1)-IA('39) ) 310 ,590 ,310

310 N2=N1

N0PAR=1

N=N1

N1=N1-1

DO 320 J=1,N

320 IC(J)=IC0L(J)

330 N=N+1

IF (N-7999) 350,340,350

340 WRITE (I0TAPE,710)

GO TO 260

350 ISP=0

N2=N2+1

IF (N2-80) 360,360,400

360 IF (IC0L{N2)-IA(47) ) 370 ,430 ,370

370 IF (IC0L(N2)-IA(48) ) 380 ,620 ,380

380 IF (IC0L(N2)-IA(39) ) 390 ,400 ,390

390 IF (IC0L(N2)-IA(45) ) 420 ,400 ,420

400 IF (ISP) 490,410,490

410 IC(N)=IA(47)

GO TO 160

420 ISP=0

IC(N)=IC0L(N2)

GO TO 450 ( 430 IF (ISP) 460,440,460

440 IC(N)=IA(47)

ISP=1

450 N=N+1

460 N2=N2+1

IF (N2-80) 360,360,400

470 IF (IW-120) 640,640,480

480 WRITE (I0TAPE,720) IW STOP

490 N=N-1

GO TO 160

500 IF (IC0L(72)-IA(9) ) 510, 160, 510

510 IF (IC0L(72)-IA(18) ) 520 ,600 ,520

520 IF (IC0L(72)-IA(3) ) 530, i 310,:530

530 IF (IC0L(72)-IA(14) ) 220 ,580 ,220

JUAT114

JUAT115

JUAT116

JUAT117

JUAT118

JUAT119

JUAT120

JUAT121

JUAT122

JUAT123

JUAT124

JUAT125

JUAT126

JUAT127

JUAT128

JUAT129

JUAT130

JUAT131

JUAT132

JUAT133

JUAT134

JUAT135

JUAT136

JUAT137

JUAT138

JUAT139

JUAT140

JUAT141

JUAT142

JUAT143

JUAT144

JUAT145

JUAT146

JUAT147

JUAT148

JUAT149

JUAT150

JUAT151

JUAT152

JUAT153

JUAT154

JUAT155

JUAT156

JUAT157

JUAT158

JUAT159

JUAT160

JUAT161

JUAT162

JUAT163

JUAT164

JUAT165

JUAT166

JUAT167

JUAT168

-64-
540

5E?0

560

570

580

590

600

610

620

630

640

650

660

C670

680

690

700

710

720

730

C

c

CALL IOCENT JUAT169

GO TO 160 JUAT170

CALL RABOUT JUAT171

GO TO 160 JUAT172

CALL IOSAME JUAT173

GO TO 160 JUAT174

CALL INDENT JUAT175

WRITE (I0TAPE.730) IW JUAT176

GO TO 160 JUAT177

IS=4 JUAT178

GO TO 190 JUAT179

IS=3 JUAT180

GO TO 190 JUAT181

IS=2 JUAT182

GO TO 190 JUAT183

IS=1 JUAT184

GO TO 190 JUAT185

IF (N2-1) 480,630,430 JUAT186

ISP=1 JUAT187

GO TO 430 JUAT188

DO 650 1=28,36 JUAT189

IF (IA(60)-IA(I) ) 650,660,650 JUAT190

CONTINUE JUAT191

SWITCH(2)=0.0 JUAT192

IA(61)=IA(46) JUAT193

GO TO 160 JUAT194

SWITCH (2)=I-27 JUAT195

GO TO 160 JUAT196

JUAT197

FORMAT (80A1) JUAT198

FORMAT (1X.80A1) JUAT199

FORMAT (2413) JUAT200

FORMAT (IX, 2413) JUAT201

FORMAT (62H00NLY 8000 CHARACTERS OF A PARAGRAPH ARE JUSTIFIED AT AJUAT202

1 TIME.) JUAT203

FORMAT (50H1THE WIDTH CANNOT BE LESS THAN 20 OR MORE THAN 120, 4H IJUAT204

1W=,I3) JUAT205

FORMAT (29H THE WIDTH OF OUTPUT TEXT IS ,13///) JUAT206

END JUAT207

SUBROUTINE OUTPUT

COMMON ITAPE , IRTAPE , IOTAPE , IPTAPE

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST , I JUST , IW , IA , ICOL , ICP , ICT , IC

DIMENSION IC0L(80) , ICP (360) , ICT (360) ,IC(8002) ,IA(80) ,SWITCH(10C)

IF (SWITCH(3) ) 20,30,20

20 CALL UNLOCK

CALL LOCK

30 N=N-1

IW1=0

DO 50 1=1,

CALL COWNIT ( IC (

IF (IT) 40,50,40

40 IW1=IW1+1

50 CONTINUE

it:

J OAT

JOAT

J OAT

JOAT

JOAT

JCAT

JOAT

JOAT

JOAT

JOAT

JOAT

JOAT

JOAT

JOAT

12

3

4

5

6

7

8

9

10

11

12

13

14

-65-
IF (IW-IW1) 90,60,60

60 IW2=N

DO 70 1=1, IW2

70 ICP(I)=IC(I)

CALL PRINTP

80 RETURN

90 J=0

1=0

11=1

K=0

K1=0

K2=0

100 CALL COWNIT (IC(I1),IT)

IF (IT) 110,120,110

110 1=1+1

GO TO 130

120 J=J+1

130 11=11+1

IF (I1-(N+1)) 140,240,240

140 IF (I-IW) 100,150,150

150 K=K1+1

CALL COWNIT (IC(I1) ,IT)

IF (IT) 170,160,170

160 J=J+1

1=1-1

170 IF (IC(I1)-IA(47) ) 180,250,180

180 11=11-1

CALL COWNIT (IC(I1+1

IF (IT) 190,200,190

190 1=1-1

GO TO 210

200 J=J-1

210 IF (II) 220,220,170

220 WRITE (I0TAPE,880)

230 STOP

240 K=K1+1

250 Ml=l

K1=I1

DO 260 I2=K,K1

ICP(M1)=IC(I2)

260 M1=M1+1

M=K1-1

IW2=M-K+1

IF (Il-N)

270 IF (I JUST)

280 CALL PRINTP

J=0

1=0

11=11+1

IF (I1-(N+D) 100,80,80

290 IF (IW-I) 300,280,310

300 WRITE (I0TAPE,890)

GO TO 230

310 I2=IW-I

K2=K2+1

IT)

270,620,620

i 290,620,290

JOAT 15

JOAT 16

JOAT 17

JOAT 1-8 JOAT 19

JOAT 20

JOAT 21

JOAT 22

JOAT 23

JOAT 24

JOAT 25

JOAT 26

JOAT 27

JOAT 28

JOAT 29

JOAT 30

JOAT 31

JOAT 32

JOAT 33

JOAT 34

JOAT 35

JOAT 36

JOAT 37

JOAT 38

JOAT 39

JOAT 40

JOAT 41

JOAT 42

JOAT 43

JOAT 44

JOAT 45

JOAT 46

JOAT 47

JOAT 48

JOAT 49

JOAT 50

JOAT 51

JOAT 52

JOAT 53

JOAT 54

JOAT 55

JOAT 56

JOAT 57

JOAT 58

JOAT 59

JOAT 60

JOAT 61

JOAT 62

JOAT 63

JOAT 64

JOAT 65

JOAT 66

JOAT 67

JOAT 68

JOAT 69

-66-
K4=0

IT=2*(K2/2)-K2

IF (IT) 320,350,320

3'20 M1=IW2

DO 330 13=1, IW2

ICT(I3)=ICP(M1)

330 M1=M1-1

DO 340 13=1, IW2

340 ICP(I3)=ICT(I3)

350 IF (K2-1) 300,370,360

360 K3=l

GO TO 330

370 K3=N1+1

380 13=1

390 IF (ICP(I3)-IA(47) ) 410,400,410

400 K4=K4+1

410 IF (I3-IW2+K3-1) 420,430,430

420 13=13+1

GO TO 390

430 M=I2

IT=K4*(I2/K4)-I2

IF (IT) 450,440,450

440 K5=I2/K4

GO TO 460

450 K5=I2/K4+1

IF (K5-1) 710,710,460

460 14=0

13=1

470 M1=I3+I4

ICT(M1)=ICP(I3)

IF (ICP(I3)-IA(47) ) 510,480,510

480 DO 490 15=1, K5

14=14+1

M1=I3+I4

490 ICT(M1)=IA(47)

M=M-l'

IT=K4*(M/K4)-M

IF (IT) 510,500,510

500 K5=I2/K4

510 IF (14-12) 520,540,540

520 IF (I3-IW2) 530,560,560

530 13=13+1

GO TO 470

540 16=13+1

DO 550 113=16, IW2

M1=I13+I4

550 ICT(M1)=ICP(I13)

560 IW2=IW2+I4

570 IT=2*(K2/2)-K2

IF (IT) 600,580,600

580 DO 590 13=1, IW2

590 ICP(I3)=ICT(I3)

GO TO 280

600 DO 610 13=1, IW2

M1=IW2-I3+1

JOAT 70

JOAT 71

JOAT 72

JOAT 73

JOAT 74

JOAT 75

JOAT 76

JOAT 77

JOAT 78

JOAT 79

JOAT 80

JOAT 81

JOAT 82

JOAT 83

JOAT 84

JOAT 85

JOAT 86

JOAT 87

JOAT 88

JOAT 89

JOAT 90

JOAT 91

JOAT 92

JOAT 93

JOAT 94

JOAT 95

JOAT 96

JOAT 97

JOAT 98

JOAT 99

J0AT100

J0AT101

J0AT102

J0AT103

J0AT104

J0AT105

J0AT106

J0AT107

J0AT108

J0AT109

J0AT110

J0AT111

J0AT112

J0AT113

J0AT114

J0AT115

J0AT116

J0AT117

J0AT118

J0AT119

J0AT120

J0AT121

J0AT122

J0AT123

J0AT124

-67-
610 ICP(I3)=ICT(M1)

GO TO 280

J0AT125

J0AT126

C IF SWITCH(4) IS ZERO AN EXTRA BLANK IS INSERTED AFTER A PERIOD ( 38) J0AT127

620 IF (SWITCH(4) ) 280,630, 280 J0AT128

630 IF (IW2-2) 280,280,640 J0AT129

640 13=2 J0AT130

650 IF (I-IW) 660,280,280 J0AT131

660 DO 680 M1=I3,IW2 J0AT132

IF (ICP(M1-1)-IA(38) ) 680 670 ,680 J0AT133

670 IF (ICP(M1)-IA(47) ) 680 ,690,680 J0AT134

680 CONTINUE

GO TO 280

J0AT135

J0AT136

690 I3=M1+1

IW2=IW2+1

1=1+1

I13=IW2

DO 700 M1=I3,IW2

ICP(I13)=ICP(I13-1)

J0AT137

J0AT138

J0AT139

J0AT140

J0AT141

J0AT142

700 113=113-1

GO TO 650

J0AT143

J0AT144

710 DO 720 13=1, IW2 J0AT145

720 ICT(I3)=ICP(I3)

IT=IW2-1

113=2

J0AT146

J0AT147

J0AT148

730 K7=l

DO 760 13=113, IT

K9=I3

J0AT149

J0AT150

J0AT151

IF (ICT(I3)-IA(38) ) 760 ,740,760 J0AT152

740 IF (ICT(I3-1)-IA(47) ) 750 850 750 J0AT153

750 IF (ICT(I3+1)-IA(47) ) 760 840 760 J0AT154

760 CONTINUE

IF (113-2) 460,460,770

J0AT155

J0AT156

770 IF (I-IW) 780,570,570 J0AT157

780 DO 810 M1=K7,IT

K9=M1

J0AT158

J0AT159

IF (ICT(M1)-IA(47) ) 810 790,810 J0AT160

790 IF (ICT(M1+1)-IA(47)) 800 810 800 J0AT161

800 IF (ICT(M1-1)-IA(47) ) 820 810 820 J0AT162

810 CONTINUE

GO TO 570

J0AT163

J0AT164

820 K7=IW2

DC 830 I3=K9,IW2

1CT(K7+1)=ICT(K7)

J0AT165

J0AT166

J0AT167

830 K7=K7-1

1W2=IW2+1

IT=IT+1

1=1 + 1 K7=K9+2

GO TO 770

J0AT168

J0AT169

J0AT170

J0AT171

J0AT172

J0AT173

840 K8=K9+1

I13=K9+1

GO TO 860

J0AT174

J0AT175

J0AT176

850 K8=K9-1 J0AT177

860 K7=IW2

113=K9+2

J0AT178

J0AT179

68-
870

C880

890

C

C

DO 870 I3=K8,IW2

ICT(K7+1)=ICT(K7)

K7=K7-1

IW2=IW2+1

IT=IT+1

1=1+1

IF (I-IW) 730,570,570

FORMAT

FORMAT

END

;21H1K1 HAS BECOME ZERO. ) 26H1IW CANNOT BE LESS THAN I

SUBROUTINE COWNIT ( ICHAR, IT)

COMMON ITAPE , IRTAPE , IOTAPE , IPTAPE

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST

DIMENSION IC0L(80) ,ICP(360) ,ICT(360)

IF (SWITCH(2) -.9999) 3,3,1

N3 = SWITCH(2) + l.E-4

2,4,2

DO 2 1=1, N3

IF (ICHAR - IA(I+60

2 CONTINUE

3 IT = 1 GO TO 5 4 IT =

5 RETURN

END

J0AT180

J0AT181

J0AT182

J0AT183

J0AT184

J0AT185

J0AT186

J0AT187

J0AT188

J0AT189

J0AT190-

JCIT0010

JCIT0020

IJUST , IW , IA , ICOL , ICP , ICT , IC JCIT0030

IC(8002) ,IA(80) .SWITCH(IOO) JCIT0040

JCIT0050

JCIT0060

JCIT0070

JCIT0080

JCIT0090

JCIT0100

JCIT0110

JCIT0120

JCIT0130

JCIT0140

SUBROUTINE IOSAME

COMMON ITAPE , IRTAPE , IOTAPE , IPTAPE

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST

DIMENSION IC0L(80) , ICP (360) , ICT (360)

N=0

N1=0

N2=0

NOPAR=0

IF (ITEST) 2,3,2

FORMAT (80A1)

WRITE ( IPTAPE, I] WRITE (IOTAPE, 4; FORMAT (lX,80Ai;

RETURN

END

ICOL(J) ,J=1,80;

ICOL(J) ,J=1,80;

JSAM0010

JSAM0020

IJUST , IW , IA , ICOL , ICP , ICT , IC JSAM0030

IC(8002) ,IA(80) ,SWITCH(100) JSAM0040

JSAM0050

JSAM0060

JSAM0070

JSAM0080

JSAM0090

JSAM0100

JSAM0110

JSAM0120

JSAM0130

JSAM0140

JSAM0150

SUBROUTINE IOCENT

COMMON ITAPE , IRTAPE , IPTAPE , IOTAPE

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST

DIMENSION ICOL (80) , ICP (360) , ICT (360)

DO 1 1=1,70

IA(47)) 5,2,5

1 ICP(I)=IA(47)

DO 2 1=1,70

IF (ICOL(I) -

2 CONTINUE

3 CALL IOSAME

4 RETURN

JCEN0010

JCEN0020

IJUST , IW , IA , ICOL , ICP , ICT , IC JCEN0030

IC(8002) ,IA(80) .SWITCH(IOO) JCEN0040

JCEN0050

JCEN0060

JCEN0070

JCEN0080

JCEN0090

JCEN0100

JCEN0110

-69-
5 M1=I

DO 7 1=1,70

M2=71-I

IF (IC0L(M2) - IA(47)6,7,6

6 IF (IC0L(M2) - IA(39)

8,7,8

7 CONTINUE

GO TO 3

8 M= M2-M1+1

I2=(IW-M)/2

IF (12) 9,9,10

9 M3=l

GO TO 12

10 IF (70-I2-M) 11,11,16

11 M3=71-M

12 DO 13 I=M1,M2

ICP(M3)=IC0L(I)

13 M3=M3+1

ICP(M3)=IA(39)

ICP(71)=IA(39)

ICP(72)=IA(3)

14 DO 15 1=1,72

15 ICOL(I)=ICP(I)

GO TO 3

16 J 1=0

DO 18 I=M1,M2

CALL COWNIT(ICOL(I) ,J)

IF (J) 18,17,18

17 J1=J1+1

18 CONTINUE

IF (Jl) 19,19,20

19 M3=I2+1

GO TO 12

20 M3=I2+(Jl/2) +1

IF (70-M3-M) 11,11,12

END

JCEN0120

JCEN0130

JCEN0140

JCEN0150

JCEN0160

JCEN0170

JCEN0180

JCEN0190

JCEN0200

JCEN0210

JCEN0220

JCEN0230

JCEN0240

JCEN0250

JCEN0260

JCEN0270

JCEN0280

JCEN0290

JCEN0300

JCEN0310

JCEN0320

JCEN0330

JCEN0340

JCEN0350

JCEN0360

JCEN0370

JCEN0380

JCEN0390

JCEN0410

JCEN0420

JCEN0430

JCEN0440

JCEN0450

JCEN0460

JCEN0470

13

16

SUBROUTINE INDENT

COMMON ITAPE , IRTAPE , IOTAPE , IPTAPE

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST , I JUST , IW , IA , ICOL , ICP , ICT , IC

DIMENSION IC0L(80) , ICP (360) , ICT (360) ,IC(8002) ,IA(80) ,SWITCH(100)

SWITCH! 1) = -l.*SWITCH(l)

DO 1 Ml=l,71

IF (ICOL((Ml) - IA(47) ) 6,1,6

CONTINUE

IW=J

N=0

N1=0

N2=0

N0PAR=0

RETURN

WRITE (IOTAPE, 5) ( IC0L( I ) , 1=1 ,80 ) , ( ICOL( I )

, I=M1 ,M2

FORMAT (1H0,80A1,/53H THE ABOVE CARD CONTAINS AN INDENT OF ILLEGALJIND0160

1 SIZE = ,80A1// ) JIND0170

SWITCH(l) = -l.*SWITCH(l) JIND0180

GO TO 16 JIND0190

JIND0010

JIND0020

JIND0030

JIND0040

JIND0050

JIND0060

JIND0070

JIND0080

JIND0090

JINDOIOO

JIND0110

JIND0120

JIND0130

JIND0140

JIND0150

70-
6 M2=Ml+2

J=0

IF (IC0L(M2) -- IA(47) ) 7 9,7

7 IF (ICOL(Ml) -- IA(28) ) 4 8,4

8 J=100

M1=M1+1

GO TO 10

9 M2=M1+1

10 DO 11 1=27,36

IF (IC0L(M2) -- IA(I)) 11 12,11

11 CONTINUE

GO TO 4

12 J = J + I - 2^ DO 13 1=27,36

r

IF (ICOL(Ml) -- IA(I) ) 13 14,13

13 CONTINUE

GO TO 4

14 J = 10* (1-27) + J IF (J-120) 15, 15,4

15 IF (J-20) 4,3,

END

3

JIND0200

JIND0210

JIND0220

JIND0230

JIND0240

JIND0250

JIND0260

JIND0270

JIND0280

JIND0290

JIND0300

JIND0310

JIND0320

JIND0330

JIND0340

JIND0350

JIND0360

JIND0370

JIND0380

JIND0390

JIND0400

SUBROUTINE RABOUT

COMMON ITAPE,IRTAPE,IOTAPE, IPTAPE

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST , I JUST , IW , IA , ICOL , ICP , ICT , IC

DIMENSION IC0L(80) , ICP (360) ,ICT(360) ,IC(8002) ,IA(80) ,SWITCH(100)

DO 1 111=1,71

IF (ICOLI Ml - IA(47) 4,1 ,4

1 CONTINUE

2 CALL IOSAME

3 N=0

N1=0

N2=0

NOPAR=0

RETURN

8 WRITE (I0TAPE.17) ( ICOL( I )

, 1=1 , 80 )

9 FORMAT (1H0,80A1,/67H JUSTIFY WILL

1 ABOVE CARD OF SIZE = ,80A1//)

GO TO 3

4 M2= Ml+1

M=2

IF (IC0L(M2) - IA(47

5 M=l

M2=M1

11 DO 12 1=27,36

IF (IC0L(M2)

12 CONTINUE

GO TO 8

13 J = 1-27

IF (M-l) 3,2,14

14 DO 15 1=27,36

IF (ICOL(Ml) - IA(I)) 15,16,15

15 CONTINUE

GO TO 8

16 J=10*(I-27) + J

(ICOL(I) ,I=M1,M2)

NOT ALLOW A RUN AROUND FROM

11,5,11

IA(I)) 12,13,12

JRAB0010

JRAB0020

JRAB0030

JRAB0040

JRAB0050

JRAB0060

JRAB0070

JRAB0080

JRAB0090

JRAB0100

JRAB0110

JRAB0120

JRAB0130

JRAB0140

THEJRAB0150

JRAB0155

JRAB0160

JRAB0170

JRAB0180

JRAB0190

JRAB0200

JRAB0210

JRAB0220

JRAB0230

JRAB0240

JRAB0250

JRAB0260

JRAB0270

JRAB0280

JRAB0290

JRAB0300

JRAB0310

JRAB0320

-71-
20 WRITE (I0TAPE.17) IA(39)

WRITE (I0TAPE.17) IA(39)

17 FORMAT (1X.80A1)

WRITE (I0TAPE.18)

18 FORMAT (51H * * * IF(J-2) 8,22,22

* * *

22 M=J/2

DO 19 1=1,

19 WRITE (I0TAPE.17)

IC0L(72) =IA(4)

IC0L(71)=IA(39)

IA(39

WRITE (I0TAPE.17) (ICOL(

M=M+2

DO 21 1=41, J 21 WRITE (I0TAPE.17)

WRITE (I0TAPE.18)

IA(39)

WRITE (I0TAPE.17) IA(39)

WRITE (I0TAPE.17) IA(39

IF (ITEST) 25,3,25

25 M=M-2

WRITE (IPTAPE.17) IA(39)

WRITE (IPTAPE.17) IA(39)

WRITE (IPTAPE.18)

DO 26 1=1,

26 WRITE (IPTAPE.17) IA(39

WRITE (IPTAPE.30) (ICOL(

30 FORMAT (80A1)

M=M+2

DO 27 I=M,J

27 WRITE (IPTAPE.17)

WRITE (IPTAPE.18)

IA(39)

WRITE (IPTAPE.17) IA(39)

WRITE (IPTAPE.17) IA(39)

GO TO 3

C

C

END

I) ,1=1,72)

I) ,1=1,72;

SUBROUTINE UNLOCK

COMMON ITAPE , IRTAPE , IOTAPE , IPTAPE

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST

DIMENSION IC0L(80) ,ICP(360) , ICT(360)

J=l

IF (IC(J -IA(46! 2,4,2

J=J+1

IF (J-(N +1) ) 1,3,3

RETURN

IF (IC(J+1)-IA(46) ) 7,5,7

J=J+2

DO 6 I=J,N

IC(I-1)=IC(I)

GO TO 10 IF (IC(J+2)-IA(46) ) 11,8,11

J=J+3

DO 9 I=J,N

IC(I-1)=IC(I)

JRAB0330

JRAB0340

JRAB0350

JRAB0360

JRAB0370

JRAB0380

JRAB0390

JRAB0400

JRAB0410

JRAB0420

JRAB0430

JRAB0440

JRAB0450

JRAB0460

JRAB0470

JRAB0480

JRAB0490

JRAB0500

JRAB0510

JRAB0520

JRAB0530

JRAB0540

JRAB0550

JRAB0560

JRAB0570

JRAB0580

JRAB0590

JRAB0600

JRAB0610

JRAB0620

JRAB0630

JRAB0640

JRAB0650

JRAB0660

JRAB0670

JULK0010

JULK0020

I JUST , IW , IA , ICOL . ICP , ICT , IC JULK0030

IC ( 8002 ), IA ( 80 ) , SWITCH ( 100 ) JULK0040

JULK0050

JULK0060

JULK0070

JULK0080

JULK0090

JULK0100

JULK0110

JULK0120

JULK0130

JULK0140

JULK0150

JULK0160

JULK0170

JULK0180

-72-
10 N=N-1 JULK0190

IC(N+1)=IA(47) JULK0200

J=J-1 JULK0210

GO TO 1 JULK0220

11 IF ( N -7999) 13,13,12 JULK0230

12 WRITE (I0TAPE.1001) ( IC (K) ,K=1 , 119) JULK0240

1001 FORMAT ( IX, 119A1,/94H THE ABOVE LINE BEING CHANGED FROM SHIFT AND LJULK0250

10CK HAS EXCEEDED THE 8000 CHARACTERS LINE LIMIT. /37H WORK WAS HALTJULK0260

2ED AT 8000 CHARACTERS. ) JULK0270

GO TO 3 JULK0280

13 N=N+1 JULK0290

J=J+3 JULK0300

K=N JULK0310

DO 14 L=J,N JULK0320

1C(K)=IC(K-1) JULK0330

14 K=K-1 JULK0340

J=J-1 JULK0350

IC(J)=IA(46) JULK0360

GO TO 4 JULK0370

END JULK0380

C SUBROUTINE LOCK JL0K0010

COMMON ITAPE,IRTAPE,IOTAPE,IPTAPE JL0K0020

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST , I JUST , IW , IA , ICOL , ICP , ICT , IC JL0K0030

DIMENSION IC0L(80) ,ICP(360) ,ICT(360) ,IC(8002) ,IA(80) ,SWITCH(100) JL0K0040

J=l JL0K0050

1 IF (IC(J)-IA(46) ) 2,5,2 JL0K0060

2 J=J+1 JL0K0070

IF (J-(N +1)) 1,1,4 JLOK0080

3 WRITE IT0TArE,1001) ( IC (K) , K=l , 119JL0K0090

1001 FORMAT (1X,119A1,/97H THE ABOVE PARAGRAPH BEING CHANGED TO SHIFT AJL0K0100

1ND LOCK HAS EXCEEDED THE 8000 CHARACTERS LINE LIMIT. /37H WORK WASJL0K0110

2 HALTED AT 8000 CHARACTERS. ) " JL0K0120

4 RETURN JL0K0130

5 J=J+2 JL0K0140

6 IF (IC(J)-IA(46) ) 10,7,10 JL0K0150

7 IF (IC(J+1)-IA(47) ) 75,70,75 JL0K0160

70 J=J+1 JL0K0170

GO TO 1 JLOK0180

75 N=N-1 JL0K0190

DO 8 K=J,N JL0K0200

8 IC(K)=IC(K+1) JL0K0210

IC(N+1)=IA(47) JL0K0220

J=J+1 JL0K0230

IF (J-N )6,6,9 JL0K0240

9 N=N+1 JL0K0250

IC(N )=IA(46) JL0K0260

GO TO 4 JL0K0270

10 IF (N -7999) 11,9,3 JL0K0280

11 N=N+1 JL0K0290

J=J+1 JL0K0300

K=N JL0K0310

DO 12 L=J,N JL0K0320

IC(K)=IC(K-1) JL0K0330

12 K=K-1 JL0K0340

73-
IC(J-1)=IA(46)

GO TO 1 END

SUBROUTINE PRINTP

COMMON ITAPE,IRTAPE,IOTAPE, IPTAPE

JL0K0350

JL0K0360

JL0K0370

JPRIOOIO

JPRI0020

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST , I JUST , IW , IA , ICOL , ICP , ICT , IC JPRI0030

DIMENSION ICOL ( 80 ) , ICP ( 360

IF (SWITCH(l) ) 1,1,3

CALL PRINT2

RETURN

CALL PRINT1

GO TO 2 END

, ICT ( 360 ) , IC ( 8002 )

', IA ( 80 ) , SWITCH ( 100

JPRI0040

JPRI0050

JPRI0060

JPRI0070

JPRI0080

JPRI0090

JPRI0100

10

20

30

40

50

60

70

80

90

100

105

110

120

130

140

150

SUBROUTINE PRINT1

COMMON ITAPE , IRTAPE , IOTAPE , IPTAPE

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST , I JUST , IW

DIMENSION ICOL ( 80 ) , ICP ( 360.) , ICT ( 360 ) , IC ( 8002

)

FORMAT (1X.119A1)

FORMAT (120A1)

K=l

Kl=118

IF (IW2-K1-1)

WRITE (IOTAPE

10,10,30

i) (icp(j; ,J=K,IW2)

IF (ITEST) 80,20,80

RETURN

J=K1

DO 40 I=K,K1

IF (ICP(J

J=J-1

GO TO 60

K1=J

WRITE (IOTAPE

K=K1+1

K1=K1+118

IF (IW2-K1-1)

K=l

Kl=69

IF (IW2-K1-1)

WRITE (IPTAPE

GO TO 20

J=K1

IF (ICP(Kl) - IA(47

DO 110 I=K,K1

IF (ICP(J

J=J-1

GO TO 130

K1=J

WRITE (IPTAPE

K=K1+1

Kl=Kl+69

IF <IW2-K1-1)

IF (ICP(K1+1)

- IA(47) ) 40,50,40

ICP(J) ,J=K,K1

10,10,30

90,90,100

2) (ICP(j; J=K,IW2) ,IA(39)

IA(47)

105,150,105

110,120,110

ICP(J) ,J=K,K1) ,IA(45) ,IA(39)

90,90,100

- IA(47)

130,151,130

JPRIOOIO

JPR10020

IA, ICOL, ICP, ICT, IC JPR10030

IA ( 80 ) , SWITCH ( 100 ) JPR10040

JPR10050

JPR10060

JPR10070

JPR10080

JPR10090

JPR10100

JPR10110

JPR10120

JPR10130

JPR10140

JPR10150

JPR10160

JPR10170

JPR10180

JPR10190

JPR10200

JPR10210

JPR10220

JPR10230

JPR10240

JPR10250

JPR10260

JPR10270

JPR10280

JPR10290

JPR10300

JPR10310

JPR10320

JPR10330

JPR10340

JPR10350

JPR10360

JPR10370

JPR10380

JPR10390

74-
151 DO 160 I=K,K1

IF (ICP(J) - IA(47)) 170,160,170

160 J=J-1

GO TO 130

170 K1=J

GO TO 105

END

JPR10400

JPR10410

JPR10420

JPR10430

JPR10440

JPR10450

JPR10460

SUBROUTINE PRINT2

COMMON ITAPE , IRTAPE , IOTAPE , IPTAPE

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST , I JUST , IW

DIMENSION ICOL ( 80 ) , ICP ( 360 ), ICT ( 360 ), IC ( 8002

12 FORMAT (1X.119A1)

FORMAT (120A1)

K=l

Kl=117

IF (IW2-K1-1) 10,10,30

10 IF (K-l) 20,14,16

14 WRITE ( IOTAPE, 1) IA(48) , ( ICP( J ) , J=K, IW2)

GO TO 18

16 WRITE ( IOTAPE, 1) ( ICP ( J ) , J=K, IW2)

18 IF (ITEST) 80,20,80

20 RETURN

30 J=K1

DO 40 I=K,K1

IF (ICP(J) - IA(47)) 40,50,40

40 J=J-1

GO TO 60

50 K1=J

60 IF (K-l) 20,64,66

64 WRITE (IOTAPE, 1) IA(48) , ( ICP ( J ) , J=K,K1

GO TO 70

66 WRITE ( IOTAPE, 1) ( ICP( J ) , J=K, Kl

)

70 K=K1+1

K1=K1+117

IF (IW2-K1-1) 16,16,30

80 K=l

Kl=68

IF (IW2-K1-1) 90,90,100

90 IF (K-l) 20,92,94

92 WRITE (IPTAPE, 2) IA(48) , ( ICP( J) , J=K, IW2) , IA(39

GO TO 20

94 WRITE ( IPTAPE , 2 )

( ICP ( J ) , J=K , IW2 ) , IA ( 39

GO TO 20

100 J=K1

IF (ICP(Kl) - IA(47)) 105,150,105

105 DO 110 I=K,K1

IF (ICP(J) - IA(47)) 110,120,110

110 J=J-1

GO TO 130

120 K1=J

130 IF (K-l) 20,132,134

132 WRITE (IPTAPE, 2) IA(48) , ( ICP( J) , J=K,K1 )

, IA(45)

GO TO 140

134 WRITE (IPTAPE, 2) ( ICP ( J ) , J=K, Kl )

, IA(45) , IA(39)

JPR20010

JPR20020

IA, ICOL, ICP, ICT, IC JPR20030

IA (80) .SWITCH (100) JPR20040

JPR20050

JPR20060

JPR20070

JPR20080

JPR20090

JPR20100

JPR20110

JPR20120

JPR20130

JPR20140

JPR20150

JPR20160

JPR20170

JPR20180

JPR20190

JPR20200

JPR20210

JPR20220

JPR20230

JPR20240

JPR20250

JPR20260

JPR20270

JPR20280

JPR20290

JPR20300

JPR20310

JPR20320

JPR20330

JPR20340

JPR20350

JPR20360

JPR20370

JPR20380

JPR20390

JPR20400

JPR20410

JPR20420

JPR20430

JPR20440

IA(39) JPR20450

JPR20460

JPR20470

-75-
140 K=K1+1

Kl=Kl+68

IF (IW2-K1-1) 94,94,100

150 IF (ICP(K1+1) - IA(47)) 130,151,130

151 DO 160 I=K,K1

IF (ICP(J) - IA(47)) 170,160,170

160 J=J-1

GO TO 130

170 K1=J

GO TO 105

END

C

C

10

20

30

40

50

19

29

C

C

SUBROUTINE CHECK3(K)

COMMON ITAPE , IRTAPE , IOTAPE , IPTAPE

COMMON SWITCH , N , Nl , N2 , NOPAR , IW2 , ITEST

DIMENSION IC0L(80)

DO 10 1=1,26

IF (IA(I) - ICOL(I)

CONTINUE

K=l

WRITE (IOTAPE, 19) ( IF (ITEST) 20,50,20

WRITE (IPTAPE, 29) ( IF (IPTAPE - 6)

END FILE IPTAPE

GO TO 50

K=0

RETURN

FORMAT (1X,80A1

FORMAT (80A1)

END

,ICP(360) ,ICT(360;

40,10,40

ia(i) ,1=1, so

IA(I),

50,50,30

1=1, 80

JPR20480

JPR20490

JPR20500

JPR20510

JPR20520

JPR20530

JPR20540

JPR20550

JPR20560

JPR20570

JPR20580

JCHK0010

JCHK0020

, I JUST, IW, IA , ICOL, ICP, ICT, IC JCHK0030

,IC(8002) ,IA(80) .SWITCH(IOO) JCHK0040

JCHK0050

JCHK0060

JCHK0070

JCHK0080

JCHK0090

JCHK0100

JCHK0110

JCHK0120

JCHK0130

JCHK0140

JCHK0150

JCHK0160

JCHK0170

JCHK0180

JCHK0190

-76- 6U. S. GOVERNMENT PRINTING OFFICE : 1969 O - 330-47
NBS TECHNICAL PUBLICATIONS

PERIODICALS

JOURNAL OF RESEARCH reports National

Bureau of Standards research and development in physics, mathematics, chemistry, and engineering.

Comprehensive scientific papers give complete details of the work, including laboratory data, experimental

procedures, and theoretical and mathematical analyses. Illustrated with photographs, drawings, and

charts.

Published in three sections, available separately

• Physics and Chemistry

Papers of interest primarily to scientists working in these fields. This section covers a broad range of physical and chemical research, with major emphasis on standards of physical measurement, fundamental

constants, and properties of matter. Issued six times

a year. Annual subscription: Domestic, $6.00; for- eign, $7.25*. • Mathematical Sciences

Studies and compilations designed mainly for the

mathematician and theoretical physicist. Topics in mathematical statistics, theory of experiment design,

numerical analysis, theoretical physics and chemistry, logical design and programming of computers

and computer systems. Short numerical tables. Issued quarterly. Annual subscription: Domestic,

$2.25; foreign, $2.75*. • Engineering and Instrumentation

Reporting results of interest chiefly to the engineer

and the applied scientist. This section includes many

of the new developments in instrumentation resulting

from the Bureau's work in physical measurement,

data processing, and development of test methods.

It will also cover some of the work in acoustics,

applied mechanics, building research, and cryogenic

engineering. Issued quarterly. Annual subscription:

Domestic, $2.75; foreign, $3.50*.

TECHNICAL NEWS BULLETIN

The best single source of information concerning

the Bureau's research, developmental, cooperative

and publication activities, this monthly publication

is designed for the industry-oriented individual whose

daily work involves intimate contact with science

and technology

for engineers, chemists, physicists, research managers, product-development managers, and

company executives. Annual subscription: Domestic,

$3.00; foreign, $4.00*.

•Difference in price is due to eitra cost of foreign mailing.

N0NPERI0DICALS

Applied Mathematics Series. Mathematical

tables, manuals, and studies. Building Science Series. Research results, test methods, and performance criteria of building materials, components, systems, and structures. Handbooks. Recommended codes of engineering

and industrial practice (including safety codes) developed in cooperation with interested industries,

professional organizations, and regulatory bodies.

Special Publications. Proceedings of NBS conferences, bibliographies, annual reports, wall charts,

pamphlets, etc. Monographs. Major contributions to the technical literature on various subjects related to the Bureau's scientific and technical activities. National Standard Reference Data Series.

NSRDS provides quantitative data on the physical

and chemical properties of materials, compiled from

the world's literature and critically evaluated.

Product Standards. Provide requirements for

sizes, types, quality and methods for testing various

industrial products. These standards are developed

cooperatively with interested Government and in- dustry groups and provide the basis for common

understanding of product characteristics for both

buyers and sellers. Their use is voluntary.

Technical Notes. This series consists of communications and reports (covering both other agency

and NBS-sponsored work) of limited or transitory

interest. Federal Information Processing Standards

Publications. This series is the official publication

within the Federal Government for information on

standards adopted and promulgated under the Public Law 89-306, and Bureau of the Budget Circular

A-86 entitled, Standardization of Data Elements

and Codes in Data Systems.

CLEARINGHOUSE

The Clearinghouse for Federal Scientific and

Technical Information, operated by NBS, supplies

unclassified information related to Governmentgenerated science and technology in defense, space, atomic energy, and other national programs. For

further information on Clearinghouse services, write:

Clearinghouse

U.S. Department of Commerce

Springfield,. Virginia 22151

Order NBS publications from

Superintendent of Documents

Government Printing Office Washington, D.C. 20402
U.S. DEPARTMENT OF COMMERCE

WASHINGTON, D.C. 20230

POSTAGE AND FEES PAID

U.S. DEPARTMENT OF COMMERCE

OFFICIAL BUSINESS