GMINCH ON UNIVAC
SAMPLE PROBLEM ~ INCHES TO MILLIMETERS

ENTER A SINGLE PLUS SIGN, + »
FOR MORE INFORMATION. ELSE, HIT CARRIAGE RETURN.

+
ENTER THE DRAWING IDENTIFICATION AND THE MAXIMUM WIDTH ON THE DRAWING
FOR THE MILLIMETRE-INCH CONVERSION TABLE (IN MILLIMETRES). PUT A COMMA
BETWEEN THE TWO ENTRIES. A PAIR OF COLUMNS IS 53.34 MILLIMETRES WIDE.

TEST DATA FOR GMINCH,200

ENTER THE 1NCH DIMENSIONS ON A LINE WITH COMMAS IN BETWEEN.

THE COMPUTER WILL KEEP ASKING FOR ANOTHER LINE OF INPUT UNTIL YOU
INDICATE THAT YOU HAVE NO MORE INPUT BY ENTERING 0. (ZERO) AS THE
LAST NUMBER. -

SHOW THE DECIMAL POINT EVEN WITH INTEGERS.

BE CAREFUL IF YOU ENTER A DIMENSION LARGER THAN 1000 INCHES

DO NOT ENTER A TOLERANCE SMALLER THAN 0.000 1 INCH

A DIMENSION CANNOT EXCEED 8 000 000 TIMES ITS TOLERANCE »

1000.,100.,100.60,100.00,100.000,10.,10.0,10.00,10.000,10.0000,
Loy b0051000,16000,1-0000,16 5104 ,1006,1000.0,601,.001,.0001,
1.01,1.001,2.002,2.0002,3.003,3.0003,4.4,4.04,4.004,4.0004,0.
DUPLICATE MEASUREMENT(S) REMOVED.

TEST DATA FOR GMINCH

MM CINCH) MM CINCH) MM CINCH)
003 2000 1 203 2001 3 01
256 le 25. 1.0 25.4 1.00
25.40 1.000 25.400 1.000 0 25.43 1.001
25.7 1.01 50.805 2.000 2 50.85 2.002
76.208 3.000 3 16.28 3.003 101.610 4.000 4
101.70 4.004 102.6 4.04 112, 4.4
254. 10. 254. 10.0 254.0 10.00
254.00 10.000 254.000 10.000 G6 2 S40. 100.
2 540. 100.0 2 540.0 100.00 2540.00 100.000
25 400. 1000. 25 400. 1000.0

ENTER THE IDENTIFICATION (COMMA) AND WIDTH FOR ANOTHER TABLE.
TO END PROGRAM, ENTER ANY ALPHABETICAL CHARACTER.

Figure 10

51


o J1dAVS
SAdVHiaE

i
4090 SaaTalinaui
aaguyv
dO adi

T T ie)
YsHLU Wwe oNOTLIGOY
SNWNTOD LNdinod
dU daunliN

Aldvi NOTSUBANOD AYVWOLSND

000°000T *O0nGe
ex0°00T *ThSe
oousooT Ons?
o00°oT Orne
oo00°OoT *hGe
ooo°T neGe
oooo'T Oonse
o0G"T OneGe
ooot* Ong?
ooto* nse?
OToo* szo°
To00° Zour
HONT ww

0 BONVHD TITUXT LYVd
D} TULTXT
BONVHD MaeWIN
Luvd

*s*n = 21uL3%

5


Data Cards

va
(=

Special Identifier Cards

Header Card

FIGURE 6. INPUT CARDS

17


NATIONAL BUREAU OF STANDARDS

‘The National Bureau of Standards’ was established by an act of Congress March 3, 1901.
The Bureau's overall goal is to strengthen and advance the Nation's science and technology
and facilitate their effective application for public benefit. To this end, the Bureau conducts
research and provides: (1) a basis for the Nation’s physical measurement system, (2) scientific
and technological services for industry and government, (3) a technical basis for equity in trade,
and (4) technical services to promote public safety. The Bureau consists of the Institute for
Basic Standards, the Institute for Materials Research, the Institute for Applied Technology,
the Institute for Computer Sciences and Technology, and the Office for Information Programs.

THE INSTITUTE FOR BASIC STANDARDS provides the central basis within the United
States of a complete and consistent system of physical measurement; coordinates that system
with 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 a Center for Radiation Research, an Office of Meas-
urement Services and the following divisions:

Applied Mathematics — Electricity — Mechanics — Heat — Optical Physics — Nuclear

Sciences? — Applied Radiation * —- Quantum Electronics * — Electromagnetics * — Time

and Frequency ® — Laboratory Astrophysics” — Cryogenics’.

THE INSTITUTE FOR MATERIALS RESEARCH conducts materials research leading to
improved methods of measurement, standards, and data on the properties of well-characterized
materials needed by industry, commerce, educational institutions, and Government; provides
advisory and research services to other Government agencies; and develops, produces, and
distributes standard reference materials. The Institute consists. of the Office of Standard
Reference Materials and the following divisions:

Analytical Chemistry — Polymers — Metallurgy — Inorganic Materials — Reactor

Radiation. — Physical Chemistry.

THE INSTITUTE FOR APPLIED TECHNOLOGY provides technical services to promote
the use of available technology and to facilitate technological innovation in industry and
Government; cooperates with public and private organizations Jeading to the development of
technological standards (including mandatory safety standards), codes and methods of test;
and provides technical advice and services to Government agencies upon request. The Institute
consists of a Center for Building Technology and the following divisions and offices:
Engineering and Product Standards — Weights and Measures — Invention and Innova-
tion — Product Evaluation Technology — Electronic Technology — Technical Analysis
— Measurement Engineering — Structures, Materials, and Life Safety‘ — Building
Environment ‘ — Technical Evaluation and Application‘ — Fire Technology.

THE INSTITUTE FOR COMPUTER SCIENCES AND TECHNOLOGY conducts research
and provides technical services designed to aid Government agencies in improving cost effec-
tiveness in the conduct of their programs through the selection, acquisition, and effective
utilization of automatic data processing equipment; and serves as the principal focus within
the executive branch for the development of Federal standards for automatic data processing
equipment, techniques, and computer languages. The Institute consists of the following
divisions:

Computer Services — Systems and Software — Computer Systems Engineering — Informa-

tion Technology.

THE OFFICE FOR INFORMATION PROGRAMS promotes optimum dissemination and
accessibility of scientific information generated within NBS and other agencies of the Federal
Government; promotes the development of the National Standard Reference Data System and
a system of information analysis centers dealing with the broader aspects of the National
Measurement System; provides appropriate services to ensure that the NBS staff has optimum
accessibility to the scientific information of the world. The Office consists of the following
organizational units:

Office of Standard Reference Data — Office of Information Activities — Office of Technical

Publications — Library — Office of International Relations.

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

2 Part of the Center for Radiation Research.

4 Located at Boulder, Colorado 80302.

“Part of the Center for Building Technology.


PART 953144

orm

2.
sor
10.0
1000.0
1100.

100000,
2060
190.0
5.0

10.

1.
17.88
25.55
1040
2060

109.0
19435
135.44
300.0
15.

16.0

UNITS

BAR
MPA
MPA
MPA
MPA

MPA
OES ¢
NEG
DEG ToL.
N

NM
iM
nM
6M
6M

cM
NAM
NZ
cm
nM

BM

CHANGE 1

om

2%
1s
1450,
145090,
1600nn.

erererd
OR.
212.

5901

63.0

UNITS.

PSI
Pst
PST
Pst
PSI

PSI

OFG F
0EG F
DES ToL,
LAF

Lr FT
Lp FT
LR FT
07 INCH
oz INCH

07 INCH
Lo/TNCH
LA/INCH
INCH
INCH

INCH

m

UNITS

KG
nECA NM
MOsWH
Kos
vesu

UNTTS,

INCH
INCH
INCH
MILE,
IN?

Nt
THs
IN?
02 Lio
oT

Yor
yn
yor
oz
02

LA
TCH

BTUs HPD
PounnsuR
PouNn/up


Character ASCIL EBCDIC BCD

(Mixed*) (Hexadecimal) (Octal)
9 39 F9 1
Blank 20 40 20
= 3D 7E 13
+ 2B 4E 60
- 2D 60 40
* 2a 5c 54
/ 2F 61 21
( 28 4D 34
) 29 5D 74
. 2c 6B 33
. 2E 4B 73
$ 24 5B 53

*Left digit is OCTAL, right is HEXADECIMAL.

60


10000
c

10010
10020
10040
10060
10080
10120
10140
10160
10180
10190

10400
10500

10600

an00

10700

a00

DO 12500 NLINE = ie - NLINES

KOUNT = KOUNT + 1

IF (€ NLINE = 2% ) 10500" 10000+ 195n0
CONTINUE

SKIP PAGE AND PRINT HEADING FOR MM TO IN CONVFRSICNS

WRITE (NPe10010) (IDCARO(L)» L=i+i2)
FORMAT ( 6HIPART +8A1°10H CHANGE »4A1)
GO TO ( 10020+ 10060+ 10120» 19160 dr NCOLS1
CONTINUE

WRITE (NP? 10040)

FORMAT ( 1HOr 1 (2HMMe BX e4HINCH? 10X))

GO TO 10190

CONTINUE

WRITE (NP+10080)

FORMAT ( 1HO*e 2 (2HMMe 8Xe4HINCH? 10X) )

6oO TO 19190

CONTINUE

WRITE (NP» 10140)

FORMAT ( 1HOr 3 (QHMM*AX* GHINCHe10X) )

Go TO 10190

CONTINUE

WRITE (NP* 10180)

FORMAT ( 1HOr 4 (2HMM®3X*4HINCH+ 10X))
CONTINUE

CONTINUE

CONTINUE

Do 10600 I = t+ 64

LISTER(I) = IBLANK

CONTINUE

DO 12100 NCOL = 1¢ NCOLS1

K = € NCOL = 12 ) * NLINES + NLINE
IF ( K .GT. NTYPFL ) GO TO 12100
T= KINDX(K)

CLEAR ALL TEMPORARY ARRAYS BEFORE LOANINS WITH CHARACTERS Far

PRINTING

po 10700 J = ir 16
INOUT(J) = KTBL(14)
CONTINUE

TDOIN(1) = 0.0D0
TOIN(2) 0.900

ITDIN., = 0

TOIN(1) DIN(1> I)
TOIN(2) DIN(2s 1)
ITDIN = IDIN(T)

INPUT DIMENSION PREPARATION

VALUE = TDIN(2)
CALL ENCODE ( 15 8+ VALUE. <TTNIN )

a

p>

ao

exe)

35809
359090
6000
m6100
6200
36300
R6400
76459
3640
76509
2660n
6790
ARNN
B7100
37200
27300
37400
a7700
=7anq
37900
zangn
aAzNA
ANON
2A500
B8ANN
xROQ00
sounn
z9500
29600
0790
aann
aan
noone
4wordd
na2on
“ozor
4O40n
soson
4oenn
“o7ae
agRgn
anon
ninan
R1iAN
uienn
azo.
wrann
arson
41690
n1700
4ison
atana
w20nn
nearer


£TMDFRAL INFORMATION PROCESSING STANDARD SOFTWARE SUMMARY

‘01. Summary date] 02. Summary prepared by (Name and Phone) 03. Summary action
¥r._|Mo. |Oay | Ruth K. Anderson, (301) 921-3551 New Replacement Deletion
714 lols {2 Ia} 05. Software tite a a o
08, Sofware dats} General Motors Corporation Inch to Millimetre Previous internal Software 1D
yr. [Mo. | Day Conversion Program
[714 lols 12 In (07. internal Software 1D
06. Short title GMINCH
08. Software type 109. Processing mode 10, Application area
General Specific
Automated Data ‘Computer Systems Management/
‘System interactive: ‘Support/Utility (D] Business
Computer Program Batch Scientific/Engineering  [") Process Control
‘Subroutine/Module o Combination 8 Bibliographic/Textual Other
11. Submitting organization and address 12. Technical contact(s) and phone
anstitute for Computer Sciences and Technology Dr. Joseph 0. Harrison, Jr.
National Bureau of Standards (301) 921-3551
Washington, D.C. 20234

35, Narrative Progeam was developed by General Motors Corporation to convert dimensions in

imches to millimetres. fhe user has the option of requesting instructions from the program
in entering data rrom the terminal. The program is written in 4. portable version of
FORTRAN and is essentially machine-independent. It has been tested on the UNIVAC 1108,

the PDP-10 ana she IBM 370.

14. Keywords
METRIC, INCH CONVERSION

18. Computer manuf'r and model | 16. Computer operating system 17, Programing language(s) 18. Number of source program state-
[American National Stand} ments

See narrative n/a jard FORTRAN X3.9-1966 Approximately 400

19. Computer memory requirements | 20. Tape drives 21, Disk/Drum units 22, Terminals

12,000 words (UNLVAC |1 (or other scratch

4108) external devices) 0 1

23. Other operational requirements

‘24, Software availability [-25. Documentation availability
Availaple Umitet In-house ohly, Available inadequate In-house only
o a 1a) is)

26. FOR SUBMITTING ORGANIZATION USE

385-101 Standard Form 185

3 reer
FIGURE 3 vs. at Gommesce-—NBS.



aa0gnnAA Aa

nmaanaa

100 IF(ISW1.EQ.1) WRITE CIWRITE*S2)

2 CONTINUE
RETURN TO STATEMENT 2 IF THERE IS TO AE MORE THAN CONF TARLE
CALCULATED.

THE VECTOR Li IS TO CONTAIN THE DRAWING INFNTIFTCATTON ann
MAXIMUM TABLE WIDTH WITH A COMMA IN BETWEFN. IN ORDER TO
SEPARATE THE TWOr THE COMMA IS LOCATED (AY 1.41) AFTER THe
TRAILING BLANKS ARE DROPPED OFF.
READ(TREAD?® 3) (Li(T) ss T=1ebTM)
3 FORMAT(136A1)
DO 4 I=1rLM
J=LM1-1
IF (Li (J) sNE.IBLANK)GOTO 5
CONTINUE
CONTINUE
DO 6 Lil=10Jd
IF(LI(L11).EQ.ICOMMA)GOTO 7
6 CONTINUE
STOP
7 CONTINUE
LILSLiiti
CHECK FOR NONNUMERIC CHARACTERS AFTER COMMA
00 70 I=LileJ
IF(L1I(1).GTsININE) GO TO 54
IF(L1I(1).LT»IZERO) GO TO 54
70 CONTINUE
THE MAXIMUM WIDTH OF THE PRINTOUT IN MILLTMETRFES TS IN THE VECTOor
Ll FROM Lii TO J AS HOLLERITH CHARACTERS. To RECOVER. IT
AS A FLOATING POINT NUMBERe IT IS WRITTEN INTO CHANNEL TUMIT prin
READ RACK OUT. EVENTUALLY IT IS CONVERTED INTO TWe THE
NUMBER OF COLUMN PAIRS. EACH COLUMN PAIR REQUTRES 21 SPACES oP
53.34 MILLIMETRES+ AND THERE CAN RE NO MORE THAN 6 PATRS,
1S=20-J
DO 71 TI=LileJ
TJ=IS+II
71 IBUF(TU)=L1(IT)
WRITE (IUNIT*+72) TRUF
72 FORMAT(20A1)
DO 73 II=LileJ
IU=IS+IT
73 IBUF (TJ) =TBLANK
REWIND IUNIT
READ(IUNIT® 76) W
76 FORMAT(F20.0)
REWIND IUNIT
L11=L1i1i-2
I NT (W/53.34)
IW=MAXO (Le TW)
IW=MINO(6-TW)
IF (ISW1.EQ.O) WRITE (IWRITE *8)

oF

8 FORMAT(S4H ENTER THE MILLIMETRE DIMENSIONS ON A LINE WITH COMMAS?

112H IN BETWEEN./42H THF COMPUTER WILL KEEP ASKING FOR ANOTHER,

120


C INCHES MULTIPLIED RY THE PROPER POWFR OF 19 SO THAT AS AN
C INTEGER IT WILL HAVE THE CORRECT NUMUER OF NIGITS. ROUNDING TS
C THEN CARRTED OUT.
R=10.*#N
S=R¥A/25 64
K=INT(S)
T=FLOAT(K)
D=S-T
IF(D.FQ..5)GOTO 1
IF(0.GT..S)T=T+1.
GOTO 2?
1 CONTINUE
K=MO00 (Ke 2)
IF (KsEQe1)T=T+1e
2 CONTINUE
B=T/R
RETURN
END

126


aa00

a900 0

120

130

150

200

300

400

500

2
3

po 120 I = 1+ @

IDOUT(I) = TRLANK
CONTINUE

bdo 130 I = ie son
DIN(1+ I) = 0.009

DIN(2+ I) = 0.000

CONT INUF

NC = CARD READER UNIT NUMRFR
NP = PRINTER UNTT MIMRER
NC=5

NP=6

CONTINUE

READ PART NUMBER+ CHS NUMSER)® AND COUMENTS

READ ( NCr 200 ) TOCARD

FORMAT { 72A1 )

IF ( IDCARD(1) .EG@. ISTOP(1)
eANDe IDCARD(2) FQ. ISTOP(2)

eAND. IDCARD(3) .F% ISTOP(3)
«AND. IDCARD(4) FQ. ISTOP(4) ) Goa TO 1AO0N
NX=0

DO 300 I = le 8

INOUT(I) = IDCARD(T + 19)

IF ( INQUT(T).EQ. KTBL(14)) NX SONY +
CONTINUE

IF ( NX » EQ. 8) IDCARD (23) = KTAL(1)
CALL DECOME { 1+ 98% ADDCHGe J?)
NX=0

DO 400 IY = ts @

INOUT(I) = IDCARD(I + 27)

IF ( INOUT(T).E@. KTAL(14)) NX = NX + 4
CONTINUE

IF ( NX « EQ@ . 8) IDCARD (29) = KTAL(2)
CALL DECOME ( 1 8 VALUFe, J)
NCOLS1 = ININT ( VALUE )

IF ( NCOLS1 .LFe © ) NCOLS1 = 1
IF ( NCOLS1 .GT. 4 ) MCOLSL = 4
NxX=0

DO 5n0 T = te 8

INOUT(I) = IDCARN(I + 36)

IF ( INOUT(I).E@. KTSL(14)) NX = NY + 1
CONTINUE

IF ( NX « E@ . 8) IDCARD (39) = KTAIL(2)
CALL DECODE ( 1+ 8+ VALUFr J)

NCOLS2 = IDINT ( VALUF )

IF ( NCOLS2 .LE. 0 ) NCOLS2 = 1
IF ( NCOLS2 .GT. 2 ) NCOLS2 = 2
NX=0

DO 690 I = ir 8

66

Vinans
11109
lean
11309
11409
11500
16N9
11790
Tiron
119900
t2onn
12190
1220n
12300
12n9n
42500
12600
12700
i2enn
1200n
139000
13190
13200
13z00
13409
13459
13590
13609
13659
13700
13750
13AR00
13R50
13900
14nan
y4nsn
14100
14150
14200
14300
14400
14son
14559
14609
14700
14750
14800
14asn
14900
15090
15100
15200
15259
15300


Item Column No. Description

Identifier 1 10-17 This item must be chosen from the list of
acceptable identifiers and entered exactly
as shown on the list in figure 5 or in the
identifier field of the Special Identifier
Card. The first character of the identi-
fier must be in the first character
position of the field.

Dimension 2 19-26 Same as Dimension 1
Identifier 2 28-35 Same as Identifier 1
Dimension 3 37-44 Same as Dimension 1
Identifier 3 46-53 Same as Identifier 1

Any number of data sets, each containing as many as 500 dimensions, may be proc~
essed as a single run. Data sets must be separated by STOP in an identifier
position. The run is terminated when $EOP is detected in card columns 1 through

4. No more data will be accepted.

If, by mistake, there are more than five hundred dimensions in a set, the five
hundred and first and all subsequent dimensions are printed with appropriate
error messages. The program executes normally with the five hundred accepted

dimensions.

The output’ of this program can be used in one of several ways depending on the
system selected by the user. (1) Used as a separate document or Page 2 of a

drawing. (2) The information could be copied by a desk copier onto an adhesive

24


3.0
4.0
46.0
2.0
20.0
26.0
16.0
7.0
3.05
Geb
3.05
14.0
20.0
8.0
4.0
15.0
12.0
20.0
41.0
580-0
2.46
2.57
3.02
3.07
2.74
54.23
2.77
2.82
2.74
53-82
41.0
38.0
965
73.0
67.0
40.0
32.0
25.0
660
30
19.0
14.0
57.0
45.0
079
5.0

643135

1986431
198.432
198.433
198.6434
1986435
1966436

STOP
NBS.

0.25
0.25

7.0

015

19843.1
19843.2
19843.3
19843.4
19843.5
19843.6

1984.33

1°843.°

764.3 MPA
T6464 nee Cc
764.5 DES TO
764.6 M

95

CAMEL 8

164o0n
1A500N
145109
145200
165300
1465400
1465500
145600
145700
1asegn
145900
1A6Nnnn
146100
146209
166300
1A64On
16650
146609
1A6700
166800
146900
1467000
1A71N0
14720"
LA7R0n
1A74L0N
1467500
167609
LA77ON
167A09
TATONN
deanna
1ABINO
168200
1ARZNN
1agunn
1AREON
1AR6NN
1FA7ON
148R0n
1AAANN
169non
1e910e
14920n
149300
48
LAOS un
1A9RNN
149700
1A9ANN
1a9q0n
1790900
1791AA
L7N200


Sample 2

Input

Qutput

Comments

A combination of millimetre and non-millimetre dimensions.
The number of sets of data per card data varies from one
to three.

No added identifiers

Identification and Errors

Output calls for 4 sets of output data for millimetres and
2 sets of output data for other units.

Errors in both identifier and dimension fields are flagged.

Converted Data in 2 tables. Millimetres to inches and

"Other".

31


GMMETR ON UNIVAG
ILLUSTRATION OF PROGRAMMED DIAGNOSTICS (user)

ENTER A SINGLE PLUS SIGN, +r,
FOR MORE INFORMATION. ELSE, HIT CARRIAGE RETURN. (computer)

(user)

+

ENTER THE DRAWING IDENTIFICATION AND THE MAXIMUM WIDTH ON THE. DRAWING
FOR THE MILLIMETRE-INCH CONVERSION TABLE (IN MILLIMETRES). PUT A COMMA
BETWEEN THE TWO ENTRIES. A PAIR OF COLUMNS IS 53.34 MILLIMETRES WIDE.

DIAGNOSTICS FOR GMMETR,200 (user) (computer)

ENTER THE MILLIMETRE DIMENSIONS ON A LINE WITH COMMAS IN BETWEEN.
THE. COMPUTER WILL KEEP ASKING FOR ANOTHER LINE OF INPUT UNTIL YOU
INDICATE THAT YOU HAVE NO MORE INPUT BY ENTERING 6. (ZERO) AS THE
LAST NUMBER.

SHOW THE DECIMAL POINT EVEN WITH INTEGERS.

BE CAREFUL IF YOU ENTER A DIMENSION LARGER THAN 25 000 MILLIMETRES
DO NOT ENTER A TOLERANCE SMALLER THAN 0.001 MILLIMETRE (computer)
A DIMENSION CANNOT EXCEED 8 000 000 TIMES ITS TOLERANCE.

AcAyBeB, 11510051005 70059 Fe 942 5 + 4,965,25000000.,0. (user)
THERE IS AN ILLEGAL CHARACTER IN THE INPUT LINE. (computer)
ONLY POINTS, SINGLE COMMAS, AND THE TEN DIGITS MAY BE USED.
PLEASE REENTER THE LINE.

Vedslelsbodyie0 160570059 Fe 952 5 «© 4,965,25000000.,0. (user)
THE LINE HAS TWO DECIMAL POINTS WITHOUT A COMMA IN BETWEEN. (computer)
PLEASE REENTER THE LINE.

Lelslelslelyle0,10057- 39 Ge 9525 4,9+,,25000000.,0.

THERE IS AN ILLEGAL CHARACTER IN THE INPUT LINE. fuser) ter)
ONLY POINTS, SINGLE COMMAS, AND THE TEN DIGITS MAY BE USED. puter,
PLEASE REENTER THE LINE.
Lely lolyledyle0,1.0,7+ 99 9. 942 5 4y9+,25000000.000,0. (user)
(computer)
DUPLICATE MEASUREMENT(S) REMOVED.
DIAGNOSTICS FOR GMMETR
MM CINCH) MM CINCH) MM CINCH?
1.0 204 1.1 204 Te 23 (computer )
9. “4 99.9 3.93 254. 10.0
HH RAHA HKHHHRRHE FH
ENTER THE IDENTIFICATION (COMMA) AND WIDTH FOR ANOTHER TABLE.
TO END PROGRAM, ENTER ANY ALPHABETICAL CHARACTER. (computer)

Figure 11

56


be Identification, Error Messages and Table of Conversion Factors
The program prints "METRIC - U.S. CUSTOMARY CONVERSION TABLE" followed by the

fields’of the input header card with appropriate column headings. Default values

are substituted for blank fields on the header card.
Error Messages - This information appears only if there has been an illegal
entry in one or more of the input data items. Error messages are of two types:

"illegal identifier" and "illegal character in dimensions".

Table of Conversion Factors - This table is printed only if special identifiers

have been added for the data set. It is preceded by a count of the number of
units that it currently contains. The count covers 30 of the 31 built-in
conversions (millimetres to inches are not counted) and any special identifiers

in either the current data set or previous data sets for the run.

The table is comprised of the current version of the conversion table with

headings. Special identifiers are labeled as temporary entries.

3. Sample Computations

Eleven sample computations are given in files 3 and 4 of the conversion package
tape. The first three of the samples are reproduced and briefly commented on

here.

27


APPENDIX If

REPRESENTATION OF FORTRAN CHARACTERS
IN ASCII, EBCDIC AND BCD

Character, ASCIL EBCDIC BCD
(Mixed*) (Hexadecimal) (Octal)
A 41 cl 61
B 42 c2 62
c 43 c3 63
D 44 c4 64
E 45 cs 65
F 46 cé 66
G 47 c7 67
H 48 c8 70
Ir 49 co 71
J 4A Dl 41
K 4B D2 42
L 4c D3 43
M 4D D4 44
N 4E D5 45
Oo 4F D6 46
P 50 D7 47
Q 51 Ds 50
R 52 D9 51
s 53 E2 22
T 54 E3 23
U 55 E4 24
v 56 ES 25
W 57 E6 26
x 58 E7 27
x 59 E8 30
Z 5A E9 31
tt) 30 FO 12
1 31 Fl ol
2 32 F2 02
3 33 F3 03
4 34 F4 04
5 35 FS 05
6 37 F6 06
7 37 F7 07
8 38 F8 10

59


1986437
198.438
1986439
198.440
1984.31
1984.32
1984.33
1984.34
1984.35
1984.36
1964.37
1984.38
1984.39
1984.40
7601

76.2

76.3

76.4

76.5

1X1111
+002
2.540
25.400
2540.

2x2222
25.4
25.43
25043

3X3333
25.4
27640
27641233

4x4u4y
2504
28.52
28.53578

SEOP

OL
LITRE
M3

HG
sToP

STOP
Oo
STOP
0
STOP

STOP

19843.7
19843.8
19843.9
19844.0
764.21
764.22
764.23
764.24
764.25
764.26
764.27
764.28
764.29
764.30
764.3
764.4

025
25.40
2504
25400,

27.94%
25.003
25.403

26.84
270411

27.94
28.534

uM
om

KM
mMD

cme

M2

cms

cM3 Le
MPA
DEGC

764.7
764.8
764.9
745.0
Tél
Th?
76.3
76 ot
76.5
76461
764.2
764.5

35.0

7.61

0254
254.
254.0
2541.

25.65
25.0002
25-4003

27.33%
27.4122

28.45
28.5356

96

NG
Koma
B/CM3
Kos
RAR
MRA
nES To

nese

SAMOLE ©

SAMrLe in

SAMOLE 14

SAMY 12

17ARAA
17940"
I7a95Nn
y7nann
17N7Ae
17AAON
1799800
A7Inas
wiio9
171pan
171RRA
1714u0n
a7isoe
1716Nn
171700
171AN0
i7tedn
17anon
172190
172200
172000
172500
172600
17270"
172R00
172900
173N00
L73100
173209
1733097
173400
17350n
t734ANA
L737
173RAN
17300n
174000
174100
17420
174x008
174400
174500


eb Paws
SAaVvest

u
1070 SosTdingui

‘ T e
danlu Wve SNOILIGay
SNWIIT0D LNGLNO
SU Gatiefitt

9ShezT*T séses*¢ee
ShezT*T y9SEeGree

HEeT eT Hes*ee

gered es*ee

O2T°T grease

ooT*T n6°Le

Goort nese

HINT WW

SONVHD thnx Luvd
0 phhtXt

SONVHD Y3aKnNn
Livd

ATVL NOISUBANOD AYVWOLSND *S°N - o1ul3%

ng


OUTPUT - CONVERSION TABLES

PART 983184 CHANGE 01
MM INCH “Mm INCH cc) INCH

+0005 17.50 +689 26055

+002 18.0 2709 241557

00199 19.0 +748 Ht

+0020 19.8, +780

2020 20683 +820

+030 2168 +858

+059 2260 +866

2089 23.35 2919

2184 25017 2991 128.0

+220 27.691 1.0902 405.0

+250 2969 16177 1000.00 394370

+350 30-860 = 1.2150 1100.0 | 43.307

2433 3100 1.220 1200. 47.244

2472 32.0 1.260 1300. 51.181

+516 36.0 16417 14006 55.118

561 38-10 14500 1600+ 62.992

+599 40615 1.581 1700+ 66.929

+630 4O.n8 1.750 1800. 70.866

+669 5060 1.969
PART 953184 CHANGE 01
om UNITS om UNITS DIM UNTTS om UNITS
ae BAR 296 PSI 2. kM 1.2 MILE
OL MPA 1. PSI 500.0 PL. 1090+ oz Lo
2060 DEG C 68. DEG F 4. LITRE 4.2 er
106 N 2625 LaF 1060 6 2353 oz
19435 N/MM 110. LB/INCH 400.0 HG 18106 02
135.44 N/MM 113. LB/INCH 50. KG 1106 Ls

cM 118. INCH 766 METER 299. INCH
DM 787. INCH 760 DECA M 27606 INCH

Sample 3 (Continued)

37


o 9 9 ANANMAAA

100

500
600

700

800

300

1600

nooo

No MORE THAN 3 SIGNIFICANT DIGITS ARE PRINTED OUT

OTM ~ CONVERTED DIMENSION
IPLACE = PRINT OPTION

IMPLICIT INTEGER ( To = N )

COMMON DIN(2* 500)* TOIN(2)

COMMON INOUT(16)

DOUBLE PRECISION DINe TDINe NIM) AROUND

COMMON / DATA / KTRL(42)* MESAG(4O)+ LARFL(5+ 50)¢
1) TABLE(2+ 50)* NLSAVF+ NUMLARe ISTOP(4)+ TRLANK

IF ( DIM .E@. 9.0090) GO TO 1000
CALL SIGNIF (€ DIMr LARGEr NPLACE )
IF ( LARGE ) 300+ 30% 100
CONTINUE

Do 200 UJ = 9 16

INOUT(J) = KTBL(41)

CONTINUE

RETURN

CONTINUE

IF ( NPLACE ) 400+ 500+ 500
CONTINUE

IVAL = ©

Go TO 600

CONTINUE

TVAL) = NPLACE

CONTINUE

NDR = IVAL

IF ( IPLACE ) 7O0M* 900+ 900
CONTINUE

DIM = DROUND (¢ OIMe IVAL )
CONTINUE

CALL ENCODE ( Gr 169 OMe NNR)
RETURN

CONTINUE

NDR = MINO ( NOR*e IPLACE )

IVAL. = NOR

60 TO 700

CONTINUE

NDR = G

6O TO 800

END

SUBROUTINE SIGNIF ( VALUE*® LARGE, TPLACE )

THIS SUBROUTINE DETERMINES THF MUMRER OF STGNTFICANT STGITS
GIVEN A DIMENSION VALUE

79

So

20700
RORON
agagn
a1o0n
e1ing
Ripan
R1300
Algon
Rison
alann
a1700
ALPO
19607
argon
nanko
apis
R2200
PASON
p2uon
R209
PREND
e278
R28nn
e2ann
Rann
aaron
aaonn
23300
a3znan
Aaqon
aren
aa7AN
AZANN
aggnn
agnan
auinan
auren
euzcn
anAnn
ayson
auane
24700
RURNG
euann
Asana
es5ine
a5ore
P5309
Aginn
a5anag
asia
Renan
PHI
nepnn


1.

2.

LIST OF FIGURES

FIPS Software Summary - Caterpillar Tractor Co. Metric
Conversion Program. 2. se ee eee eee ee ene

FIPS Software Summary - General Motors Corporation
Millimetre to Inch Conversion Program ......

FIPS Software Summary - General Motors Corporation

to Millimetre Conversion Program. . car

Built-in METCO Conversion Capability . .
METCO Summary Table ........2.0.
Input Cards 2... ee we eee wees

Card Formats... ee we eee eee

Maximum Permissible Dimensions and Maximum

GMMETR - Sample Problem ........
GMINCH - Sample Problem ........,

Illustration of Diagnostics - GMETR ..

Errors

12
14
17
19
43
48
51

56


FOREWORD

This computer program package is designed to assist manufacturing companies in

converting to the metric system. The starting point of the manufacturing process
is the engineering drawing, and it is at this point that metric conversion should
begin. Accordingly, the package is devoted to the specialized area of converting

between metric and U.S. customary units on engineering drawings.

Were it not for the rounding of converted quantities, the mathematics of conver-
sion would be trivial. Even with rounding, the mathematics is simple. However,
rounding is extremely important, since it affects the tolerances of parts pro-

duced; and the controlling of tolerances is at the heart of the manufacturing

Process,

The computer programs that comprise this package were developed by Caterpillar
Tractor Co, and General Motors Corporation and turned over to the National
Bureau of Standards for distribution for public benefit to anyone who wants
them. It is hoped that by making them available to the public the processes

of metric conversion in all U.S. manufacturing companies will be facilitated.

Ruth M. Davis, Ph.D.
Director, Institute for Computer
Sciences and Technology

on
in


Output

Comments

This sample contains mixed millimetre and non-millimetre
dimensions and various numbers of sets of data per data card
as does sample 2, In addition, it contains two special
identifier cards -- the second and third on the input list.
These cards provide the capability for converting from
metres to inches and from dekametres to inches respectively.
The sample also contains data cards employing each of these

added conversions.

Care must be exercised in reading the special identifier
cards. Specifically, the 1's in the quantities 139.37 and
1393.7 are in card column 27 and are therefore not part of
their respective identifiers since they are not in the
conversion factor field. They represent round technique
codes instead. The last two lines of the output table

of conversion factors clarifies this.

The added identifier cards trigger the printout. of the table

of conversion factors.

34


aNANMAAADAAAAAAADAAAAADAA

a 900

50

60

70

80

90

100

110

IN THE DIMENSTON
IOCARD(72) =72A1L
WORDS. 1- 9. FART NUMBER
WORDS . 10-18 CHANGE NUMRER
WORDS 19-36 TITLE BLOCK TOLEPRANCFS
WORDS 37-45 CONVERSION TO METRIC OR 16S. CUSTOMARY
WORDS 46<72 IDENTIFICATION

IDIN(500)
STORAGE FOR ITDIN ~ UP TO 500 UNIQUE OTMENSTONS

KINDX (500)
ARRAY GIVING THE LOCATION OF THE SORTER DIN ARRAY

LISTER(64) = OUTPUT ARRAY FOR NUMERIC DATA
IDOUT(8) = OUTPUT ARRAY FOR INENTIFTE®S
NLIST = NUMRER OF UNIQUE DIMENSTONS

COMMON / DATA / KTBL(42)+ MESAG(40)+ LAREL( Se SA)
1 TABLE(2+ 50)* NULSAVE+ NUMLAR, ISTOP(4)— TPLANK

ZERO OUT ALL OF COMMON

CONTINUE

INDEXR = 0

nc = 0

NP = 0

NCHEK = 0

NLIST = O

TOIN(1) = 0.000
TOIN(2) 0.0D0

DO 60 ie 500
IOIN(T) 0
KINDX(I) = 0
CONTINUE

DO 70 IT = Ie 16
INOUT(I) = IBLANK
CONTINUE

DO 86 TF = ie 4&
Intl) = IBLANK
CONT INUF

Oo 90 I = i+ 72
IDCARD(I) = IRLANK
CONTINUE

Do 100 I 1s 30
INCARD(I) = IBLANK
CONTINUE

DO 110 I = te 64
LISTER(I) = IBLANK
CONTINUE

65

Sao
S70r
Sagan
590
anne
6100
apoe
4309
6409
6sao
As0n
6700
sran
6°0n
700
7100
7209
7709
Jann
TEON
Ta09
770n
7A09
7aqn
anon
Bien
R209
Bzcn
ayon
8500
2600
R700
BACO
Rann
onan
9100
9209
9300
eunn
asoe
96nn
97"
9800
gon
ingon
10109
10209
10200
1ador
10509
1060"
10700
1OARO00
yo0n0


13500

13490

13500

13600
13890
Cc
Cc
Cc

Cc

13900
1

14000
15090

16000
16001

aaAAMAANAAAADA

TF (€ COM .LT. 9.0N0 ) ATM = ATM + 32.99
IF ( RUUMIT ) 13490, 134005+ 13300

CONT LNUF
RCONST = 0.5N0
IF ( DIM .LT. 0,090) kCOMST = -O.50n
IDIM = DIM / RDUNIT + RCONST
DIM = IDIM
DIM = OTM & ROUNTT
CONTINUE
CALL SETUP ( OIMe TPLACE )
MYLINE = ( NCOL = 4 2) * 16
No 13500 J = er 16
JJ=MYLINE+S A
LISTER ( JJ y = INOUTCU) Cc
CONTINUE.
MYLINE = ( NCOL = 2 2) * 4&
DO 13600 J = te 4
JJEMYLINE+J A
INOUT( JJ » = INC) Cc
CONTINUE
CONTINUE
PRINT OUT ALL TNPUT DATA AND ALI. CONVERTER VALUFS “ETH APPRANP TATE
IDENTIFIERS
IF ( KOUNT « °Q 21.) WRITE ( MP» 12309 1 A
WRITE ( MPre 13900 ) ( LISTER(CH)e J = te 2 Dy

IDOUT(1)»+ IMNOUT(2)+ € LISTER(J)5 J On 14)

IDOUT(3)*+ TOOUT(H)> ( LISTFR(J)) J 17) OH OY

IDOUT(S)+ IDOUT(6)+ ( LISTFR(N® JS = PSe 32 De

IDOUT(7)*+ tTNOUT (A)
FORMAT ( 1H e+ RALe 2Xe 2A4e 3Xe BA1e OXe PAL Cc

6X © RAL+ 2X0 AAs 3X0 AALe PXe PAu ) Cc

IF ( mon € KOUNTe 5 ) «EQ, 0 ) WRETF ( NP» 193nn )
CONTINUE
CONTINUE
6o To sa
WRITE ( NP 16001 ) A
FORMAT ( 10H1L A
STOP A
END.

SUBROUTINE ENCODE (€ Ir Je Re Nim )

THIS SUBROUTINE TAKES 4 REAL NUMERTC WORD AND FXAMINES EACH
CHARACTER. IT THEN TAKES THE RFAL WORD AND BITLOS UP AN
ALPHABETIC CHARACTER ARRAY (A1)

INOUT = ALPHARETIC CHARACTER ARPAY

I ~ BEGINNING WORD IN INOUT ARRAY

J - LAST WORD IN INOUT ARRAY

R - REAL NUMBER

NDR - NUMBER OF PLACES TO THE RIGHT OF THF DECTMAL POTNT

4

53300
53460
53500
53600
S3700
53200
53000
s490n
54100
54200
54300
s4unn
54450
54500
S46nn
5470n
s4nac
B4A5D
5400
s5000
85100
55200
s5300
S540
55450
55590
55600
55700
55800
55900
senon
s610n
56200
56300
5e4an
5650n
56600
56610
56620
56630
56700
57100
57200
57300
S740n
57500
57609
57700
S7a0n
S790n
58000
S8100
58200
5830n


NBS TECHNICAL NOTE 872

U.S. DEPARTMENT OF COMMERCE / National Bureau of Standards

for Metric Conversion: —
_ Reference Manual



METRIC = UsS. CUSTOMARY CONVERSION TARLE

NUMBER OF
PART OUTPUT COLIMNS
NUMBER CHANGE ADDITIONS wx OTHER
9s3184 o1 160 3.0 260
NUMBER OF ENTRIES TN CONVERSION TABLE = 32
IDENTIFIER IDENTIFIER ROUND CONVERSION — POLINTTNG
Iw ouT TECHNIQUE FACTOR UNIT
BAR Pst 9 — 14,50400 1.06000
MRAR PSI -1 01450 +00n00
MPA PSI © 145, 04000 1.00900
DEG C DEG F 0 =1.anac0 1.00000
OFG ToL DEG TOL 0 1.8990n0 1.00900
N LaF sy 22081 #00990
KN Ler -1 — 224.81000 sonnn0
NM Le FT 1 672756 +09000
ou OZ INCH 1 1.39870 s19n00
N/MM LB/INCH “1 5.71910 90900
uM MILS 1 #93937 10900
cw INCH 1 39970 -30n00
oM INCH “1 3.93790 00°09
” FT “1 3.280A0 +09000
kw, MILE 1 62137 +1900
M2 IN2 1 0155 sa9n0n
cma IN? “1 215590 -no000
M2 oe 1 1.19690 10900
cx3 IN3 “1 06102 06900
cu LIe oz Lie = 2G 33R1 299990
OL % LIe 1 3.38100 +19000
LITRE aT r 1.95679 +19900
m3 Yo3 “1 «o9nn0
6 oz “1 orang
HG oz 1 #10000
KG La 1 +10000
MG La 1 09900
kosme oz/yo2 0 s.e0n00
G/EM3 G/CM3 0 1.00000
K6/M3 LB/FT3 “1 206243 se9000
METER INCH 1 30,3706 1000
OECA M INCH 1 303,7900" staann

NIMIRE® OF
anor

IPENTIEIES Lar
P.O 160

were THIS TS A TrunaRspy
ther THIS TS A TrumoRacy

LISTED BELOW ARE THE INPUT MATA CARD(S) WITH SOME TYPE AF FPRON(S).

DIMENSION IDENTIFIER — FRROR TYPE

12.35 GAGE ILLEGAL TOENTIFIFR
75.0 REF TLLEGAL IDENTIFIER

35- Me ILLEGAL TOENTIFIFP

7100.22 TLLEGAL CHARACTER Tt! NIMFWSTON
10. NM TLLEGAL TOFNTIFIER

100

araRys,
SAMPLE >

FRTOV tere
FeTpY. tere.


REWIND IUNIT
DO 247 I=Ni+N2
READ (IUNIT®246) AM(T)
246 FORMAT(F20.0)
247 CONTINUE
IF (AM(N2) .EQ.0.)GOTO 25
IF(N2sE@eNM)GOTO 26
Ni=N2+1
GO BACK TO GET ANOTHER LINE OF DATA.
GOTO 10

25 CONTINUE
THE LAST NUMBER WAS ZFRO SO ALL THE DATA ITS IM ANN REJFCT THE
ZEROr OR
N2=N2-1
26 CONTINUE
NM NUMBERS WERE FED INe THE MAXIMUM,
N1=N24+1

aa ao 0

PUT THE NUMBERS IN ORDER? FIRST BY NUMBER OF NIGITS TO THE RIGHT
OF THE DECIMAL POINTr ND.
DO 28 I=19N1
JI=N1i-1
IF(J1.LT»2) GO TO 28
DO 27 J=2rJd1
K=J=1
IF (ND(K) eLE*ND(J))GOTO 27
A=AM(K)
AM(K)=AM(J)
AM(J)=A
M=ND(K)
ND (K)=ND (J)
ND (J) =M
27 CONTINUE
28. CONTINUE

aan 0

c
€ THEN PUT THEM IN ORDER BY SIZE OF THE MEASUREMENT SO THAT ANY
€ DUPLICATE MEASUREMENTS WILL AE TOGETHER.
00 30 I=1eN1
JI=N1-1
IF(J1eLT.2) GO TO 30
DO 29 J=2rd1
K=J=1
TFCAM(K) sLE6AM(J) GOTO 29
AZAM(K)
AM(K)SAM(U)
AM(J)=A
M=ND(K)
ND(K)=ND(U)
ND(J)=I
29 CONTINUE
30 CONTINUE

Cc
C REJECT ANY DUPLICATE MEASUREMENTS. ISWP IS THF SWITCH THAT TELLS

123


Library of Congress Catalog Card Number: 75-600045

National Bureau of Standards Technical Note-872

Nat. Bur. Stand. (U.S.), Tech, Note 872, 145 pages (July 1975)
CODEN: NBTNAE

US. GOVERNMENT PRINTING OFFICE
WASHINGTON: 1975

For sale by the Superintendent of Documents, U.S. Government Printing Office, Washington, D.C. 20402
(Order by SD Catalog No. C13.46:872). Price $2.10 (Add 25 percent additional for other than U.S. mailing)


PART 953184 CHANGE 01

MM INCH MM INCH MM TMCH

0013 «0005 17.50 +689 52.2 2.955

205 +002 18.0 0799 54.755 01557

0505 00199 19.0 +748 57.0 2.2uu

2051 0020 19.8 780 69.75 P74

5 «020 20.83 «820 81.15 7.198

76 2030 21.8 B58 85.65 3.372

165 059 220 866 123, NeBas

2.25 +089 0919 127.5 4862

4.68 «184 2991 12A.0 5.930

5.6 0220 1.0902 405.0 5.9K

6.35 «250 29.9 1.177 1000.00 ‘RQ,370

8.9 +350 30.860 1.2150 1190.0 43.307

11.00 433, 31.0 1.220 1200. A72ne

12. 0472 32.0 1.260 13¢0. 5i.i9t

13.1 516 3600 1.417 14n0. 55.118

14.25 0561 38.10 1.500 1670. 6? 4999

15.22 599 40015 1.581 1700. 6A .929

16-0 630 46.44 1.750 1800. TO .RAR

17.0 +669 50.0 1.969

PART 953184 CHANGE 01

DIM UNITS DIM UNITS nm UNTTS 2 UNTTS
2. RAR 29 PSI 2. KM 1.7 MILE
01 MPA 1. Ps! 500.0 aL. 1690, OZ LIP
20.0 DEG Cc 6Re OEG F 4e LITRE 46? eT
10. i 2.25 LBF 19.0 6 2353 oz
19,35 N/MM 110. LB/INCH 400.0 HG 1410, 07
135.44 N/MM 7736 LB/INCH SM. KG 119. LS
3000 cM 118. INCH 7.6 METE® 290, INCH
200.0 DM TAT. INCH 7.0 NECA M PTH96 TNCH

101


Duplicate metric identifiers are not recognized by the program. Duplicates are
accepted as input and each occupies a storage position in the identifier table.
Only the first definition of an identifier is ever accessed by the conversion

portion of the program.

The number of special identifier cards should be as specified in the added
identifier field of the header card. If it is not, the following anomalies will

occur,

If the number of special identifier cards in the input deck is less than that
specified by the added identifier field, the data cards which follow are inter-
preted as special identifier cards until the special identifier count agrees with
its specification. The program then executes normally. The dimensions on the
data cards which have been interpreted as special identifier cards will not
appear on the output. This situation can be recognized by noting the appearance
of garbage in the last temporary entry (or entries) of the table of conversion

factors.

If the number of special identifier cards in the input deck exceeds the number

specified, the cards in excess of the specification are interpreted as data cards.

The misinterpreted special identifier cards will each result in an illegal

22


ano

aaann00

1100

2u00

3000

400

5000

6000

7000

1

CONTINUE

READ ( NCe 2060 2 TNCARD

FORMAT € 3 (€ ANLe 1X6 2Abe tx)

bo soon fT = ly a

INOUT(T) = TNCARD(T)

CONTINUE

m1) = TNCARD(9)

Inf2) = IncARD (19)

RETUKM

CONTINUE

po 5000 = ole 8

INOUT(1) THCARD(T + 10)

CONTINUE

m1) =  INCARD(19)

mnf2) = INCARD(20)

RETURN

CONTINUE

po 7900 T = dr 8

INOUT (I) TNCARD(T + 20)

CONTINUE

TO(1) INCARD (29)

In(2) = TNCARD(30)

INDEAR = 0

RETURN

END

NOUBLE PRECISION FUNCTTON OROUND (VALUE.  TeLACE

IMPLICIT INTEGER ( To = WD

DOUBLE PRECISION VAL'IE® FACTORe U'TAY® ALASKAe HAWATT¢
TEXAS

VaLUE = NUMPER TO BE ROUNDED SY CATERPILLAR STANDARNS (4 OR =)

OROUND = ROUNDED NUMBER ( + OR =)

TPLACE = NUMYRER OF PLACES TO THE RIGHT OF THE DECIMAL POTNT IE

POSITIVE’ OR NUMREP YF ZER05 TO THE LEFT OF THE
DECIMAL POINT IF NEGATIVE

FACTOR = DSIGN ( 19.990 ** TPLACFe VALE )

UTAH VALUE & FACTOR

IDAHO IDINT (UTAH

ALASKA IDAHO

HAWAILT = UTAH + 0.590

IOWA IDINT ( HAWATI

TEXAS = Iowa

IF ( DARS ( UTAH = ALASKA = 0.590 ) = M.eonnione » te te 2

DROUND = ( ALASKA + PMOD (€ ALASKAy 2,9mM Y ) SF FRCTOR

RETURN

DROUND = TEXAS / FACTOR

RETURN

END

81

e2nnn
e2inn
92200
9230n
02409
o25on
92609
92709
apRnn
92aqn
o3n00
3199
o32n0
93300
93400
a35an
93600
O370N
o3Aan
93900
aunnn
9810n
o4enn
e43nn
o4guan
a4son
a4enn
eso0r
a5inn
spon
9530n
a5400
95sa0
a5A0n
95700
asean
asanq
9en0n
om19n
6pon
96300
aqune
96500
96600
oAn70N
96309
a6onn
97n0n
e7109
a72nn
97300
a74nn
97500
97609


2 9 A AANMAAAMADAAANDADADAAADNOA

1300

1400

1500

1600

1

IncP =

NTC = NDR +
INOUT(IDCP) = KTBL(13)

IR = AR * 10.900 **
IpcML = 10 ** ( NOL
CONTINUE

IN = IR / INCML

IR IR = IN *~ INC
IF ( N = frocp ) 151
CONTINUE

N = N + 21

CONTINUE

INOUT(N) = KTBL(IN +
N = N + 1

IocML = IDCML / 10
Ie ( IDCML ) 130M¢
CONTINUE

RETURN

£ND

SUBROUTINE DECODE ( I

THIS SUBROUTINE TAKES AN ALPHABETIC APRAY TN (A1)

ITo- 1
NOR + 9
+ NDR =

ML

OOr 1400
1)

1600+ 1390

» Je Re

2190
1)

1590

Nne )

EACH CHARACTER TO DEVELOP A REAL WORD

INOUT
I
J

R
NDR

ALPHABETIC - ARR,

AY

BEGINNING WORD IN INOUT ARRAY
LAST WORD IN INOUT ARRAY

REAL WORD

NUMBER OF DFCIMAL PLACES TO THE RIGHT OF THE NECTMAL

POINT

INOUT+ I AND J ARE INPUT DATA
R AND NOR ARE OUTPUT DATA

IMPLICIT

INTEGER ( I
COMMON DIN(2* 500)+ TD
INOUT(16)

COMMON

QOUBLE PRECISION DIN»+

COMMON / DATA / KTAL

TABLE (2+

IR = 0
NDR =
K = 0
IOCML =
NSW =
SEYEGN
KTBLAL
KTBL12

i)

nine

50)+ NLSAVE?

1
1.000

- NOD
In(2)
TOIN® Re

(42) MESAG(HO)>

NUMLAR?

16

SEYEGI»

ISTOP (tH) >

DCML

LAREL (Se

TRLANK

AND PX AMINES

Soe

A3700
63300
62090
s4anon
AaLON
anann
Aegon
44nd
an5On
BEAN
Au7OR
Ayann
a4gnn
asnng
45190
a5ann
65300
Asuna
65200
65000
4anne
AH1ON
662nn
46300
Ae40n
Aan0O
Caleta
4670n
46800
4690
s7n00
47190
67200
ATION
e740e
A75on
47699
47700
A7AgS
47990
agnon
48100
ARDOR
68300
6BASN
Aaguon
BASON
Aee00
AB7Nn
68A09
Aga00
69000
69100
AI20N


The tape contains 6 files. The first is a description of the contents and logi~
cal organization of the tape. The second contains Caterpillar's METCO program;
the third contains test data for that program; the fourth gives test results

based on this data. The fifth file contains the GMMETR program and the sixth
GMINCH.

Each file except the last is terminated by one tape mark, while the last file is
terminated by two tape marks. Programs and test data are organized in 80-
character card images,blocked 9 card images per physical rane ‘ylock, and test
output is organized into three 132-character print line images per physical

tape block.

A listing of the tape is given in appendix III.

B. DOCUMENTATION .

This report constitutes the documentation portion of the conversion package. The
information was, for the most part, provided by the program developers, Caterpillar
Tractor Co. and General Motors Corporation. In contrast to the Caterpillar program
which operates in batch mode, the General Motors programs are run in an on-line
interactive mode. This difference is reflected in the varying approaches taken

in developing this documentation.

The salient characteristics of each program have been summarized using the recently
developed Federal Information Processing Standard Software Summary (SF185). See
figures 1, 2, ‘and 3. More detailed descriptions of each program, including some

examples and program listings, will follow in the remainder of this report.


The programs are capable of converting an unlimited number of tables, however
each table may contain no more than 1000 measurements. For each table processed,
the user enters drawing identification, format specifications, and the measure-
ments to be converted. Output consists of a pair of values for each input
measurement, i.e., the original input measurement and the equivalent converted
output measurement. The number of pairs of values printed on a line are optional
(up to a maximum of 6) and are indicated to the program in the format specifica-

tions.

GMMETR is capable of converting input dimensions between 25,000 and 0.001 milli-
metres while GMINCH is capable of converting input dimensions between 1000 and
0.0001 inches. GMMETR output in inches contains one more decimal place than
the input millimetre measurement while GMINCH output in millimetres contains

one less decimal place than the input inch measurement. For either program a
measurement may not exceed 8,000,000 times its tolerance. In this context
tolerance means one unit in the least significant decimal place retained.
Because of word length differences among various computers, the user must

exercise caution when exceeding the above limitations.
GMMETR and GMINCH have been tested on the UNIVAC 1108, PDP 10 and IBM 360. For
machines with smaller word lengths the above statements regarding acceptable ranges

of input numbers and accuracies of output results may not apply.

Output is sorted in increasing order of magnitude and duplicates are eliminated.

The programs edit the input and print out various diagnostic messages. All of

46


11.25
22.55
22.0
17.50
50.
10.
57.0
2040
128.0
38.10
32.0
447.22
25.17
21.8
20.83
19.8
16.0
6.35
1.5
276
50.0
17.0
1

196
19.0

983184
METER
DECA M
57.0
506
19.35
30.860
5.6
200.0
300-0
400.0
500-0
135.44
14.25
7.0
1.5
11.00
12.35
75.0
20.0
10.0
0.01
12

12.
012
00123
2025
13.1

KM
KM

DEEP 12.25

0.013

DM
cM
HG
OL
N/MM

DECA m 7.6
GAGE

REF 1000.00
DEG C

6
MPA

4.68
15-22

-12.00+

METER

2.0
Oot
Ol

1100.0

8.9
23.35

88

SAMOLE 3

127109
197200
197309
1°7400
1P7ENn
1p7ann
197790
1279Nn
127ann
1paqnn
198100
1?ReN0n
12RzON
1284uN9
129488on
vasenn
L?RTAN
12ARRAA
1pRaan
129000
129100
1992n0
199400
19408
1298—0
129690
1a7HA
129800
129900
129009
130400
13n20n
LaN3AA
1z0un9
130599
1046800
130700
1R0RAN
130900
1t9n9
1311908
131209
131300
Uz140n
TR1L5N0
131690
131700
1ziaan
ra1d90"0
1R2qnn
1a2t00
122200
132300
172409


an0

ane

INOUT(I)

= IDCARD(I + 45)

IF ( INOUT(T).EQ@. KTRL(14)) NX = NY +01
600 CONTINUE
IF ( NX « EQ@ « 8) IDCARD (50) = KTRL‘1)
CALL DECODE ( 1+ Ae VALUFe, J )
NUMID = IDINT ( VALUE )
po 700 I = 1+ 8
INOUT(I) = IDCARD(I + 54)
700 CONTINUE
CALL DECODE ( tr 8+ PLOTr J )
PRINT OUT PART NUMBER CARD
WRITE ( NP»e 900 ) INCARD
900 FORMAT (  1His
1) 45H METRIC = U.S. CUSTOMARY CONVERSTON TABLF / J
2 53H MUMRER OF
3 52H NUMBER OF
4 53H PART OUTPUT COLUM
5 52HNS ADDED
6 53H NUMBER CHANGE ADDITIONS Mi
7 5S2HOTHER IDENTIFIERS PLOT OFMAPKS
8 1H+ 8 ( QALle 4X 2 FD
READ IN ADDITIONAL INENTIFIERS AND CONVERSION FACTORS
IF ( NUMID .EQ@. 90 ) GO TO 2100
ITEMP1 = LABEL(1* NUMLAR)
ITEMP2 LAREL (2+ NUMLAR)
ITEMP3 LABEL (3+ NUMLAR)
ITEMPY LABEL (4+ NUMLAB)
ITEMPS LABEL(S+ NUMLAA)
ATEMP1 TABLE (1+ NUMLAR)
ATEMP2 = TASBLE(2* NUMLAR)
90 1300 J = ie NUMTD
IF (NUMLABeLE«49) GO TO 1000
READ (NC*1200) (LISTER(I) eI=1020)
WRITE (NP*1210) (LISTER(I) 6 1=1120)
1200 FORMAT (20A4)
1210 FORMAT (20H EXCESS IDENTIFIER +¢29A4)
GO TO 1300
1000 READ ( NCe 1100 ) ( LABEL(I+ NUMLAS) > de 5
1 = TABLE(1» NUMLAB)+ TABLE (2+ NUMLAR)
1100 FORMAT ( 2A4%5 1X5 2A4e 1Xe TO, AFO.9 )
NUMLAB = WUMLAB + 1
1300 CONTINUE
LABEL (1* NUMLAB) ITEMPL
LABEL (2* NUMLAB) ITEMP2?
LABEL (3+ NUMLAR) ITEMPS
LABEL (4+ NUMLAR) Tr MP4
LABEL(5» NUMLAR) TTEMPS
TABLE(1* NUMLAB) = ATEMPL
TABLE(2+ NUMLAB) = ATEMP2
NX = NUM) AB= 2

67

Nene

O>Prre>

15u9n
15459
15509
15559
15A0n
15700
15a90
15000
1600n
16100
16200
16300
156400
1650n
1648n%
16799
16RAN
16009
17000
17100
17209
17300
v7Ha9
V7507
17600
17700
17A04
17000
1ano7
rardge
1820n
VARRO0
+ayan
vagan
1REAR
184619
1REDN
146350
TRE4N
TRESN
TREE
19709
yagnn
13009
1900n
19100
19900
razon
19ugn
19RAN
19400
19709
19800
19819


Sample 1

Input

Output

Qutput

Comments

Non-millimetre dimensions only. One set of data per

data card. No added identifiers.

Identification and Errors
Illegal identifier "GRAM" was used. Should have been

"G", See figure 5.

Conversion Table

One 4-column array called for. Dimensions associated

with the illegal identifier were not converted.

28


(c) If the number of decimal places is specified (round technique codes
1-5), the result of operation (b) is rounded again. The same procedure

that is used for rounding from millimetres to inches is again employed.

Undesireable interaction among the several serial rounding operations may be
avoided by applying the restrictions specified under the rounding unit item in
the table in section III Dlb. The subsequent discussion assumes that they have

been applied.

40


205

1.65

35.
-100.22+
37.09
100.0
160.0

MIN
1E52€
ML

BSC
DEGREE C
ML

TLLEGAL
TLLEGAL
ILLEGAL
TLLEGAL,
ILLEGAL
TLLEGAL
ILLEGAL

109

IDENTIFIFR
IDENTIFIER
TOENTIFIFP
CHARACTER IN NIMPNGICS
TOFNTIFIFR
IDENTIFIER
IDFNTTFIFR


Iv GMMETR AND GMINCH PROGRAMS

A. ABSTRACT

GMMETR and GMINCH are metric conversion programs developed by the General Motors
Corporation. GMMETR converts input dimensions in millimetres to equivalent output
dimensions in inches while GMINCH performs the reverse conversion. The programs
operate in -r on-line, interactive mode. They give the user the option of
selecting prompting assistance from the program while entering information at

the terminal,

B. BACKGROUND INFORMATION

This pair of programs was developed by the General Motors Corporation for com-
puting a conversion table going from millimetres to inches to attach to a metric
drawing and a table going from inches to millimetres to attach a customary draw-
ing. The programs have been made available to General Motors Corporation design

engineers through 400 remote terminals.

Cc. PROBLEM DEFINITION

The General Motors Corporation conversion programs GMMETR and GMINCH are essen-
tially identical in structure and in logic even though they convert in opposite
directions. The remainder of this documentation will address both programs
collectively or GMMETR specifically. GMINCH will be referred to only when it

differs from GMMETR.

45


IF(L(T) LT*IZEROVGOTO 20
IF(L(T) eGTeINTNE) GOTO 70
Iswc=o
GOTO 22

16 CONTINUE
IF CISWP.EQ.1)G0TO 17

ISWP=1
TSwC=0
GOTO 22
17 CONTINUE
WRITE (IWRITE® 18)
16 FORMAT(S1H THE LINE HAS TWO DECIMAL POINTS WITHOUT A COMMA THe
19H BETWEEN./25H PLFASE REFNTER THF LINE ./
GOTO Lo
19 CONTINUE
IFCISWC.E9%.1) GO TO 20
NEN+L
NO(N)S1=NP=1
IF CISWP.EQ.O)ND(ND=0
TSW
IswP=0
GOTO 22
20. CONTINUF.
WRITE (IWRITE® 21)
21 FORMAT(49H THERE IS AN ILLEGAL CHARACTER TN THF INPUT LINT./
161H ONLY POINTS» SINGLE COMMAS» AND THE TFN MIGITS MAY aE USEA/
125H PLEASE REFNTFR THF LINE./)
GOTO 10
22 CONTINUE
N2=N+1
ND (N2)=J=NP.
IF CISWP.EQ.0)NND(N2)=0
TF (N2 6GTeNM+1) WRITE (IWR ITE ® 23) NMP NM,
23 FORMAT(SH ONLY*I5*¢24H NUMBERS C4N 8 FNTEPED./
15H ONLY THE FIRST+15°22H ARE RFING PROCESSSEN,)
N2=M1NO(N2°NM)

Cc
C wRITE THE DATA AS HOLLERITH CHARACTERS ON CHANNEL IUNTT ANN READ TT
C RACK FREE-FIELD FORMAT (AS NON@INTEGER NUMBERS) «
K1=1
JPLSU+1
REWIND IUNIT
DO 245 K=1°JUP1
IF (KeLT+UPL «AND. L(K) oNFeICOMMA) GO TO 245
K2=K=1
IS=21-K
DO 241 TI=Kirk2
TU=IS+IT
241 IBUF(TU)=L(IT)
WRITE (IUNIT+3) IRUF
DO 243 TI=Kiek2
IJ=IS+IT
243 TRUF (IJ)=IRLANK

130


a. Millimetres to Inches

Although the input card format for millimetre dimensions permits eight characters,
the largest unsigned number that can be processed is controlled by the print
format of the inch equivalent output - decimal point and a maximum of seven
numeric characters, at least three of which must lie to the right of the decimal
point. The largest unsigned dimension that can be handled, therefore, is
9999.999 inches or, conservatively, 250 000 millimetres. For all input values

no larger than 250 000 millimetres, the inch equivalent will be printed with an
error no larger than one half unit in the last place retained. Since at least
three decimal places are retained in all circumstances, the error is always less

than or equal to 5 ten-thousandths of an inch.

The program also accepts signed millimetre dimensions. The purpose of this is to
permit the entering of positive and negative tolerances. The output print format
for a signed dimension is sign, decimal point and six digits, at least three of
which must lie to the right of the decimal point. The largest signed,dimension
that can be handled is therefore +999.999 inches or, conservatively, 25,000

millimetres. The maximum error is the same as in the unsigned case.

b. Other Built-in Conversions
Conversions of units other than millimetres (figure 5) use the same input card
format and output print format as do millimetre conversions — eight characters in
each case. The maximum unsigned dimension that can be processed is limited by
either the input or the output format depending upon the magnitude of the conver—

sion factor. Dimensions with conversion factors equal to or less than one-tenth

4.


anann

8900

9000
9100
9200

on00

9500

aao

9600

9700

9800

9900

aaananNA

GO TO 3700

BEGIN EDIT OF DATA
THROW OUT DATA WHEN SAME PREVIOUS DATA HAS ALTFADY BEEN
ENCOUNTERED

CONTINUE

Lo=N- 2

DO 9200 IT = iy L

DO 9900 J = Ie 2

IF ( TDOIN(J) = DIN(Je I) ) 92007 9nnde 9200
CONTINUE

IF ( ITDIN = IDIN(T) ) 9200+ 9109+ 9270
CONTINUE

GO 1T9 3700

CONTINUE

Go TO 8700

BEGIN SORT OF DATA
NUMBER KINDX ARRAY FROM 1 TO 500

CONTINUE
NLIST = N = 1

NLIST = THE NUMRER OF OUTPUT ITEMS

Ir ( NLIST .LE. 0 ) GO TO 50
Do 9600 I = 1+ 500

KINDX(I) = I

CONTINUE

CALL DASORT

OOo 9700 K = 1+ NLIST

I = KINDX(K)

TYPE = DIN(1e I)

IF ( TYPE .GT. 1.090 ) GO TO AnH
CONTINUE
NTYPE1 = NLIST
NTYPE2 = 0

6O To 9900
CONTINUE

NTYPR1 = K
NTYPE2 = Ni
CONTINUE

1
LIST - NTYPEL

BEGIN PRINT OUT 9F INPUT DATA AND ANSWERS

BEGIN TYPE 1 PRINT OUTS (MILLIMETRE TO INCH CONVERSTON)
CONVERT FROM METRIC TO ENGLISH UNTTS

CON = 1.000 / 25.4n0

IF ( NTYPEL »LE. 0 ) GO TO 12690

NLINES = ( NTYPE2 + NCOLS1 = 1 ) / NCOLSI
Kolni = 0

70

znuan
zo5o0
9600
9700
znann
s9ann
Binan
Rian
steno
R1309
1400
1500
=1ANA
z1700
31Aa00
=19N0
32n0n
22100
xPpce
xpann
Reu0n
32500
22600
22700
22R00
x2000
7 30n0
TMRLON
33200
33300
a34u0n
23500
33600
3370Nn
a3ann
33000
a4oon
4100
34200
34300
344uon
a4500
24600
34700
a4Ann
z4ann
asnon
35100
5200
35300
a540n
5500
35600
"5700


a anNNAAMADO

a an0

100

200

300
400

500

600
70c
800
3900

VALUE
LARGE
IPLACE

IMPLICIT

= CONVER

INTEGER

TED NIMENSTON

( T= ND

CHECK FOR TOO LARGE A NUMBCR To PRINT ONT
- NUMBER OF PLACES FOR ROUND OFF SUBPONTINE

DOUBLE PRECISION VALUFe VAL+ FACTOR»

IPLACE = 0

LARGE = 91

VAL = DABS ( VALUF )

NL = 8

FACTOR = 10000000.000

CONTINUE

IF ( VAL = FACTOR ) 200+ 200+ 30°

CONTINUE

FACTOR = FACTOR / 10.000

NL = NL = 1

6o TO 100

CONTINUE

IF ( VALUE ) 400+ 9007" 700

CONTINUE

IF ( NL = 6 ) 60% 900% 590

CONTINUE

LARGE = 1

RETURN

CONTINUE

IF ( NL + 5S ) S5fM05 900% 9nn

CONTINUE

IF ( NL = 7 ) 800% 900+ 590

CONTINUE

IF ( NL + 6 ) 5fMOr 900+ 990
CONTINUE

IPLACE = -1 * ( ML = 3 )

VALUE = DROUND ( VALUE+ IPLACF )

RETURN

END

SUBROUTINE READER

IMPLICIT INTEGER ( IT = N )

COMMQN OIN(2+ 500)* TNIN(2)

COMMON INOUT(16)*5 INCARD(30)% INNEYR»
1 IDCARD(72)* LISTER(64)9 TNOlT(A)s
2 IDIN(500)

DOUBLE PRECISTOM OINe TDIN

INDEXR = INDEXR + 1

GO Tn, ( 1000+ 4000+ 6000 d+ INNEXR

80

KINNX(S00)¢

aAz0n
Penn
PARI
R6AND
ABTNA
PHANN
e6ann
a7nnn
ATICS
RT200
azz
e7une
a7s0e
P7Ann
97700
a7A0N
27900
aanga
RAION
OR2ON
ARAN
eanan
aason
RBANN
aR7Or
Pann
aaann
eange
agian
Agen
Aazgr
quan
Aa5oA
na69n
POTAN
agnun
agann
aonne
oo1nn
on209
°0n0n
on7on
a0aan
e0ann
o1nan
e1idg
alana
1300
ajaan
e1s09
916Qn
91700
aiaon
919900


953184 01 160 3.0 200 1.0 SAMPLE 3 129709
METER INCH 130,37 Met 129A00
DECA M INCH 1393.7 Qs 129900
57.0 130009
566, 130109
19.35 N/MM 130200
30.360 0.013 130300
5.6 130400
20U.0 DM 130509
300.0 cM 130600
40060 HG y 130700
500-0 DL isnaon
135.44 N/MM 130900
14.25 5 131000
740 DECAM 766 METER 131100
165 131200
11.00 131300
12.35 GAGE 131400
75.0 REF 1970.00 1190.0 131500
20.0 DES C 131609
1060 6 131700
MPA 131800
131900
132000
132100
132200
Ad ( 132300
PASS 132400
31.0 32500
44a 132600
69475 132700
40569 132800
132909
1409. 133000
1800. 133100
133200
133300
ks 133400
N 133500
ML. 133600
a LITRE 133700
100.224 133800
2. BAR 133900
10. nM 13400n
2 km, 134100
50.0 134200
128.0 134300
38.10 134400
3240 134500
25.17 134600
2168 134700
20.83 134800
1968 134900
16.9 135000
6035 135100
135200
135309
17.0 065, 135400
18.0 0.05 135500
19.0 06051 135600
19.0 0.0505 135700
STOP 135800

Sample 3

35


oo An a

aan00

124H LINE OF IMPUT UNTIL. YOU/31H INMICATE THAT YOU MAVE MO Mare,
135H INPUT BY ENTERING 0. (ZERO) AS THE/134 LAST NUMBED/
143H SHOW THE DECIMAL POINT EVEN WITH TNTESFRS./
157H BE CAREFUL IF YOU FNTER A DIMENSION LagGER THAN 925 gon
112H MILLIMETRES/
158H 00 NOT ENTER A TOLERANCF SMALLER THAN 0.901 MILLIMETPE /
1594 A DIMFNSION CANNOT FXCEED & 090 900 TIMFS ITS TOLFRANCE./)
IF (ISW1.EQ.1) WRITE (IWRITE 9)
9 FORMAT(S3H ENTER THE MTLLIMETRE DIMENSIONS? INDICATING LAST ONE
114H RY 0. (ZERO)./)
Ni=1

10 CONTINUE
PETURN TO STATEMENT 19 IF MORE THAN ONE LINE TS NFENED FO? THr
INPUT DATA FOR ONE TARSLE.
READ(TREAD®3) (LCI) + I=19LTM)
READ THE INPUT DATA AS HOLLFERITH CHARACTERS AN THEN PCUECT
TRAILING BLANKS.
121 90 11 I=1eLM
J=LM1<1
IF(L (J) «NESIBLANK)GOTO 12
11 CONTINUE
12 CONTINUE

REJECT A TERMINAL COMMA,
M=0
TF(L (J) @ NE ICOMMAYGOTO 13
L(J)=TBLANK
J=Je1
IF(J.6T.1) GO TO 121
ELIMINATE LEADING COMMAS
INSPECT THE INPUT FOR ILLEGAL CHARACTFRS+ IM-ENDED RLAMKS (REGECT
THEM) + CONSECUTIVE DECIMAL POTNTS WITHOUT A COMMA RETWEEDM,
AWD CONSECUTIVE COMMAS WITHOUT NUMERICAL CHARACTE?S BETWEEN,
FINALLY? COUNT THE NUMRER OF DIGITS AFTER THE DECTMAL POTNT,
13 CONTINUE
M=M+1
IF (M.G6T.U)GOTN 15
IF (L(M) JE TBLANK «AND .L (1) «NE /TCOMMA) GOTO 13
JeJ=1
Do 14 K=MeJd
L(K)EL(K41)
14 CONTINUF
M=M=1
GOTO 13
15 CONTINUE
Iswe=1
ISwP=0
WE=NL=1
90 22 [=19J5
TF(L(1) .E9.IPOINT)GOTO Le
IF(L(1) .EQ@.ICOMMA)GOTO 19
IF(L(T) .LT«IZERO)GOTO 20
IF(L(1) .GTsININE) GOTO 20

121


PART 686878

DIM

in.5
125
0

5.0
100.0

55.55
1000.00
10.50
10.00
100.6

10000.
100.0
120.
100.0
545.0

256
100.
100.
1006
10.05

10.005
10s
5.0
1000.0
17.5

Se
5

1.0
17.
256

CHANGE 0
UNITS DIM
BAR 152.
MPA 1a.
DEG C 326
DEG TOL oo
N 22.5
N/MM 3i7e
UM 3964
cM 4.13
DM 39.4
KM 6261
MM2 15.5
cma 15.5
M2 144,
cM3 6.10
cmM3 LIQ 18.4
OL 84.5
LITRE 106.
M3 131.
6 3.53
HG 3565,
KG 2261
KG/M2 295.
G/CM3 Se
KG/M3 6204
MJ/KWH 12400.
MJ/KWH 53000.
KG/H 1,990
KG/H 2.25
KG/H 37.5
KG/H 55.0

105

UNITS

PSI

PSI

DEG F
DEG TOL
LAF

LB/INCH
MILS
INCH
INCH
MILE

IN2
In2
YD2
INS
oz LIa

oz LI9
QT
YD3
oz
02

LA
O2/YD?
G/CM3
LB/FT3
BTU/HPHR

BTU/HPHR
POUND/HR
POUND /HR-
POUND/H
POUND/H®


PART 6J3135

Ota

7.61

Jo4el
764.2
764.3
Thee

TH4.S
764.6
764.7
74.8
T6469

765.0
764.21
TH4 022
764.423
764.24

764025
T6426
764.27
To4e2R
764.29

764.30
Tool
7602
76.3
7604

76.5
Tool
TH02
7603
TE

7605

UNITS

BAR
BAR
MBAR
MPN
NEG C

DEG TOL
N
¥N
NM
GM

N/MM
UM
cM
OM

”

KM
v2
cM2
v2
CMS

cmM3 LI@
aL
LITRE
“3

6

HG
KG
MG
KG/M2
6/CM3

KG/M3

14

CHANGE NAS

oTTM

119,
11100.
1tet
111000.
1410.

1380.
172.
1720009.
564.
1n60.

437n.
3Me1
301.6
310.
2519.

4756
1.18
118.
914.
4606

25-8
2576
80.5
9968
2.69

270.
168.
16800,
2250.
76.

4.78

UNITS

PST
PSI
PSI
PSI
DEG F

DEG TOL
LAF

LAF

L8 FT
oz INCH

LA/TNCH
MILS
INCH
INCH

FT

MILE
In2
IN2
yn2
IN3

02 LI9
oz LIA
QT
YO3
Oz

07

Ls

LB
Oz/YD?
G/CM3,

LB/FT3


aaNAAANAAODAAA

anaaaAAADAOA

aa00

an0

PROGRAM GMMETR CONVERTS FROM MILLIMFTRES TO INCHES = JUNE 1974
ROBERT DAVIES

ROOM 1-14 R.AeBe

EXTENSION 5-2745

GM RESEARCH LABORATORIES

GM TECHNICAL CENTER

WARREN? MICHIGAN 48090

DIMENSION AM(1000) ¢L (130) 6L1(80) 6LL(194) 2D (1000) etISCIINOAD
DIMENSION ISUF(20)
THE TWO PREVIOUS LINES CONTAIN ALL REFFRENCES TO APRAY SI7FS
EXCEPT FOR SOME FORMAT STATEMENTS AFTFR STATEMENT 36,

AM = THE METRIC MEASUREMENT IN MILLIMETRES

L = THE INPUT DATAr HOLLFRITH

LL = THE OUTPUT NATAr HOLLERITH

Nn = THE NUMBER OF DIGITS TO THE RIGHT OF THE DECIMAL POINT
IN THE US CUSTOMARY OUTPUT

USC= THE US CUSTOMARY MEASUREMENT IN INCHES

DATA LMrNHeNM/7z 61991 000/

DATA IBUF(1)+ IBUF(2)* IRUF(3)* TBUF(4)» IBUF(5) +
IBUF(6)+ IBUF(7)* IBUF(8)>+ IBUF(9)* TBUF(10)+
IBUF (11) p IBUF (12) ep IRUF (13) 6 TRUF (14) p TRUF (15) >
IRBUF (16) ¢ IBUF (17) 6 [BUF (18) + IBUF (19) » TRUE (20)
71H oLH ¢1H oLH LH o1H 61H ep tH 01H eLH »

1H 91H 61H o1H e1H 01H 61H eAH 61H 61H /

DATA IBLANKe IPLUS+ ICOMMAr IPOINTr I7EROr ININE/S

L1H 914+ LHe oe 1H. LHO* HOS

DATA IREAD+IWRITE+ TUNIT/5 Srl /

Pepe

THE ABOVE DATA STATEMENT SETS THE INPUT UNIT NUMRFR» THE OUTPLIT
UNIT NUMBER AND THE SCRATCH UNIT NUMBER,

LMi=umM4+1

Iswi=t
ISW1 IS A SWITCH THAT IS USED TO SUPPRESS PRINTING OUT CERTAITM
INSTRUCTIONS UNLESS ASKED FOR THE FIRST TIME THROUGH.

WRITE (IWRITE*97)
97. FORMAT(30H ENTER A SINGLE PLUS SIGN+ + »/9H FOR MORES

140H INFORMATION. ELSEr HIT CARRIAGE RETURN./)

READ(IREAD® 3)1

IF (I«EQ.IPLUS) ISwi=0

IF CISW1.EQeO) WRITE CIWRITE SL)
1 FORMAT(49H ENTER THE DRAWING IDENTIFICATION ANN THE MAYTMUM,
121H WIDTH ON THE DRAWING/24H FOR THE MILLTMETPE=INCHe

148H CONVERSION TABLE (IN MILLIMETRES). . PIT A COMMA/BH RETWEEM,
157H THE TWO ENTRIFS. & PAIR OF COLUMNS [5 53.34 MTILLIMETRFS>
16H WIDE./)

ng


Computer Program Package
for Metric Conversion:
Reference Manual

Ruth K. Anderson and
Joseph O. Harrison, Jr.

Institute for Computer Sciences and Technology
National Bureau of Standards
Washington, D.C. 20234

U.S. DEPARTMENT OF COMMERCE, Rogers C. B. Morton, Secretary
NATIONAL BUREAU OF STANDARDS, Richard W. Roberts, Director

Issued July 1975


NBS TECHNICAL PUBLICATIONS

PERIODICALS

JOURNAL OF RESEARCH reports National Bureau
of Standards research and development in physics,
mathematics, and chemistry. It is published in two sec-
tions, available separately:

© Physics and Chemistry (Section A)

Papers of interest primarily to scientists working in
these fields. This section covers a broad range of physi-
cal and chemical research, with major emphasis on
standards of physical measurement, fundamental con-
stants, and properties of matter. Issued six times a
year. Annual subscription: Domestic, $17.00; Foreign,
$21.25,

© Mathematical Sciences (Section B)

Studies and compilations designed mainly for the math-
ematician and theoretical physicist. Topics in mathe-
matical statistics, theory of experiment design, numeri-
cal analysis, theoretical physics and chemistry, logical
design and programming of computers and computer
systems. Short numerical tables. Issued quarterly. An-
nual subscription: Domestic, $9.00; Foreign, $11.25.

DIMENSIONS/NBS (formerly Technical News Bul-
letin)—This monthly magazine is published to inform
scientists, engineers, businessmen, industry, teachers,
students, and consumers of the latest advances in
science and technology, with primary emphasis on the
work at NBS. The magazine highlights and reviews such
issues as energy research, fire protection, building tech-
nology, metric conversion, pollution abatement, health
and safety, and consumer product performance. In addi-
tion, it reports the results of Bureau programs in
measurement standards and techniques, properties of
matter and materials, engineering standards and serv-
ices, instrumentation, and automatic data processing.

Annual subscription: Domestic, $9.45; Foreign, $11.85.

NONPERIODICALS

Monographs—Major contributions to the technical liter-
ature on various subjects related to the Bureau's scien-
tific and technical activities.

Handbooks—Recommended codes of engineering and
industrial practice (including safety codes) developed
in cooperation with interested industries, professional
organizations, and regulatory bodies.

Special Publications—Include proceedings of confer-
ences sponsored by NBS, NBS annual reports, and other
special publications appropriate to this grouping such
as wall charts, pocket cards, and bibliographies.

Applied Mathematics Series—Mathematical tables,
manuals, and studies of special interest to physicists,
engineers, chemists, biologists, mathematicians, com-
puter programmers, and others engaged in scientific
and technical work,

National Standard Reference Data Series-—-Provides
quantitative data on the physical and chemical proper-
ties of materials, compiled from the world’s literature
and critically evaluated. Developed under a world-wide

program coordinated by NBS. Program under authority
of National Standard Data Act (Public Law 90-396).

NOTE: At present the principal publication outlet for
these data is the Journal of Physical and Chemical
Reference Data (JPCRD) published quarterly for NBS
by the American Chemical Society (ACS) and the Amer-
ican Institute of Physics (AIP). Subscriptions, reprints,
and supplements available from ACS, 1155 Sixteenth
St. N. W., Wash. D. C. 20056.

Building Science Series-—Disseminates technical infor-
mation developed at the Bureau on building materials,
components, systems, and whole structures. The series
presents research results, test methods, and perform-
ance criteria related to the structural and environmen-
tal functions and the durability and safety character-
istics of building elements and systems.

Technical Notes—Studies or reports which are complete
in themselves but restrictive in their treatment of a
subject. Analogous to monographs but not so compre-
hensive in scope or definitive in treatment of the sub-
ject area. Often serve as a vehicle for final reports of
work performed at NBS under the sponsorship of other
government agencies.

Voluntary Product Standards—Developed under pro-
cedures published by the Department of Commerce in
Part 10, Title 15, of the Code of Federal Regulations.
The purpose of the standards is to establish nationally
recognized requirements for products, and to provide
all concerned interests with a basis for common under-
standing of the characteristics of the products. NBS
administers this program as a supplement to the activi-
ties of the private sector standardizing organizations.

Federal Information Processing Standards Publications
(FIPS PUBS)—Publications in this series collectively
constitute the Federal Information Processing Stand-
ards Register. Register serves as the official source of
information in the Federal Government regarding stand-
ards issued by NBS pursuant to the Federal Property
and Administrative Services Act of 1949 as amended,
Public Law 89-306 (79 Stat. 1127), and as implemented
by Executive Order 11717 (38 FR 12315, dated May 11,
1973) and Part 6 of Title 15 CFR (Code of Federal
Regulations).

Consumer Information Series—Practical information,
based on NBS research and experience, covering areas
of interest to the consumer. Easily understandable
language and illustrations provide useful background
knowledge for shopping in today’s technological
marketplace.

NBS Interagency Reports (NBSIR)—A special series of
interim or final reports on work performed by NBS for
outside sponsors (both government and non-govern-
ment). In general, initial distribution is handled by the
sponsor; public distribution is by the National Technical
Information Service (Springfield, Va. 22161) in paper
copy or microfiche form.

Order NBS publications (except NBSIR’s and Biblio-
graphic Subscription Services) from: Superintendent of
Documents, Government Printing Office, Washington,
D.C, 20402.

BIBLIOGRAPHIC SUBSCRIPTION SERVICES

The following current-awareness and literature-survey
bibliographies are issued periodically by the Bureau
yogenic Data Center Current Awareness Service

A literature survey issued biweekly. Annual sub-
scription: Domestic, $20.00; foreign, $25.00.

Liquefied Natural Gas. A literature survey issued quar-
terly. Annual subscription: $20.00.

Superconducting Devices and Materials. A literature

survey issued quarterly. Annual subscription: $20.00.
Send subscription orders and remittances for the pre-
ceding bibliographic services to National Technical
Information Service, Springfield, Va. 22161.

Electromagnetic Metrology Current Awareness Service
Issued monthly. Annual subseription: $100.00 (Spe-
cial rates for multi-subscriptions). Send subscription
order and remittance to Electromagnetics Division,
National Bureau of Standards, Boulder, Colo. 80302.


© aT VS
SHave se

a3IS1iNs0l W9sTW +00°CT= seret

Ys1SLANaGI WsaTIW 330 eeednh
wsldIinadl WIT v Ones
asISIANS0I WOSTIH Ww oret
esIdLAN3dI WaT Ww ore
WOISWAWIU HT wsLOVYVHD WITT OL 930 Otad
esISIANAOI WoAaTIH Ww ors
a3ISIANa0I WOATII Ww ore
adISTANGOL WOaTII Ww S*t
UsISIANa0dI Wo2Til TW ore
eSTAIANSdL WYATT day o°sd
GalsLANsdi WS3TWL Ww “Ge
asIdIINadi WIATIL WN *ot
UslSlIN3GI Weani *0 *coT

adAL dOaus USISTLNSO1 NOISNAWIG

“¢S)60Gus dy ddAd BWOS HLIh (S)GdVI Vind LAdNT BHL auv MOTZE O3LSIT

6 ute Ott ore st THe tae
4014 Sasldidingus aslo hw SMOTLIGGY SONVHD Y3enN
GAG SAWIITOD Lids no davd

aU adel:

A TaVi NOTSUIANOD AYWWOLSND *S*fl = JIYLAN

98


2
QHL 82-9 =

4 4 | 9 t $ iT y i € j
woe Ta6ede | Q3IA NIN Prininavn Os
Pe siV Td} edW OSh WV 3LON
= ONIMVYO 3 1dW Lel Coroz—} je oebz te

ES ay vers
1 =
ied aise uv} 62°F.
a ToL om ‘Wid os
WIG FHLIWITIWy 4) @IT0
YNIT Wow irOsd To OMA i}
EZ"h UV 31d awio3us asvaysH10 SS30NN
Bae OL
tizvesi 7] v 3LON
Ind ud 2 7331s “Hh
a | ans 020°0 F XV
! a % oars oShX2O
amas i) a
a i Ges |
of-———— —9 0 pafscorsco
xr guns’ 22123)
[AOL 30H! 123!
{oo HL, 00831 nee oz
SOF 06th
oro
"0S
a Sst th
ated
sou* sn}
4 nit
ze
oe
Ty
v &
oogea vu a
L£9S¢d SEM +g snbL suiwne gus SuLTIW-NON oe
or T 6 T 8 T z T 9 T s T , T € T z

Appendix I

58


CONVERSION

(3) 26.
27.
28.
29.
30.
31.

——
(1) Dimensions exceeding the exact numbers from whi

HG TO OUNCE
KG TO LB

MG TO LB

KG/M2 TO 0Z/YARD2
G/CM3 to G/CM3
KG/M3 TO LB/FT3

Figure 8 (Continued)

MAXIMUM
PERMISSIBLE
DIMENSION (1)

MAXIMUM ERROR (2)

200 000 oz
400 000 Kc
4 000 MG
300 000 KG/M2
9 000 000 G/cM3
90 000 000 KG/m3

cause input or output overflow.

MAX (.05 0Z, 5 PARTS IN 1 000)
MAX (.05 LB, 5 PARTS IN 1 000)

5 PARTS IN 1 000

MAX (.5.0Z/YD2, 5 PARTS IN 1 000)
MAX (.5 G/CM3, 5 PARTS IN 1 000)
5 PARTS IN 1 000

ch these figures are rounded will

(2) Maximum error for the computers on which the program was tested. See text.

(3) See notes to figure 4 for use of these unité,

44


93

1541090
1s42nn
154300
1R4u0n
154500
154400
184700
154R0n
154900
1550900
155100
185200
155300
155400
1585500
155600
155700
1859800
155900
156009
1s61of
156200
LR6A0N
186400
156500
156600
156709
156809
156909
157000
187100
157200
157307
1As740n
157509
157609
157700
157A00
187907
1sannn
1s8190
158200
15A300
1e84G00
1essno
18B6Nn
158700
1s8A00
1588900
is9nnn
159100
159200
15930n
159400


a. Header Card

The first card of each set of data must be a header card. It contains identifica-

tion information and format specifications and indicates to the program the number

of special identifiers being used.

The contents of the header card (with appro-

priate substitution of default values) is stored by the program and printed with

each data set being processed.

The information items on a header card are

described below and the card format is illustrated in figure 7.

Item

Part Number

Change

Additions

Output Columns MM

Output Columns
Other

Added Identifiers

10-17

19

28

37

46-47

Description

Used for data set identification only.
Not processed by program. May vary
from blank to 8 characters.

Used for data set identification only.
Not processed by program. May vary
from blank to 8 characters.

Enter "1" if data are to be added to an
existing chart. Otherwise leave blank.

Output format for millimetre conversion
may be printed in 1, 2, 3 or 4 pairs of
columns. Enter number of pairs desired.
If left blank, output will be printed in
1 pair of columns.

Non-millimetre conversions can be printed
in 1 or 2 parallel sets of 4 columns each.
Enter number of sets desired. If left
blank, output will be printed in 1 set of
4 columns.

Enter the number of special identifiers
being added for the set. METCO can
accommodate 18 special identifiers for
a total of 49.

18


Rounding

Input Conversion U.S. Customary Method
(3) Metric Unit Identifier Factor Unit Used
1, MILLIMETRE (1) 1/25.4 INCH (2)
(4) 2. BAR BAR 14,504 PSI 3
(4) 3. MILLIBAR MBAR . +014504 PSI i
4, MEGAPASCAL MPA 145.04 PSI 3
5. DEGREE CELSIUS DEG C 1.8 + 32 DEGREE FAHRENHEIT 3
6. DEGREE C
TOLERANCE DEG TOL 1.8 DEGREE F TOLERANCE 3
7. NEWTON N 22481 POUND (FORCE) 1
8. KILONEWTON KN 224.81 POUND (FORCE) 1
9, NEWTON METRE NM > .73756 POUND (FORCE) FOOT 1
10. GRAM METRE cM 1.3887 OUNCE (MASS) INCH 2
11. NEWTON/MILLIMETRE N/MM 5.7101 POUND (FORCE)/INCH 1
12. MICROMETRE UuTM +039370 THOUSANDS OF INCH 2
13, CENTIMETRE cM +39370 INCH 1
(4) 14. DECIMETRE DM 3.9370 INCH 1
15, METRE M 3.2808 FOOT 1
16, KILOMETRE KM -62137 MILE 2
17. SQUARE MILLIMETRE MM2 -0015500 SQUARE INCH 1
18. SQUARE CENTIMETRE CM2 .15500 SQUARE INCH i
19, SQUARE METRE M2 1.1960 SQUARE YARD 2
20. CUBIC CENTIMETRE CM3 061024 CUBIC INCH 1
21, CUBIC CENTIMETRE
LIQUID CM3 LIQ -03381 OUNCE (LIQUID) 1
(4) 22, DECILITRE DL 3.3810 OUNCE (LIQUID) 2
23, LITRE LITRE 1.0567 QUART 2
24, CUBIC METRE M3 1.3080 CUBIC YARD 1
25. GRAM G 035274 OUNCE (MASS) i
(4) 26. HECTOGRAM HG 3.5274 OUNCE (MASS) 2
27. KILOGRAM KG 2.2046 POUND (MASS) 2
28, MEGAGRAM MG 2204.6 POUND (MASS) 1
29, KILOGRAM/SQUARE OUNCE (MASS) /
METRE KG/M2 29,494 SQUARE YARD 3
(4) 30. GRAM/CUBIC GRAM/CUBIC
CENT IMETRE G/CM3 1.0000 CENTIMETRE 3
31. KILOGRAM/CUBIC POUND (MASS) /
METRE KG/M3 .06 2428 CUBIC FOOT 1

(1) No input identifier is necessary for millimetres.
(2) Rounding method for millimetre conversions is explained in Section IIIC3.

(3) These identifiers do not necessarily Tepresent approved symbols for the units to
which they refer. Recommended representations in upper case letters for most of
these units are given in 1S0/DIS 295516].

(4) See notes to figure 4.
FIGURE 5. METCO SUMMARY TABLE

14


Lo
1o

1d
Lo
io
19
40

Lo
19
10
poe
49

10

15

Wi 939
4 930
a 930

Salwn

Bhs
*O8T

“OST
wT
Bel
gtoL
orts

e°69
6°Se
ere
eee
O°eT

Srnt
0°6
*h
°Sée=
"one

wig

*et  SONVHD

asldLin3qi Ws
oaldlinadl WweaT

ddAL

auLI7
SyLIT

auLli)
AMLT4
audi)
Sulit
ayLIt

aur)
aMLIT
3uLT7
ayl11
ayul17

SuLIT
Sulit
WoL 930
2 93u
2 930

SLINn

WvNO -
wVYo

aouad ualsalLNaar

"els
"oLt

ent
*90T
S°ce
och
“a9

S*s9
“He
G*6e
gee
et

“HT
ge
ore
S*ite
O° 0h=

nIa

1226S6 Luvd

"090
gue

NOISN]hIG

*US)d0EdS Ju SdAd BWUS HLTM (5)08V9 VIVU ANdNI BHL 3uv MOT3H OSLSI7

bo slu.ws u t 1 ”
SARivivaei 2070 Sd4I di LNSui datly Wh SNOTLTGGY
uadue SNwiiT09 Lidsno
SC asuiiie SO batewiv

°eT
SONVHD

T2L656
MBG iN
avd

ATaVi WOISETANGD AMVWOLSND *S°N = JTYLIK

97


Customary Conversion Table". The-pagination of the output is oriented to
these two types of information and they appear on separate output pages. A brief

description of the components of each type of output appears below.

a. Metric to U.S. Customary Conversion Tables

This is the output to be attached to or associated with an engineering drawing.
If a data set contains both millimetres and other metric units, two tables will
be printed - each on a separate page and each properly identified with "part
number" and "change". .A blank line appears after each 5 lines of output in the
table. A string of asterisks (********) in the U.S. Customary units field means
that the converted dimension overflows the 8 characters permitted by its output

format.

Millimetres to Inches - The table is printed in a 2 column array (input milli-
metres and output inches respectively), and sorted in ascending order by input
millimetre dimension. As many as four 2-column arrays may be printed across the

page depending on the value specified for "output columms MM" on the header card.

Other Units - Table is printed in a 4 column array consisting of (1) input dimen-
seion, (2) input metric unit, (3) output dimension, and (4) output U.S. Customary
unit. Data is sorted first by input dimension and then by input metric unit. A

maximum of two 4-column arrays may be printed across the page.

26


y aTaivs
Shtvwaa

Ol
1070

vu
Sudldidiaui
uaCuy

SO dSui

ISd 00969 Vdwe

SLINN
ork G°t u
dale We SNUILIGUY
SWWTUS Ladin
SU Maui

“Ogh

wid SLINA vIG
G SONVHD 660fV6 Luvd
Helen o°cet

4e6°e o°ont

agere stees

696°T oo°0S

696°T o°0s

eLe°t SS*it

c6s°t Shut

4gtel, egt6e

eno” Shoot

£on° Tet

geee oe'e

9Le° ork

Teo° of

oco* s°

oTo* Gze

Too* eue

HONT
0 3ONVHD 660LV6 Liid
0
3ONVHI

ATL NOISYSANOD AYYWOLSND *S*n

~ S1aL35H

107


nann0A

oA020000 0

148H CONVERSION TABLE (TN MILLIMETRES). PIT A COMMA/BH RETWEEN,
157H THE TWO ENTRIES. A PAIR OF COLUMNS IS 53.34 MILLIMETRES,
16H WIDE./)

100 IF(ISW1.EQ.1) WRITE (IWRITE52)

2 CONTINUE
RETURN TO STATEMENT 2 IF THERE IS To AF MORE THAN OME TARLE
CALCULATED.

THE VECTOR Li IS TO CONTAIN THE DRAWING IDENTIFICATION Ann
MAXIMUM TABLE WIDTH WITH A COMMA TN BFTWEEN. IN ORDER To
SEPARATE THE TWOr THE COMMA IS LOCATEN (BY 111) AFTER THE
TRAILING BLANKS ARE DROPPED oFF,
READCIREAD+ 3) (L1(1) + T=t¢LM)
3 FORMAT (136A1)
DO 4 T=1eLM
J=LM1~I
IF(L1(J) .NE«IBLANK) GOTO 5
4 CONTINUE
5 CONTINUE
DO 6 Lil=19U
IF(L1I(L11) EQ. ICOMMA)GOTO 7
6 CONTINUE
STOP
7 CONTINUE
LAL=Liit1
CHECK FOR NONNUMERIC CHARACTERS AFTER COMMA
DO 70 I=LiieJd
IF(L1(1).GTeININE) GO To 54
IF(L1i(1).LTe¢IZERO) GO To 54
70 CONTINUE
THE MAXIMUM WIDTH OF THE PRINTOUT IN MILLIMETRES TS IN THE VECTOR
Lil FROM Lit TO J AS HOLLERITH CHARACTERS. TN RECOVER IT
AS A FLOATING POINT NUMBER® IT IS WRITTEN INTO CHANNEL IUNTT Ann
READ BACK OUT. EVENTUALLY IT IS CONVERTEN INTO YWe THE
NUMBER OF COLUMN PAIRS. EACH COLUMN PAIR REQUIRES 21 SPACES an
53034 MILLIMETRES» AND THERE CAN RE NO MORE THAN & PAIRS.
IS=20-U
DO 71 II=LileJ
IJ=IS#+II
71 IBUF(TJ)=LA(II)
WRITE (IUNIT»72) TBUF
72 FORMAT(20A1)
00 73 II=Lited
IJ=IS+IT
73. IBUF (IU) =IBLANK
REWIND IUNIT
READ(IUNIT+ 76)W
76 FORMAT(F20.0)
REWIND TUNIT
Li1=Liit-2
IW=INT(W/53434)
IW=MAXO (47 TW)
IW=MINO (60 IW)

128


D Program removes duplicate measurements, if they exist, and prints a line to
indicate that it has done so. :

E Drawing identification is printed followed by conversion table. Table has
been formatted with 3 pair of columns as specified in B2. Duplicates have
been removed. Program sorts on the output data and prints the entries
of the table in increasing order of magnitude in rows rather than columns.
The millimetre values always appear first. This is true in both programs,
GMMETR and GMINCH. One more decimal place always appears in the inch
measurement than in the millimetre measurement.

F The user may process another table by entering a new drawing identification
and table width or alternatively he may terminate the run by entering any
alphabetic character.

G The character S was entered to terminate the run.

A similar example for GMINCH is given in figure 10.

2. Program Limitations
a. Accuracy of GMMETR

On the computers tested, the program is valid for input measurements between 0
and 25,000 mm. Measurements less than or equal to 8000 mm should be entered with
3 or less decimal places while those greater than 8000 mm should be restricted
to at most 2 decimal places. Under these conditions the error in the converted

measurement is not more than one-half unit in the last place retained.

50


PART 656876

MM

20001
2002
20003
+0004
26005

20906
+0007
-0008
20009
2001

20010
2602
2003
2004
2005

2006
2007
2908
2609
+010

ofl
02
203
a4
299

206
007
208
209
210

el
02
oS
4
5

06
7

INCH

0

00001
00001
«00002
00002

-000N2
«00003
00003,
00004
0

«00004
20001
0001
0002
20002

0002
+0003
0003
20004
0004

n

001
2001
-0n2
002

+002
0003
2003
004
2004

004
008
2012
2016
2020

0024
028

104

CHANGE 0

MM

08
9
1.9
1.5
9.49

12.5
13.0
19.0
23.6
28.0

34.0
37.7
41.2
42.5
47.0

56.7
6600
70.0
81.0
90.

140.0
169.0
165-0
220-0
259.0

265.0
375.0
70160
850.001
859.002

850.903
859.004
859.905
850.006
850.007

850.009
850.009

INCH

eOTML
6035
2039
6059
«370

2492
2799
743
+929
1.102

1.339
2484
1.422
1.673
1.A50

24232
2.598
26756
3.189
3.543

5.512
6.299
6.496
6.661
10.197

33.4A46
33.4646

33.4647
33.4647
33.4648
33.4648
33.4648

33.4649
33.4649


NMX = NX # 1
WRITE ( NP» 1500 ) NX

1500 FORMAT ( 4OHONUMBER OF ENTRIES IN CONVEOSTION TAPLE = +

FUN

1

Is / s/s 7¢

73H IDENTIFIER TOENTIFIER ROUND CONVFRSTON ROUND TNG
/

73H IN OUT TECHNIQUE FACTOR UMIT

4)

Do 1900 J = 2+ WMX
WRITE ( MPre 1700 ) (€ LAREL( Tr Ube fF = te 5)
TABLE(1+ J)e TARLE(?¢ J)

1700 FORMAT ( 1H + 2A4e 4Xe PA4e 4Xe Tite ?PFI2.5 )

1

IF ( J eGEe NLSAVE «AND. Jo el Te NUMLAR )
WRITE ( NPe 1890 )

1800 FORMAT ( IHte 60Xe 35Hkeke THIS IS 8 TEMPORARY ENTOY xee4  )
1900 CONTINUE

2100
Cc

o00

a20 aANn0

3700

3800

WRITE ( MPe 12300 )
CONTINUE

N =o.
CONTINUE

CLEAR ALI TEMPORARY STORAGE BEFORE READI.IG IN DIMEMSTON DATA

DO 3800 IT = te 16
INOUT(I) = KTRL(14)
CONTINUE

TOIN(1) = 0.0N0
TOIN(2) 0.000
ITDIN = 96

To(1) = IBLANK

Io(2)) =  IBLANK

In (3) =  IBLANK

To(4) = TBLANK

READ DIMFNSION ANN TOFNTIFIER ( 3% PATRS AT A TIME )
CALL READER

SEARCH LABEL ARRAY FOR PROPER IDENTIFTER

do 4400 T = ty NUMLAD

DO 4300 J = le 2

IF ( IDCJ)) NE. LABEL (Je TP) 2 GO TY 4HOD
CONTINUE

GO To 5100

CONTINUE

INDEX = 1

CONTINUE

IF ( NCHFK ) 490%" 4700* 4900

CONTINUE

PRINT THIS HEADING IF §& LEAST ONE ERROR IS FOLINN

68

19820
1990
?0nnn
20109
?020n
20300
2ouon
20sen
20600
P0700
PoRon
Pnoon
2100
lion
pipan
21309
Piano
p1son
P160n
21700
2iaon
21900
22000
22100
22209
22300
Pauon
pasnn
22600
p27
Penon
p2a0n
23000
23100
23200
P3a00
2340n
P350n
?3600
e370n
23a0n
p300n
P4oan
pe4i1on
puoon
Pusan
paunn
e4ason
24600
24700
Puan
PHONN
-500n
25100


Item Column No. Description

Plot 55 A special option can be added to the
Program to provide output through a
plotter. This option is not included
in this version of the program.

Remarks 56-72 Enter any remarks to appear on output.

b. Special Identifier Card
If additional metric units are being added for an individual run, a special identi-

fier card must be furnished for each unit. The information items to be on a
special identifier card are described below, and the card format is illustrated

in figure 7b.

Item Column No. Description
Metric Identifier 1-8 Input identifier (metric). Maximum
of 8 characters,
U.S. Customary Unit 10-17 Output identifier (U.S. Customary).
Maximum of 8 characters.
Round Technique Code 19-27 Code Rounding Technique
-1 3 significant digits
i) whole numbers
1 1 decimal place
2 2 decimal places
3 3 decimal places
4 4 decimal places
5 5 decimal places

With codes 0-5 a maximum of 3
significant digits is retained,
Examples of the use of codes -1,
0, 1 are given in section IIIC3b.

Conversion Factor 28-36 Enter the constant (in fixed decimal
format) by which the metric unit is
multiplied to convert it to a U.S.
Customary Unit. See figure 5, colum.
headed Conversion Factor (items 2
through 31) for format examples.

20


3 TBLA(16)¢ TRLBCV7) + TREACTAD® TELZC1Ade TRLE(PN)e 419600
4 TALS(21)—¢ TRLO(22), TRLY(23)+ Tilu(ze), TRLEI25) 7 119700
5 One 000+ Noe 0.00 0.40 119800
6 0.0% 0.0% 0. 0.0 06% 119000
7 O.ne OMe N.eOr O.9r Dee 120009
8 Qn 0.0+ Noe CoOr Dee 120109
9 O60" Oe0r Nee O.0+ Oe F 1?N2yAn
120300

DATA NLSAVE 4 32 7 1?0400n
129509

DATA NUMLAB 4 32 / 1en6n9
- 1ea70n

DATA ISTOP(1)% ISTOP(2)+ ISTAP(3), ISTeP(H) 7 tegann
1 1H» HF, Hor uP 7 120007
121000

DATA IBLANK / 4H / 1P1lion
. 1P1209

END yo13H9

86


Computer Program Package for Metric Conversion:

Reference Manual

Ruth K. Anderson and Joseph O. Harris, Jr.

The programs in this package are designed to convert
dimensions and other quantities appearing on engineering
drawings from metric to U.S. customary units and vice versa.
They were developed by Caterpillar Tractor Co. and General
Motors Corporation. In addition to the programs themselves,
the package contains documentation explaining how to get the
programs running on different computers and how to use them,
and test problems to permit users to verify that the programs
run correctly on their own computers. The Caterpillar program
converts 31 different metric units to their U.S. customary equiv-
alents. In contrast, the General Motors programs convert in both
directions but work with millimetres and inches only. The General
Motors programs also use rounding conventions differing womewhat
from those employed in the Caterpillar program. Both the Cater-
pillar and the General Motors programs are written in American
National Standard FORTRAN and are suitable for use on a wide
range of computers with little or no modification, The Caterpillar
program is operated in batch mode while the General Motors pro-
grams are interactive.

Key words: Caterpillar Tractor Co. ; computer program; docu-

mentation; engineering drawing; General Motors Corporation;
metric conversion; rounding; test problem; tolerance.

I INTRODUCTION

In order to assist engineers and manufacturers in the transition from the
traditional U.S. customary system of measurement to the metric system of meas-
urement,NBS is making available a computer program package to perform the con-
version from one system to the other with carefully controlled accuracy. Control

of accuracy is necessary in order to maintain required tolerances at minimum cost.


c

4.00
4900

Cc
Cc
Cc

5000

5100

a00 200

a900

8500

BA00

8700

aan0

WRITE (€ NPe 4aan )

FORMAT ( 7OHOLISTED RELOW ARE THE INPHT NATA CADN(S) WITH SOME T
1YPE OF ERROR(S). J SLNNDIMENSTON IMENTTFTER FRROP TYPE
2 4)

NCHEK = NCHEK + 1

CONTINUE

PRINT BAU CARD AND IDENTIFY ERROR

INDEX = ( INDEX = 1 ) * 8

TI=INMEX4+1

IA=INDEX+A

WRITE ( NPre 5000 ) (€ INOUT(T), T de & De
1 ID(1)+ ID(2)5 €  MESAG( I Ye To = Te 18

FORMAT ( 1H ¢ RALe 4Xe 2A4e 6X BAN )

60 TO 3700

CONTINUE

DETERMINE TYPE OF IDENTIFIER

IF ( IT .EQ@e NUMLARS  ) GO TO 9590

TOIN(() = T

DECODE DIMENSTON INTO TNIN AND TTRIN
CALL DECOME ( te 9+ VALUEr TTOIN }

TDOIN(2) = VALUE

CHECK FOR ILLFGAL CHARACTERS IN OTMENSTOM

IF ( ITMIN + 1 ) 6100+ 370% 56209

CONTINUE

INDEX = 2
GO TO 4600
CONTINUE
WRITE DIAGNOSTIC IF MORE THAN 500 UNIQNE TNPUT CAPOS APF GTVFN

IF ( N = 500 ) 8609+ 80M» A500
CONTINUE

INDEX = 3

GO TO 4600
CONTINUE

IF ( N = 1 ) 8790+ 8700+ R900

CONTINUE

TRANSFER ALL TFMPORARY STORAGE T2 PERMANENT STORAGF ANN THFN .GO

BACK AND READ ANOTHER CARD STOP MUST RE LAST IDFNTIFTE®

DIN(1» N) TOIN(L)
DIN(2» N) TDIN(2)
IDIN(N) ITDIN

N = N + 21

69

p>

25200
5300
P5400
P5500
2560n
P5709
asson
psano
pennn
e100
?6p0n
26219
26220
26390
Penna
26500
264N0
26700
Pesan
?6ann
P7900
?710n
7209
e7R0N
27400
P7son
274ann
27700
eT7e0n
P7ann
2snnn
28109
28200
28200
Bunn
28500
28600
2a70n
2snon
pacan
2o00n
29100
29200
29R0n
Ppouon
29500
29600
2970n
poRon
290nn
z0n0r
30109
30200
30300


a 9 A N|AAAAO

100
200

300
400

500

600

700

800

900

1000

1100

c
1200

Ay Je Re AND NOR MUST BE GIVEN
INOUT IS OUTPUT

IMPLICIT INTEGER ( To = N )
COMMON ODIN(2+ 500)» TOIN(2)

COMMON INOUT(16)

DOUBI.E PRECISION ODINe TDINe Re AR

COMMON / DATA / KTRL(42)*+ MESAG(40)+ LAPEL(S* 59)¢
1 TABLE(2+ 50)* NLSAVEr NUMLARe ISTOP(4)*+ TRLANK

Do 100 N = Iv J

INOUT(N) = KTBL(14)

CONTINUE

IF ( NMR ) 200+ 300+ 300
CONTINUE

RETURN

CONTINUE

IF ( R ) S005 4O0* 500
CONTINUE

INOUT(I) = KTBL(1)

RETURN

CONTINUE

NTC
NOL
IpCcML = 1

N = I

AR = R

IF ( R ) 600% 700+ 700
CONTINUE
AR = -R

NTC = 1

N = N +

INOUT(I) = KTBL(12)

CONTINUE

IR = AR

CONTINUE

IF ( IR = IDCML ) 1000* Sud*e 200

CONTINUE

NDL = NOL + 1

TocML = IDCML * 10

Go TO 6800

CONTINUE

NTC = NTC + NDL + NOR + 1

IF ( NTC = € Jo = T + 2 Yd 12M 12R96 1100
CONTINUE

RETURN

CONTINUE

15

PO

584ann
5a50n
sa60n
58700
5a8a0n
SAg0n
59000
5910n
59208
59300
Sayan
sosan
3960n
5965"
59700
59Aa00
s9000
60000
aoicn
an20n
69300
AggAN
ansen
6n6nn
Ao7an
4ne0n0
a0o00
e1go9
41100
6lann
41309
aang
61500
eleno
41700
ALaag
ALoan
Aanne
42100
62200
AaR00
Anan
A2500
2600
6270n
62ann
azenn
43000
63109
A3200
A700
63009
6350
43600


PACKAGE MAINTENANCE
It will be appreciated if reports on malfunctions and suggestions for
improvement are sent to NBS in order that purchasers of the package
may be notified of necessary or desirable changes in either the tape
or the manual. This applies both to malfunctions resulting from the
Programs alone and to those due to possible mismatches between the

program and the computers or operating systems upon which they are run.

Other programs for metric conversion may be added to the package in the
future. Eligible programs would be ones that (a) differ significantly
from those already on the tape, and (b) have been used by their parent
companies enough to insure that they are practical for their intended use
and free of obvious bugs. If additional programs are added, an additional

charge to cover NBS costs may be necessary.


200.0 aM TLLEGAL, TOFNTIFIFR
A12.358 TLLEGAL CHARACTE? Tr, NIMFNSION

103


aaona

ana

aaane

a00

IF ( NCOLS2 .E9. 2 )
WRITE ( NP- 12900 )

12900 FORMAT ( 1HO+

2 2(3HDIMl 7X e SHUNITS 2 6X9 SHNIMe 7X e SHUNT TS 9 OY) )

12975 CONTINUE
13000 CONTINUE

Do 13025 IT = 4+ 32

LISTER(I) = TBLANK

CONTINUE

do 13050 I = 1+ &

IDOUT(I) = TBLANK

CONTINUE

Do 13800 NCOL = 1+ NCOLS2

kK = ( NCOL = 1 2 * NLINFS +. NLINE + NTYPEL
IF ( K .GTs NLIST ) GO TO 13809

T= KINDX(K)

CLEAR ALL TEMPORARY ARRAYS BEFORF LOADING WITH CHARACTFRS FOR
PRINTING

po 13100 J = ir 16
INOUT(J) = KTRL(14)
CONTINUE

po 13200 J = tr 4
ID(J) = IBLAN
CONTINUE

TOIN(1) = 0.900
TDIN(2) 0.000
ITOIN = 0

TOIN(1) OIN(1+ 1)
TOIN(2) = DIN(2s I)

ITOIN = IDIN(T)
INPUT DIMENSION PREPARATION

VALUE = TOIN(2)
CALL ENCODE (€ Je Ae VALUE® TTNIN )

SETUP INPUT AND OUTPUT TOENTIFIERS
CALCULATE CONVERSION CONSTANT
SETUP TYPF OF PRINT OUT

N = TOIN(1)

In@i) LABEL (1+ N)
1n(2) LABEL (2+ N)
Ip(3) LABEL( 3, M)
1n(4) LABEL (4+ N)
IPLACE = LABFL(S+ N)
CON = TABLE(1+ N)
RDUNIT = TARLE(2+ N)

CONVERT DIMENSTON AND CHECK SPECIAL CASF FOR PFGRFE C TO CEGPEE

NIM = TNIN(?) * DARS ¢( CON )

73

aa00

4a740n
47500
“7600
47ann
4B300
4BEOA
4B50n
48609
4B70N
Bann
argon
49900
49100
49200
49300
4onon
4o50n
49609
“970
w9n04
499009
sooon
50109
s0200
50an0
50409
sos5on
s0ann
50709
soaon
scan
S10aq
51100
S1200
s13n0
siuon
51500
51600
83700
s1809
s1900
s200n
52100
52200
52300
52400
s250n
2600
52709
52ann
52009
53000
S3109
S3an0


PART 3F1341

PART 3F1341

DIM

2.
1000.
740.0
731.5
206

100.
2.0
4.0
7.0

20.00

CHANGE 15
INCH MM
00010 76
0005 1.5
2002 2.
00199 3.
0020 5-6
004 6.35
0014 11.00
2016 14.25
+020 16.0
0244 17.0
CHANGE 15
UNITS DIM
BAR 296
MPA 145000.
DEG C “406
DEG C 7256
DEG C 68.
DEG C 212.
DEG TOL 4a.
DEG TOL 7
DEG TOL oe
DEG TOL 136
DEG TOL 366

INCH

«030
2059
0079
0118
0220

250
2433
561
2630
+669

UNITS

PSI
PSI
OEG

og
m
Coy

ann

DEG TOL,
DEG TOL
DEG TOL
DEG TOL

DEG TOL

Mi

17.50
18.0
19.0
19.8
20.83

21.8
22.0
25.17
30.860
32.0

om

in.
19.35
2.0
Qe
3.0

8.0
11.25
22.55
4.
50.

99

INCH

+689

+799

+748

+780

2920

P58

+866

2002

1.2150

14260
UNITS om
nN 2.25
nv 110.
uM 162
uM 1.2
ve 1.9
KM 5.0
“M 7.9
KM 14.9
LITRE 4.2
KG 1106

MM

38.10
47.33
59.0
57.0
77.90

85.0

12A.N
154.0

UINTTS

Ler

TNCH

1.500
1.963
1.969
> Pan
3.031

3. 4A
5.030
ALNGR

LA/TNCH

MICE
MILE
MULE

MILE
MILE
MILE
aT
Lb


9 4HCM3 6 4H

DATA LABOS(01)¢
LABOS(06) +
LABOS(11)>
LABO5(16)¢
LABOS(21)>

4HCM3 6 = 4HLIQ
4HDL of 4H
4SHLITRe 4HE
4HM3S 6 4H
4HG + GH

WONONE UE

DATA LABN6(01)+
LAB06(06)+
LABO6(11)+
LABN6(16) 6
LABD6(21)+

4HHG of 4H
4HKG oo» 4H
GHMG 6 4H
4HKG/Me GHD
4HG/CMe = 4H3

OBNOMEUNE

DATA LABO7(O1)+
LABO7(06)»
LABO7(11)6
LABN7(16)>
LABO7(21),

GHKG/Me — GH3
SHSTOPs® = 4H
4H © 4H
4H » GH
4H e 4H

Way ounEaNe

DATA LABN8(01),
LABNB (06) 6
LABOA(11)+
LABNB(16)+
LABOB(21)>

4H + 4H

4H * 4H

4H + 4H
4H + 4H
4H o 4H

WONT FUE

DATA LABOD9(O1),
LABO9(06)»
LABN9(11)>
LABO9(16) 9
LABO9(21)5

4H » 4H
4H + 4H
4H » 4H

NOM FUME

,
’
’
’
’

,
’
’

GHINS

LARO5(02)
LARNS5 (07)
LARONS(12)
Lanos(17)
LaRN5 (22)
4HOZ Le
4HOZ Le
4HOT +
4HYDS +
4HOZ 6

LABN6 (02)
Laan4 (97)
LaRN6 (12)
LABN5(17)
LARO6(22)
4HOZ +
HHLR oo
4HLB +
4HOZ/Y»
GHG/Cy

LABNT (02)
LABO7(07)
LaBo7(12)
Lano7(17)
Lann7(22)
GULA/Fe
4H ,
4H ,
4H ,
4H ,
Lanna(o2)
LABOR (07)
LABNR(12)
LABNR(17)
Lanog(22)
4H ’
4H ,
4H ,
4H ’
4H ,

LA309(02)
LaRN9(07)
LABNA(12)
LABN9(17)
LABNO(22)
4H ,
4y ,
4H ,

’
’
'
’

,
’
,
’
,

4H eo oot

LABOS (C3) +
LABOS(ND +
LABNS (13) 6
LARAS(19)
LABN5(23)5

BHTQ 9 le
4GHTIO 6 ty
4H , de
GH roost
4H rot

LABOS(O3)»

LABNE (NO) +
LABN6(13)>
LABOH(19) 6
LABNA(23)+

4H , te
4H , de
4H rooste
4HN2 + %
Ha ’ ob)
LABAT(O3)¢
LABO7 (NAD+

LABO7(13)¢
LABO7(1%) +
LABO7(23) 6

4HT3 + =1e
4H + OF
SH , Or
4H 1M
4H , 9

LABNA(N3)>
LABNB(09)»
LABOA(L3D»
LABNA(19) +
LABQR(23)5

4H +
4H , ui
aH , Or
4H 1 Me
aH , 9

LABN9(03)>
LABN9(O%) +
LABNI(14)»
LABNO(1RD»
LABN9(23)5

4H , Me
4H * Oe
4H , Ne

84

a

Lanas(ne),
LARA (DO),
LABOS (1)
LABOB (LO),
LABIS (ANY »

7

LABNA (ON) +
LAINE (OO)¢
LABCE CIN) ®
LABNK (1°)
LARNA (20)

7

LABOT (ONY
LABN7 (AD
LABO7 (14),
LABN7(19)—
LABAT(20)¢

7

LABOR (On),
LARNAOO)»
LARNR(L4)»
LABOR(19) 6
LARNACA) >

/

LABNA(OND®
LABNI(GO)s
LARNO( LEY,
LABAO(LO)
LABNO(2H)»

LARAS (SS) >
LABOR(TAD
HARNE(IB),
VRQNE CM) >
LARK (95)

EABNA(ER),
HARNACIN)»
LAROACI5) +
LAPMA( IN) >
L ARNE (OS)

LANOT(E5)»
LABRTCAN)
VABOT(1S) +
LABITOONY
LABAFO25)

LARME(N5)—
LABOOCLAY,
VASOPCIED
LAGNO (AN)
HARBOR CAS)

TARAMO(FA)»
LARAOCLO) >
LARCOCLS) >
LABIO(AN) >
LARHA(95)

f

1apane
Torano
1sanna
19109
Lpepgn
Tnaaqge
troune
199500
1neane
199799
1s9ana
ynennn
dinnos
Ltotas
T1a200
119390
119409
11950r
ainane
119709
Ligene
d199A0
Titans
‘iiss
Ltieen
Litzas
111nAe
111599
Attensa
111799
1iiace
Liang
Liana
1121098
Vi2eNnn
112300
1tanaq
112500
112600
11276n
112200
11pean
113000
1131400
11326n
113300
L1B4NN
12350°R
113800
113700
1y3age
113000
114909
11ian


In other words, for input entered with the maximum number of decimal places,
measurements less than or equal to 8000 mm will be converted to within 5 hundred-
thousandths of an inch and those between 8000 and 25000 mm to within 5 ten-
thousandths of an inch. Input measurements with fewer decimal places will be
converted with correspondingly less accuracy but still to within one-half unit

in the last decimal place retained in the output.

b. Accuracy of GMINCH

On the computers tested, the program is valid for input measurements between 0
and 1000 inches. Measurements less than or equal to 800° inches should be entered
with 4 or less decimal places while those greater than 800 inches should be
restricted to at most 3 decimal places. Under these conditions the error in the

converted measurement is not more than one-half unit in the last place retained.

In other words, for input entered with the maximum number of decimal places,
measurements less than or equal to 800 inches will be converted to within 5 ten-
thousandths of a millimetre and those between 800 and 1000 inches to within 5
thousandths of a millimetre. Input measurements with fewer decimal places will
be converted with correspondingly less accuracy but still to within one-half

unit in the last decimal place retained in the output.

CG Computers with short word lengths

The computers upon which these programs have been tested included one with a 32-

word length and a single precision floating point mantissa of 24 bits. The

52


GMMETR ON UNIVAG
SAMPLE PROBLEM - MILLIMETERS TO INCHES (user)

ENTER A SINGLE PLUS SIGN, +, :
FOR MORE INFORMATION. ELSE, HIT CARRIAGE RETURN. @) (computer)

+ G) (user)
ENTER THE DRAWING IDENTIFICATION AND THE MAXIMUM WIDTH ON THE DRAWING

FOR THE MILLIMETRE-INCH CONVERSION. TABLE (IN MILLIMETRES). PUT A COMMA
BETWEEN THE TWO ENTRIES. A PAIR OF COLUMNS IS 53.34 MILLIMETRES WIDE.

(computer)

TEST DATA FOR GMMETR, 200 2) (user)

ENTER THE MILLIMETRE DIMENSIONS ON A LINE WITH COMMAS IN BETWEEN.
THE COMPUTER WILL KEEP ASKING FOR ANOTHER LINE OF INPUT UNTIL YOU

INDICATE THAT YOU HAVE NO MORE INPUT BY ENTERING 0. (ZERO) AS THE
LAST NUMBER.

SHOW THE DECIMAL POINT EVEN WITH INTEGERS.

BE CAREFUL IF YOU ENTER A DIMENSION LARGER THAN 25 006 MILLIMETRES
DO NOT ENTER A TOLERANCE SMALLER THAN 0.001. MILLIMETRE

A DIMENSION CANNOT EXCEED 8 000 060 TIMES ITS TOLERANCE. €) (computer)

2001,.6010,.100,.254,2,54,.254, 2.540, 2544, 25.40, 25465254005
254.05254.00,254.000,254.01,2540.0,25400.,25400.0,25400.00,
9b 2 35 My 055 065075 0G y eID y LaDy Oe

(user)
DUPLICATE MEASUREMENT(S) REMOVED.
(computer)
TEST DATA FOR GMMETR
uM CINCH) Mm CINCH? MM CINCH)
+001 000 0 +010 000 4 7 +00
+100 6003 9 +2 01 +254 010 0
+3 01 4 +02 “5 202
+6 202 +7 03 8 03
9 04 1.0 +04 2. al ©
2.540 .100 0 25.4 1.00 25.40 1.000
54. 2e1 254. 10.0 254.0 10.09 (computer)
254.00 10.000 254.000 10.000 0 254.01 10.000
2540. 100. 2540.0 100.00 25 400. 1000.0

25 400.0 1000.00

ENTER THE IDENTIFICATION (COMMA) AND WIDTH FOR ANOTHER TABLE.
TO END PROGRAM, ENTER ANY ALPHABETICAL CHARACTER. (computer)

$s ®@ (user)

Figure 9

48


li Many parts are procured from suppliers who are still operating in U.S.
Customary units. At their option they may produce parts to the U.S.
Customary units shown in the conversion chart.

2. Engineers need to know the conversion equivalents whenever a metrically
defined part interfaces with a U.S. Customary defined part.,

3. Tooling and gauging people need the chart for quick reference to exist-
gauges and tools that may be applicable to the new metric part.

4 Data Processing systems such as those used in inventory control may not
accept both units of measure and have to be fed U.S. Customary units
until the systems are modified.

5. Service literature may be dual dimensioned and should continue to

provide U.S. Customary units.

It was decided to use a computer to generate the conversion chart in order to |
obtain dual capability at minimum cost. It was also desired to be able to use
personnel other than engineers to feed the information into the computer. The
computer program in this package is the third one developed and used by Cater-
pillar Tractor Co. since January 1973. The two previous programs did not suf-

ficiently fulfill the goal of making the Program operable by clerical personnel.

One way to initiate a program of metrication is to begin designing all new or
redesigned products in metric measure starting in the layout drawing stage. The
term "new product" does not necessarily mean all new parts. Many existing parts
are carried over from current to new products, particularly if the new product

is a redesign of a current product. These parts are already in production using

10


The rounding technique employed in millimetre to inch conversions is essentially
the same as that recommended in American National Standard Z25.1-1940 reaffirm@d
i961!7], specifically:
(a) Remainders less than 1/2 are rounded downward,
(b) Remainders greater than 1/2 are rounded upward,
(c) Remainders exactly equal to 1/2 are rounded to the nearest even digit.
In this program, exactly 1/2 is defined to be any number within the

range -5 + .0001 to .5 - .0001 inclusive.

If the quantity 1/2 used in the nearest even digit routine were defined exactly,
this procedure would result in a maximum rounding error of 1/2 unit in the least
significant place retained. Actually, however, the maximum error is .5001 in the
least significant place retained. This difference is of no practical importance

and will be neglected in the subsequent discussion.

Non-millimetre conversions, both those that are built in and those that are
introduced by means of added identifier cards, are rounded according to one, two
or three procedures applied serially in order as follows:

(a) The special rounding unit, if any, is applied. The quantity 0.5 is
added to the quotient of the unrounded converted dimension divided by
the special rounding unit. The result is truncated to its integral
part and multiplied back by the special rounding unit to give the
rounded dimension to the nearest allowable increment.

(b) The result of operation (a) is rounded to three significant figures
using the same procedure that is used for rounding from millimetres to

inches.

39


(3)
(3)

(3)

(3)

CONVERSION

1 MILLIMETRE TO INCH

2. BAR TO PSI

3. MBAR TO PSI

4. MEGAPASCAL TO PSI

5. DEGREES C TO DEGREES F
6. DEGREES C TOL TO DEGREES

F TOL

7. NEWTON TO POUND

8. KILONEWTON TO POUND

9. NEWTON METRE TO

POUND FOOT

10. GRAM METRE TO OUNCE INCH
11. NEWION/MM TO POUND/INCH
12. MICROMETRE TO INCH/1000
13. CENTIMETRE TO INCH
14. DECIMETRE TO INCH
15. METRE TO FOOT
16. KILOMETRE TO MILE
17. MM2 TO INCH2
18. (M2 TO INCH2
19, M2 TO YARD2
20. CM3 TO INCH3
21. M3 LIQ TO 0Z LIQ
22. DECILITRE TO 0Z LIQ
23. LITRE TO QUART
24, M3 TO YARD3
25. GRAM TO OUNCE

Figure 8

MAXIMUM PERMISSIBLE DIMENSIONS AND MAXIMUM ERRORS

MAXIMUM
PERMISSIBLE

DIMENSION (1)

MAXIMUM ERROR (2)

90

40

1o

20

30

90
60

90
90

90

250
700
000

60
000

000
000
40

000
700

000
000

000
000
000
000
000
000
000
000
000
200
900
000
000

000 MM
000 BAR
000 MBAR
000 MPA
000 DEG C

000 DEG C
000 N
000 N

000 NM
000 GM

000 N/MM
000

000
000
000
000
000
000
000 M2
000 CM3
000 CM3
000 DL
000 LITRE
000 M3
000 G

gge*' ge sg

43

-0005 INCHES

MAX (.5 PSI, 5 PARTS IN 1 000)
5 PARTS IN 1 000

MAX (.5 PSI, 5 PARTS IN 1 000)
MAX (.5 DEG F, 5 PARTS IN 1 000)

MAX (.5 DEG F, 5 PARTS IN 1 000)
5 PARTS IN 1 000
5 PARTS IN 1 000

5 PARTS IN 1 000

MAX (.05 OZ INCH, 5 PARTS
IN 1 000)

5 PARTS IN 1 000

MAX (.05 INCH/1000, 5 PARTS
IN 1 000)

5 PARTS IN 1 000

5 PARTS IN 1 000

5 PARTS IN 1 000

MAX (.05 MILE, 5 PARTS IN 1 000)
5 PARTS IN 1 000

5 PARTS IN 1 000

MAX (.05 YARD2, 5 PARTS IN 1 000)
5 PARTS IN 1 000

5 PARTS IN 1 000

MAX (.05 0Z, 5 PARTS IN 1 000)
MAX (.05 QT, 5 PARTS IN 1 000)
5 PARTS IN 1 000

5 PARTS IN 1 000


an0

11900
Cc

12000

aa00

12050
12100
Cc
Cc

c
12200
12300
12500
12600
c

c
c

12A00

12850

ROUND TO 1 MORE PLACE TO THE RIGHT OF THE NECTMAL POTNT THAN
GIVEN IN THE DIMENSION VALUE WITH A MINTMIM OF 2

IPLACE = ITDIN + 1

IF ( PLACE = 3 ) 11900 12000* 1>c00
CONTINUE

MINIMUM OF 3 PLACES ROUND OFF

IPLACE = 3

CONTINUE

CONVERT DIMENSION+ ROUND TO PROPER NUYBER OF PLACES ANN PLACE TH
ARRAY READY FOR PRINTING

DIM = TDIN(2) * CON
DIM = DABS ( DIM )
OIM = DROUND ( DIM» IPLACE )

CALL ENCODE ( 9+ 16+ DIM» IPLACE )
MYLINE = ( NCOL = 1 ) * 16
DO 12050 J = te 16

JJEMYLINE+J A
LISTER( Ju y +=  INOUT(J) Cc
CONTINUE

CONTINUE

PRINT ORIGINAL INPUT DATA AND CONVERTED DATA

IF ( KOUNT « FQ. 1.) WRITE ( NP» 12300 ) A
WRITE ( NPr 12200 ) ( LISTER(J)>s Jo = '4e Ay )

FORMAT ( 1H 6 BALe 2X BAls 6X* BALe PXe AAle O¥e BALE C
1 (2X*e BA1+ 6Xe AALs 2X*e BAL ) Cc
IF € MOD ( KOUNTe 5 ) EQ. 0 ) WRITE ( NP» ipzor )
FORMAT ( 1H d

CONTINUE

CONTINUE

GREATER THAN TYPE 1 CONVERSION DATA ¢ OTHER THAN MM TO IN )

IF ( NTYPE2, LE» 0 ) GO TO 15900

KOUNT = 0

NLINES = ( NLIST = NTYPEL + NCOLS? = 4.) YF NCOLS?

DO 14000 NLINE = t+ NLINES

KOUNT = KOUNT + 1

IF ( NLINE = 12 ) 13000 12800 13090

CONTINUE

SKIP 2 LINES AND PRINT HEADING FOR OTHER THAN MM TO IN CONVERSIONS
WRITE. (NP*10010) =(IDCARDiL) + L=1-12) A
IF <¢ NCOLS2 .EQ. 1 )

1 WRITE ( NP» 12850 ) Cc
FORMAT ( 1HO+ c

2 2 (€ 3HDIMe 7Xe SHUNITSe 6X ) ?)

72

“2ann
n2aon
4wanng
42500
n2eean
n2700
“2R0n
upann
noon
aaron
az2nn
n3a00
e3uon
43son
43609
43700
n3raan
nzann
wunnn
ngtne
wapnn
ngosn
44ann
44uon
4ason
4G4HA0N
44700
4a759
4ueon
n4ogn
asaon
asian
45200
45300
a5uan
45500
4560n
45700
a5aon
4500n
n600n
4610n
n620n
46300
464uon
46500
46600
46700
46RON
46asn
46900
47000
47108
47300


fo¥eKelsRe Noles)

41S THE NUMBER OF (SIGNTETCANT) DIGITS TO T4r RIGHT OF THE
DECIMAL POINT TN As A TS CONVERTFD To *M TuteeGrR ov wurcH
CONTAINS FXACTILY THE SIGNIFICANT MIGITS OF fy IO MORE ANN NA
LESS. K IS TO BF MULTIPLIED BY 2546 BUT» RECAST THE HONEYWELL,
COMPUTER CANNOT HANDLE MIRTCTLY AN INTEGER LIRGER THAN & 23R ANT,
Ke BEFORE REING MULTIPLTFO bY 254% COULN AF an LARGER THAM
33 0266 THERFFORE K IS 990KE INTO Kile THE RIGHT FOUR PISTTS»
AND K?+ THE REST OF kK.
M=MAXO (Ne 1)
K=INT(AK10, €#M4+.5)

ON (Kr 1000)
K=K1)710900
SU*KI

La=2surke

L3=MOD(Lir100)

L1=L1/100

IF(L3.E9.50)G0TO 1

TF(L3.6G6TsSU)L1=L141

GOTO ?
1 CONTINUF

L3=MOn(L1+2)

TE(LSeEQe I LITLU4L
2 CONTINUE

REFLOAT(LP)/10 oe (N= 3)

BSB+FLOAT(L1)/10.%* (4=1)

RETUPY

Eno

134


NAB ANGANAANANAAAG

anananaaAaA

aa0nno

ano

PROGRAM GMINCH CONVERTS FROM INCHES TO MILLIMETRES = JUNE 1974
ROBERT DAVIES

ROOM 1-141 ReAsBe

EXTENSION 5-2745

GM RESEARCH LABORATORIES

GM TECHNICAL CENTER

WARREN*® MICHIGAN 48090

DIMENSION AM(1000) 6h (130) 0L1(80) @LL (114) 2 (1000) @UISC(1000)
DIMENSION IBUF (20)

THE TwO PREVIOUS LINES CONTAIN ALL REFERENCES TO ARRAY SIZFS
EXCEPT FOR SOME FORMAT STATEMENTS AFTER STATEMFNT 366
AM = THE US CUSTOMARY MEASUREMENT IN INCHES
L = THE INPUT DATAr HOLLFERITH
LL = THE OUTPUT DATA, HOLLERITH
ND = THE NUMBER OF DIGITS TO THE RIGHT OF THE DECTMAL POINT
IN THE US CUSTOMARY INPUT

USC= THE METRIC MEASUREMENT IN MILLIMETRES

DATA LMeNHeNM/729 19010007

DATA IBUF(1)+ IBUF(2)+ IBUF(3) + TRUF(4)+ TBUF(5)+

1 TRUF(6)* IBUF(7)* IRUF(8)* IBUF(9)+ TRUFCIO)+

1 IBUF (11) » IBUF (12) e IRUF (13) ¢ TRUF (14) 6 TRUF C15) +

1 IBUF (16) » IBUF (17) ¢ IRUF (18) » TRUF (19) ¢ TRUF (20)

1 71H eH 91H oH e1H 01H etH etH et o1H ¢

i QH e1H e1H eH 61H eLH etH 01H 1H el /

DATA TBLANK+ IPLUS+ ICOMMAs IPOINT + IZEROe ININES

11H elite LHe elHe re 1HOr1LH9/

DATA IREADe IWRITE*TUNIT/S¢Sel/

THE ABOVE DATA STATEMENT SETS THE INPUT UNIT NUMBER? THE OUTPUT

UNIT NUMBER AND THE SCRATCH UNIT NUMBFR.

LM1=LM+1

TSwi=t

ISW1°IS A SWITCH THAT IS USED TO SUPPRESS PRINTING OUT CERTAIN
INSTRUCTIONS UNLESS ASKED FOR THE FIRST TYME THROUGH.

WRITE (IWRITE?97)
97 FORMAT(30H ENTER A SINGLE PLUS SIGNe + #/9H FOR MOREr
140H INFORMATION. ELSFr HIT CARRTAGE RETURN./)
READ ( TREAD’ 3) 1
IF (1+EQsIPLUS) ISwi=0
IF (ISW1.EQ.0)WRITE(IWRUTE*1)
1 FORMAT(49H ENTER THE DRAWING IDFNTIFICATTON AND THE MAYTMUM,
121H WIDTH ON THE DRAWING/24H FOR THE MILLIMETPE<INCH?

127


FEDERAL INFORMATION PROCESSING STANNARD SOFTWARE SUMMARY

Ol. Summary date; 02. Summary prepared by (Name and Phone) 03. Summary action
Yr. |Mo. | Day | Ruth K. Anderson, (301) 921-3551 _ New Replacement Deletion
ZLalol sigl i) 08. software title a a im)
04. Software date; Caterpillar Tractor Co. .Metric Conversion Progran Previous Internal Software 1D
yr. _| Mo. | Day ———
I osla2l (07. Internal Software ID
(06, Short title METCO.
08. Software type Tog. Processing mode 10. ceneral ‘Application area Ssctte
‘Automated Data Computer Systems Management/
‘System Ly Interactive {C] Support/utility Business
Computer Program | (X] Batch [I Scientific/Engineering [7] Process Control
{D) Subroutine/Module i [J Combination oO Bibliographic/Textuat Other
11, Submitting organization ano address 12. Technical contact(s) and phone
Institute for Computer Sciences and Technology Dr. Joseph 0. Harrison, Jr.
National Bureau of Standards (301) 921-3551
Washington, D.C. 20234

13, Narrative The program converts dimensions in any ot 31 different metric units to

equivalent dimensions in U.S. Customary units. Input parameter cards allow the user to
select rounding conventions, output format and to replace or augment the 31 built-in
metric units with others more applicable to his requirements. Written in Standard
FORTRAN, the program is essentially machine independent. It has been tested on the UNIVAC
(108, the PDP-10, the IBM 370 and the CBC 6400

14. Keywords

Metric Conversion

15, Computer manuf’r and model 16. Computer operating system 17. Programing language(s) 18. Number of source program state-
American National Stand-
See narrative n/a ard FORTRAN X3.9-1966 j@PProximately 1200
19. Computer memory requirements | 20. Tape drives 21. Disk/Drum units (22. Terminais
12,000 words (UNIVAC 0) 0 0)
‘23. Other operational apo ens
(24. Software avaitability 25. Documentation availability
Available Umited In-house only Available: Inadequate In-house only
LS]
26, FOR SUBMITTING ORGANIZATION USE
|
i
|
|
Yes-101 FIGURE 1 Standard Form 188
US. Dept. of Commerce-NOS
ick. Pa SS


an a9 0

ao

oan000

IF CISW1.EQ.O0) WRITE (TWRITE®8)
8& FORMAT(48H ENTER THE INCH DIMENSIONS ON A LINF WITH COMMAS?

112H IN BETWEEN./42H THE COMPUTER WILL KFE® ASVING FOR ANOTHER?
124H LINE OF INPUT UNTIL YOU/31H INDICATE THAT YOU HAVE NO MOPE®
135H INPUT RY ENTERING 0. (ZERO) AS THF/13H LAST NUMBER ./

143H SHOW THE DECIMAL POINT EVEN WITH TNTESERS./

161H BE CAREFUL IF YOU FNTER A DIMENSION LARGER THAM 1990 INCHES +/
155H NO NOT ENTER A TOLERANCE SMALLFR THAN 0.900 1 INCH /

160H A DIMENSION CANNOT FXCEED 8 900 000 TIMFS ITS TOLERANCE /)

IF (TSW1.EQ.1) WRITE CIWRITE*9)
9 FORMAT(S1H ENTER THE INCH DIMFENSIONSs INOTCATTNG THE LAST ONFe
11GH BY O. (ZERO)./)

N1=1

10 CONTINUE :
RETURN TO STATEMENT 10 IF MORF THAN OMF LINE TS NEEDED FOR TH!
INPUT DATA FOR ONF TABLE.

READ( TREAD’ 3) (LCI) eI=19Lm)
READ THE INPUT DATA AS HOLLFRITH CHARACTERS AND THEN RFUECT
TRAILING BLANKS.
121 DO 11 I=1+LM
J=LM1i-1
IF(L(J) wNEeIBLANK)GOTO 12
11 CONTINUE
12 CONTINUE

REJECT A TERMINAL COMMA,
M=0
IF(L (J) eNFe ECOMMAIGOTO 13
L(J)=TBLANK
J=Jea1
IF(J.GTe1) GO TO tat
ELIMINATE LEADING COMMAS
INSPECT THE INPUT FOR ILLEGAL CHARACTERS» TMRENDEN PLANKS (PFUFCT
THEM) + CONSECUTIVE DECIMAL POTNTS WITHOUT A COMMA RBETWFEN®
AND CONSECUTIVE COMMAS WITHOUT NUMERICAL CHARACTERS RETWEFN,
FINALLY+ COUNT THE NUMBER OF DIGITS AFTER THE MECTMAL POINT.
13 CONTINUE
MEM+1
IF(M.GT.J)GOTO 15
TF(L(M) WNFe IBLANK AND OL (1) sNESTCOMMAYGOTS 12
JeJ=l
Do 14 K=MeJd
LCKIEL(K+1)
14 CONTINUE
M=M=1
GOTO 13
15 CONTINUE
ISwC=t
TSWP=0
NSNI-1
DO 22 I=1+J
IF(L(T) -EQ.IPOINT)GOTO 16
IF(L(T) 6EQ.ICOMMAYGOTO 19

29


the above characteristics of the General Motors programs will be addressed

specifically in the following section.

De APPLICATION INFORMATION
This section describes program characteristics from the user's point of view.

1. Annotated Illustration of Program Application

A sample problem for GMMETR is illustrated in figure 9 and is described below.
The lower case letters in parentheses queued onto the figure identify those
portions of the sheet printed by the computer and those by the user. The sec-

tions of the write-up are cross referenced to the figure.

Al Having logged in and called the program, the user has the option of request-
ing "more information" by entering a plus sign*.

A2 The user has exercised this option.

Bl The program asks for drawing identification and maximum width of the input
conversion table in millimetres. These two items must be separated by a
comma and may not exceed 80 characters collectively.

Drawing identification - This entry will be used as the title of the draw-
ing. Any alphanumeric characters may be used.

Maximum width - Program output is comprised of a pair of columns or values
for each input measurement, i.e., the input measurement and the equdvalenr

converted output measurement. The program can accommodate six pairs of

*0On most interactive terminal systems every entry is followed by a carriage

return which signals to the computer that the input line is completed.

47


ACKNOWLEDGEMENTS

Particular thanks are due to the companies that donated their computer programs
to the National Bureau of Standards for distribution as part of the Computer Pro-
gram Package for Metric Conversion--Caterpillar Tractor Co. and General Motors
Corporation. Both companies, in addition to supplying their programs, assisted
NBS in the testing, changed their programs as a result of the tests, and con-
tributed material for the documentation of the package without reimbursement of
any kind. Without the contributions of these companies, the package would not

exist.

At Caterpillar Tractor Co. thanks are due especially to Joseph G. Langenstein,
Senior Materiel and Standards Engineer. Mr. Langenstein initially conceived of
the idea of distributing metric conversion programs through NBS. He is responsi-
ble for having the Caterpillar Tractor Co. Program released for this purpose, and
he has worked with NBS personnel on all phases of the testing and documentation.
Thanks are also due to B. Jack Prather and Karl M. Henry of the Caterpillar Trac-
tor Co, Technical Center for their work in programming this and several prior
versions of the Caterpillar program and for making further changes as a result of

the NBS tests.

At General Motors Corporation thanks are due especially to Roy Trowbridge, Chief,
Engineering Standards Section, General Motors Technical Center who was instru-
mental in getting the General Motors programs released and to Dr. Robert Davies

of the General Motors Technical Center who programmed the General Motors routines.


a ANANDA NAAN|AAOAEC

°

aAggNAANMANAADNAADNADNAAAONANAADAAADADADA

CATERPILLAR TRACTOR COMPANY
100 NORTHEAST ADAMS STREET
PEORIAr ILLINOIS 61602

PROGRAM BY= A. JU. PRATHER

TITLE= METRICATION@=METRIC TO Us Se CUSTOMA2Y 96121-545 3% 10/19/73

PROGRAM 0545
IMPLICIT INTEGER ( IT = N )
COMMON DIN(2+ 500)* TNIN(2)

COMMON INOUT(16)» INCARD(30)*% INNEXR*+ NCe NP» NCHEKs IN(U)>
1 IDCARN(72)% LISTER(64)+ [MONT (S)* KINDX(500)* NLTSTr
2 IDIN(500)

DOUBLE PRECISION DIN» TNIN+ ADNCHGe VALUE+ PLOT+ TYPE, cot,
1 DIMe ROUNITe RCONSTe NAROLINA

DIN(2- 500)
STORAGE FOR TOIN = UP TO 500 UNIQUF NIMENSTONS

TDIN(2) REAL TEMPORARY STORAGE
WORD 1 TYPE OF CONVERSION (INDEX OF LABFL)
WORD 2 OTMENSTON VALUE

INOUT(16) 1641
WORDS t= 8 INPUT WiMENSTON
WORDS 9-16 OUTPUT DIMENSION (CONVEP TED)

INCARD(30) 244+ S8AL+ 2A4e BALe 2A, AAL
WORDS 1 = 2 INPUT IDENTIFIER
WORDS 3 - 10 INPUT RIMENSION
WORDS 11 = 20 TAKE THE SAME PATTFRN, AS WORRS 1 = 10

INDEXR = INDEX OF THE 3 PAIRS OF INPUT 9IMENSION FOR REANER
SUBROUTINE.

NC = UNIT NUMBER FOR THE CARD RFANE®
NP = UNIT NUMBEP FOR THE LINE PRINTER
NCHEK = CHECK VARIABLE FOR THF PRINTING OF FRROR HEANTAG
TO(4)  4Aa4
WOROS 1-2 INPUT INENTIFIER
WORDS 3-4 OUTPUT IDENTIFIER

ITDIN INTEGER TEMPORARY STORAGE
NUMBER OF NIGITS TO THE @TGHT OF THF AFCIMAL POINT

500

600

7on

Ron

enn
1000
1100
iza00
1300
1ann
1500
1600
17990
ison
19onn
2000
2100
220n
2xnn
2400
25an
260n
2700
anon
Pann
3onn
31Aan
3200
3300
Ban
350°
Bane
37An
Bann
3ann
4onn
41090
420n
4300
4unn
4500
4600
4700
4800
4900
Sogn
sian
S200
5309
Suan
5500


a, Header Card

2 [>

46-47 55 | 3

1 = 8] [10-17 19
part’ ne, |
added plet
additions identifiers
eutput
col. MM
eutput cel
ether

b. Special Identifier Card

; +
1-8 | {10 - 17] [19-27 | 28 - 36 | 57 = 45 3

netric Conversion
Adentifier Facte:
U.S. Custemary acter Round Unit
Unit V
Reund
Technique
Cede
c. Data Card
I ¢
1-8) |10 - 17 j19 - 26 28 = 35| 137 = 44) [46 = 53 >
Dimeisien 1
Identifier 1
Dimensien 2
Identifier 2
Dimensien 3
Identifier 3
FIGURE 7
CARD FORMATS

19


FILE 1

FILE 2

FILE 3

FILE 4

FILE 5

FILE 6

CONTENTS OF TAPE

DOCUMENTATION

METCO PROGRAM

SUBROUTINE ENCODE
SUBROUTINE DECODE
SUBROUTINE DASORT
SUBROUTINE SETUP
SUBROUTINE SIGNIF
SUBROUTINE READER
FUNCTION SUBPROGRAM DROUND
BLOCK DATA SUBPROGRAM

TEST DATA FOR METCO PROGRAM

SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE

CONDUEWNE

10
i
12

TEST OUTPUT FOR METCO PROGRAM

SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE
SAMPLE

GMMETR

WCONDAUEWNE

10
11
12

PROGRAM

SUBROUTINE CONVMM

GMINCH

PROGRAM

SUBROUTINE CONVIN

62

63
64

74
76
77
78
79
80
81
82

87

87
87
88
89
90
91
91
95
96
96
96

97

97

98
100
102
106
107
108
2
U5
nl6
uz
ns

119
125
127
133


U.S. DEPARTMENT OF COMMERCE

National Bureau of Standards
Washington, D.C. 20234

OFFICIAL BUSINESS

Penaity for Private Use, $300

POSTAGE AND FEES PAID
U.S. DEPARTMENT OF COMMERCE
COM~2t5

SPECIAL FOURTH-CLASS RATE
BOOK

—a
US.Ma~I
MAIL

re
en On
z 3
$ A
gS =
=
y eS

7? 76-1918


The programs are written in American National Standard FORTRAN and are essentially

machine independent.

Each source program consists of about 400 FORTRAN statements, when tested on the

UNIVAC 1108. Computer memory requirements were approximately 12,000 words.

55


INPUT OUTPUT

in in
Metric Units U.S. Customary Units
1. MILLIMETRE INCH
(1) 2, BAR PSL
(1) 3. MILLIBAR PSI
4. MEGAPASCAL PSL
5. DEGREE CELSIUS DEGREE FAHRENHEIT
6. DEGREE C TOLERANCE DEGREE F TOLERANCE
7. NEWTON POUND (FORCE)
8. KILONEWTON POUND (FORCE)
9. NEWTON METRE POUND (FORCE) FOOT
10. GRAM METRE OUNCE (MASS) INCH
11. NEWTON /MILLIMETRE POUND (FORCE) /INCH
12, MICROMETRE THOUSANDS OF INCH
13. CENTIMETRE INCH
(2) 14. DECIMETRE INCH
15. METRE FOOT
16, KILOMETRE MILE
17. SQUARE MILLIMETRE SQUARE INCH
18, SQUARE CENTIMETRE SQUARE INCH
19, SQUARE METRE SQUARE YARD
20. CUBIC CENTIMETRE CUBIC INCH
21. CUBIC CENTIMETRE OUNCE (LIQUID)
LIQUID
(2) 22. DECILITRE OUNCE (LIQUID)
23, LITRE QUART
24, CUBIC METRE CUBIC YARD
25. GRAM OUNCE (MASS)
(2) 26. HECTOGRAM OUNCE (MASS)
27, KILOGRAM POUND (MASS)
28, MEGACRAM POUND (MASS)
29, KILOGRAM/SQUARE OUNCE (MASS) /
METRE SQUARE YARD
(3) 30. GRAM/cUBIC GRAM/CUBIC
CENT IMETRE CENTIMETRE
31, KILOGRAM/CUBIC POUND (MASS) /
METRE CUBIC FOOT

(1)

(2)

(3)

——
In July 1974 Caterpillar Tractor Co. changed the units that it uses for desig-

nating pressure from bar to kilopascal and from millibar to pascal. These

changes will be reflected in subsequent editions of the metric conversion
package.

These units have special usage at Caterpillar and are not recommended for gen-
eral use,

At Caterpillar this unit is used in both the metric and the U.S. Customary
system of measurement. In applying the conversion program it is simpler to
enter it into the computer than to make an exception of it.

FIGURE 4

BUILT-IN METCO CONVERSION CAPABILITY
12


INPUT

95972113. SAMPLE 1 121700
+85 GRAM 121809
3.5 LITRE 121900
14. LITRE 122000
17. LITRE 122109
22.5 LITRE 122200
"31.5 DEG C 122300
260 DEG TOL 122400
-40.0 DEG C 122500
29.5 LITRE 122600
34. LITRE 122700
170. LITRE 122800
65.5 LITRE 122900
68. LITRE 123000
75. LITRE 123100
75.5 LITRE 123200
3060. GRAM 123300
106. LITRE 123400
148. LITRE 123500
519. LITRE 123600

STOP 123700

Sample 1

29


B2

cl

c2

values across the page. A pair of values is 53.34 millimetres wide. For
simplification, the user may round this value and enter integers. A recom—
mended convention is the following:

1 pair of columns = 60

2 pairs of columns = 120

6 pairs of columns = 360
Care must be exercised in specifying a number eompatible with the width
of the paper that the table is being printed on and the space available on.
the drawing to which it will be attached.
User types in both items separated by a comma.
The user is asked to enter the measurements to be converted. These are
entered on a line with commas in between. Every measurement must have a
decimal point. A final zero followed by a decimal point indicates that no
more measurements will be entered for this table. Legal characters are the
decimal point, comma, and numerics. Range of permissible values is as
follows:

GMMETR: between 25,000 and 0.001 millimetres

GMINCH between 1,000 and 9.0001 inches
Data is entered. Note (1) decimal point with each dimension, (2) separating
commas, (3) final zero followed by period. (Some systems accept integers
without decimal points and several numbers were so entered in the example

in figure 9 without error.)

49


3. Rounding Conventions
The METCO program uses four different rounding conventions for built-in con-
versions. These are summarized below. It should be pointed out that the user
may modify these rounding conventions by making simple changes to the program.
a. Millimetres
Conversions of millimetre dimensions to inches are rounded to one decimal place
more than indicated in the input but to no less than three decimal places. The
minimum number of decimal places in the output can be increased or decreased by

program modification.

Example: Input in Millimetres Output in Inches
+020 -0008
5 +020
50.0 1.969

b. Other Units

Rounding Method 1 (Code -1)

Converted dimensions are rounded to three significant figures.

Example: Computed Value Rounded Value
~ 0034864 +00349
334864 +349
3.4864 3.49
34864, 34900.

Rounding Method 2 (Code 1)

Converted dimensions are rounded to one decimal place but retain a maximum of

three significant digits. Zeros are used as required.

Example: Computed Value Rounded Value
- 0034864 0
«34864 3
3.4864 3.5
34864. 34900.

15




anaaaa

o00an0

ana0

1

1
2

NoaFrune

Nourune

OnEUNE

Queue

BLOCK
IMPLIC

COMMON
TABLI

DATA
IT INTEGER

7 DATA
E(2+ S0)e

COMMON / DATA

COMMON

common
COMMON

KTBL (4

CHARACTER TABLE USED I DECONE AND ENCODE SURRGIITINES AS WELT.

7 DATA

7 OATA
7 DATA

2) AL

C to -

/ KTS8L(42)
NLSAVE® NU!

KTBL (42)
LAROL(25
LAROS(25
LARO9(25
/ TS8L1(25)
J NUSAVE®

7
/

N )

+ MESAG(CO)+ LAPFL(

IMLAR »

ISTOP (D>

* MESAG (HO)

Ye LABOACA5) +
de LARDG(25) 6

Y» LAR10(25)

+ TBL2(25)6

NUMLABy

AS INITIALIZATION OF APRAYS

DATA

DATA

MESAG(
ERR:

DATA

4SHIt
GHIt
4HMO!

DATA

KTBL(O1)+
KTBL(06)°
KTBL(11)¢
KTBL(16)¢
KTBL(21) 7

KTBL(22)6
KTBL(27)¢
KTBL(32)¢
KTBL(37)¢
KTBL(42) 7

40)
OR MTMSSAGES

MESAGAOL)»
MESAG(. 6)6
MFSAG(11) +
MESAG(16)¢
LEr SHGAL »
LE» SHGAL +
RE» 4H THAr

MESAG(21)¢
MESAG(26)¢
MESAG(31)+
MESAG(34)5

» GH ,
e OH ,

KTBL(02)¢
KTBL(O7) >
KTAL(12)¢
KTBL(L7) +

THOe  1H1e
AH7*  1HBe
THA® = LHBe

KTBL(?3)¢
KTBL(2A)»
KTBL(43) 9
KTBL(4A)»

THHe = LHIe
1HOr LHP»
JHVe LHW

KTBL(O03)+
KTBLCO8) +
KTBL(U3)¢
KTBI(18) 6

TSTOP (4)

KTSL (Ou) >
KTAL(OO)e
KTSLALN)
KTAL (IOV

LH2e  1H3,  THo, 1
LH9e 1H+e 1H=» 1
AHCe o1NDe tHE 1

KTBL (24) ¢
KTRIL(29) 6
KTBL(34) 6
KTBL(39)¢

KTPL C25)»
KTOL C30)
KTAL (BR) >
KTAL C4)

LARO3(95) +
LAROT(95) +

Sr St)e

TRLANK

TRL3(95)e = TALY(25)

TRLANK

KTBL(OS)+
YTBL(10)¢
KTRL(1DS) 6
KTRBL(20)¢

P50 THoe
Hee TH
WE, 1G 7

MTBL(26)>
“TBLUBL) o~
“TBLOAG)»
¥TBL(41)¢

TNde  1HKe tHLe THM, THING
AHO, 1'IRe 1HSe 1
AMX) LNs FHZ) 1

HTp THU,
ee A) Ss

TO BE PRINTED OUT KITH PAD TNPUT CARRS

MESAG(O2)»
MESAGCOT) »
MESAG(12)»
MESAG(L7) +

GHCHAR® 4H.
4H SOe GH

MESAS(22) >
MESAG(PT7)»
MESAG(39)¢
MESAG(37)»

oy ran
4H 1 4H

MESAG(O7%) + = MESAE(O.

MESAG(OR) >

MESAG(1%)*  MESAG(L

MESAG(1 RD
GHIDEN® 4HTTFT) sep

ACTF es 4He
oO UN 7

» 4H ,
IMe UH ONIMy

MESAG(23)9 MESAG(2

MESAG(2P) >
MESAG(3%)¢
MESAG( 39)»

SHIOUE, UH DAT?

» 4H
aH

82

aH ,
eu ’

Gye MEGAG(NS) +

MESAG(OO)* = MESAG(1O) +

aly MESAG(A5) +

MESAG(19)» MEGA (2N)

oH * 0H
AHENST » nHAN

Ye MEGAG(A8)y

MESA(G(PG)— MES"A(30)¢
MESAG(34)— MESAE( AE),
MESAG(3S), MeESAa(un)

HHA CA BHONS
4H 1 aH
Hy aH

/

LAPnu(25)5
LAPNR(25)»

,

9800n
9810n
98200
ea30n
98400
oason
98600
98700
osan0
eac0n
99non
9100
99200
993nn
a9uon
99500
a96an
°9700
o9anon
29000
1ndoon
1neidn
leo20n
Anozon
1ng4on
1nos5on
10600
1990700
irgsan
inngon
ininon
LeLinn
191200
1nt3n9
inianan
inison
1n1A0n
yoi7on
iniaoe
inion
1nanon
inasan
1n2aqn
ina3zon
1n24on
1n2son
192609
192700
in2aon
1n290n
La3nan
19310n
193209
103300


OUTPUT - IDENTIFICATION, TABLE

METRIC = U.S. CUSTOMARY CONVERSION TARLE

NUMBER
PART OUTPUT
NUMBER CHANGE, ADDITIONS = 4M
953184 01 1.0 3.0

NUMBER OF ENTRIES IN CONVERSION TARLE = 32

IDENTIFIER IDENTIFIER ROUND CONVERSTON
IN ouT TECHNTOUE FACTOR
BAR PST 0 1450400
MBAR PST -1 101450
MPA PSI 0 148, 04000
DEG Cc DEG F 9 — =1.R0000
DEG ToL. DEG TOL 0 1.8n000
N LF a .224a1
KN Ler -1 — 294.81000
NM UB FT “1 #73756,
GM oz INCH a 1.38870
Nz LB/TNCH +1 5.71010
uM MILS 1 203937
cm INCH “1 +39370
om INCH “1 3692700
4 FT “1 3.2anA0
KM, ILE 1
mse IN? -1
cma IN? -1
we yor 1
M3, TNS “1
cM3 LI oz Lire “1
OL. oz LIa 1
LITRE at 1
M3 Yo3 1
6 ya “1
HG 02 1
Ks Ls 1
MG Le =1 2204.60001
Kesm2 oz/Yo2 .0 " P9,4e4o0
G/CMS G/CM3 0 1.00900
KG/M3 LB/ETS “1 205263
METER NCH 1 _-39,37900
DECA 4 INCH 1 39%.79000

OF CONVERSION FACTORS AND ERRORS.

OF NUMBER OF

COLUMNS, ADDED.
OTHER TENTIFIERS PLOT REMARKS.
2.0 2.0 140 SAMPLE 3

ROUNDTNG
UNIT

1.90000
00000
1.00000
1.00000
1.90000
00000
-00000
00000
+tono0
«00000
+10000
00900
-o0n00
-0on00
=10000
+00000
+00000
+10900
+00000

+1000 ##e& THIS TS A TEMOORARY ENTRY tee
+1000 44% THIS TS A TEMPORARY ENTRY tee

LISTED RELOW ARF THE INPUT ATA CARD(S) WITH SOME TYPF AF FRROR(S).

DIMENSION IDENTIFIER = FRRO® TYPE

12.35 GAGE TULEGAL JOFNTTFIER
75.0 REF TLLEGAL IDENTIFIER
35. a ILLEGAL TNENTIFTFO
7100.22+ ILLEGAL CHARACTER IN
10. NM TLLEGAL IDENTIFIER

OIMENSTON

Sample 3 (Continued)

36


aaanao

350

400

500

550

600

700

600

900

950

975

1000

1100

1200

KTBL13 = 0

DO 1000 N = Ir J

NC = INOUT(N)

IF (€ NC £9. KTBL(14) )
IF (€ NC EQ. KTAL(13) >
IF ( NC «NE. KTBL(12) )
SEYEGN = =-1.0D0

IF ( KTBLI1 ) 5505 350+

CONTINUE

KTBL12 = KTRL12 + 1

IF ( KTBL12 - 1 ) 550%
CONTINUE.

Do Soo K = fe 11

IF ( NC .EQ@. KTBL(K) ) G6
CONTINUE

CONTINUE

NDR = =2

R = 0.0n0

RETURN

CONTINUE

IF ( K = 10 ) 700+ 700+
CONTINUE

IR = IR * 10 + K = 1
IF ( NSW ) 800+ 1900+ 800
CONTINUE

TIocmML = IDCML * 10

NOR = NOR + 21

60 TO 1000

CONTINUE

NSW = 1

KTAL13. = KTBLI3 + 1

IF ( KTALI3 = 1°) 550+
CONTINUE

IF ( KTPLI2 ) 550+ 975+
CONTINUE

KTBLI1. = KTBLIL + 1

IF ( KTRLAL = 1 2 550
CONTINUE

OCML = IDCML

R = IR

R = R / DCML * SFYEGN
IF ( K ) 120056 1100% 120
CONTINUE

NOR = =2

CONTINUE

RETURN

END

SUBROUTINE DASORT

THIS SUBROUTINE SORTS THE LARGE ARRAY OF TNPUT NIMENSTONS TNTO

ASCENDING ORDER

GO TO
Go TO
6O TO
550
100M»

0 TO

950

1000+

550

1000+

oO

77

1000
900
ano

550

400

550

S50

69300
69400
6950n
69600
49700
49809
4990n
7o00n
70100
7020n
70200
70400
70500
70600
70700
7oRon
70900
71000
71100
71200
713090
7140n
71500
71600
71709
71800
719nn
72000
72100
72209
72309
72400
72500
72600
72700
72A00
72000
73000
73100
73200
73300
73400
73500
7360
73700
73800
73907
749a0
74409
74a50N
74600
74700
7HEANN
749000


3. Error in entering maximum table width.

4. Number of dimensions entered exceed maximum 1000 allowed.

Various other conditions are recognized and compensated for without requiring
that the data be reentered.
1. Duplicate input measurements are eliminated, a message to this effect
is printed, and the program proceeds automatically,
2. Imbedded blanks are detected and the program proceeds without a diag-
nostic message.
3. Blanks appear when input values that are too small are processed.
4 Asterisks are printed on the output table. in lieu of quantities which

are too large for the print format specification.

A sample run exercising many of these conditions is illustrated in figure 11.
As in figure 9 lower case letters in parentheses queued onto the figure identify

those parts of the sheet printed by the computer and those by the users.

E. PROGRAMMING INFORMATION

Shown in Appendix 3 are program listings for GMMETR and GMINCH. They are essen-
tially the same with the exception of the key subroutine at the end of each pro-
gram, the subroutine CONVMM in GMMETR and the subroutine CONVIN in GMINCH.
Detailed comments are generously dispersed throughout the programs and are
identified by the letter "C" as the left most character in the line explaining

the operation of the program.

54


Qa aaaao

aann0n0

100

200

300

800
500

600

700

suo
900

1000

DIN
KINDX

IMPLICIT

COMMON,

COMMO!N
1

2

OC UBLE PI

MMM
CONTINUE
MMM
IF ¢ M
CONTINUE
RETURN

CONTINUE
M Mt
Do 1090
Joe.
KI =

KJ =
no 400
IF

K

D

ARRAY OF T

ARRAY SHOWING THE SORTED ORNER OF

INTEGER ¢
OIN(2* 50N)%
INOUT(16)¢
IDCARN (72) 6
TOIN (590)
RECISTON NT
NLIST

MM
IMM

4 2
- 1)

IM
I=

+ 1
M
MMM

INDX(T)

KINDX (J)

MN = le 2
IN(NNe KID

CONTINUE

GO To
CONTINUE
Lo = 1
CONTINUE
KINDX(L)
L J
J
IF ( J
CONTINUE
KJ K
BO 800
IF ¢ OD
CONTINUE
CONTINUE
KINDX(L)
CONTINUE
Go TO
END
SUBROUTT

1000

KJ

= MMM
- 1)

INDX(J)
NN = le
INONNe

2
KI)

KI
100

NE SETUP (¢

90M

NPUT DATA

Tos ND
TNIN(2)
INCARN(3O)¢
LISTER (64) >»

Ne TOIN

2906 3008

» NLIST

DIN CNN

7000

DIN(NNe

DIMs

KJ) )

KJ) )

INNEYPe  MCe
TOUT (Ad

300

Se

aC Ne

70"

60Ne

IPLACE )

tm!

NPe  NCHEKe
KIMOX (59M) »

400» 1os¢

2009" 909

TNC)»
MLIST?

THIS SUBROUTINE EXAMINE S THE CONVERTES VALUES OF OTMENSTON
AND ALONG WITH THE PRINT OPTION (IPLACE) DECTDES HOW
MANY PLACES TO THE RIGHT OF THE DECIMAL POINT TO PRINT OUT

78

759009
75100
75200
75300
75400
75500
75ann
75700
7580n
75900
76000
76100
76200
7e300
76400
76500
76600
T670N
76A00
76900
7700n
77109
7720n
77309
77400
77500
7760"
7770"
77a80n
77900
78Nn0n
7ALON
78200
78300
7AauON
73500
78609
7A700
78R00
78900
79000
79198
79200
79300
79400
7O5NN
79600
Ro00n
aaron
0200
aoz0n0
aogon
rAoson
aneoo


PART 6J3135 CHANGE NAS
MM INCH

198.431 768122
198.432 768123
198.433 7.8123
198.434 7.8124
198.435 7.8124

198.436
198.437
198.438
198.439
198.440

1984.31
1984.32
1984.33
1984.34
1984.35

1984.36
1984.37
1934.38
1974.39
1964.40 78.126

19843.1 781.224
19843.2 781.228
19843.3 781.232
19843.4 781.236
19843.5 781.240

19843.6 Tht 244
19643.7 781.248
19843.8 781.252
1984329 781.256
19844.0 781.260

3


Ob Adnws
SWUvwou

L0TG

0
SdaIdidn3aGL
uauuy
dO a3uwniy

OOT°T n6*Le
OTO°T so°ce
to0°T ence

TO0G°T £0n°Se
ToOOOO*T €00nese
o00°T n°Ge
h86° £00°Se
92n8O* e000°se

HONI WW

G B9NVHD eeeexe Luvd

T T 0 0 eeeexe
YSHLO Wa SNOILIGGV SONVHD UZEWhIN:
SNWN109 Lidind Luvd

su daewnN

AWVL NOISYSANOD AYVWOLSND *S*N = OTMLaW

6


identifier printout. Furthermore, each dimension which requires an unaccepted

special identifier card will cause an illegal identifier printout.

If the number of special identifiers to be added plus the number of identifiers
resident (thirty one plus those added in previous problems of the same run)
exceeds forty nine, the fiftieth and each succeeding special identifier card
are printed with an appropriate error message. Each dimension which requires

an unaccepted special identifier card will cause an illegal identifier print.

c. Data Card
The data card contains the dimensions to be converted and their associated identi-
fiers. Up to three pairs of dimensions and identifiers may be entered per card.
If a dimension is in millimetres, the identifier must be left blank. The infot-
mation items for a data card are described below, and the card format is illus-

trated in figure 7c.

Item Column No. Description
Dimension 1 1-8 Enter dimension to be converted. Accep-

table characters are 0 through 9, ., +,
-. Leading or trailing blanks have no
meaning but blanks must not appear imbed-
ded within the characters of the dimensions
field. Significant zeros must be entered
because round-off is based on the number
of digits to the right of the decimal.
The dimensions may be placed anywhere
within the field. The number of charac-
ters including decimal point and sign
cannot exceed 8 characters.

23


E, Programming Information

1. General , ,

2. Accuracy and Size of Numbers

a. Millimetres to Inches .

b. Other Built-in Conversions

ce. Numerical Values
IV GMMETR AND GMINCH PROGRAMS
A. Abstract ..,.....0.
B. Background Information
C. Problem Definition ,

D. Application Information , ,
1, Annotated Illustration
2. Program Limitations

3. Rounding Conventions

4, Error and Other Special Conditions ,

E. Programming Information ,

APPENDICES

APPENDIX I

APPENDIX IL
EBCDIC and BCD. . .

APPENDIX III Listing. ......

METCO - Example Drawing

Representation of FORTRAN Characters

38
38
38
41
41
42
45
45
45
45
47
47
50
53

53
54

58

59

61


K1=K2+2
245 CONTINUE
REWIND IUNIT
DO 247 I=N19N2
READ (IUNIT*#246) AM(T)
246 FORMAT(F20.0)
247 CONTINUE
IFCAM(N2) -EQ.0-)GOTO 25
IF(N2¢EQ@sNM)GOTO 26
N1I=N2+1
GO BACK TO GET ANOTHER LINE OF DATA.
GOTO 10

25 CONTINUE
THE LaST NUMBER WAS ZERO SO ALL THE DATA IS IN ANN PEJFCT THE
ZEROr OR
N2=N2=1
26 CONTINUE
NM NUMBERS WERE FED INe THE MAXIMUM.
N1I=N2+1

oa ao

PUT THE NUMBERS IN ORDERe FIRST BY NUMBER OF NIGITS TO THE RIGHT
OF THE DECIMAL POINT? ND.
DO 28 I=10N1
J1I=N1-1
IF(J1eLT.2) GO TO 28
DO 27 Jzerd1
KzJe1
IF(ND(K) sLEeND(J))GOTO 27
AZAM(K)
AM(K)=AM(J)
AM(JD=A
M=ND(K)
ND(K)=ND (J)
ND(J)=M
27 CONTINUE
28 CONTINUE

ano 0

c
C THEN PUT THEM IN ORDER BY SIZE OF THE MEASUREMENT SO THAT AMY
C DUPLICATE MEASUREMENTS WILL RE TOGETHER.

DO 30 I=1+N1

JI=Ni-1

IF(J1eLT.2) GO TO 30

DO 29 J=2rJ1

KoJe1

IF (CAM(K) sLE«AM(J) GOTO 29

NN CK) =ND CJ)
ND(J)=M
29 CONTINUE
30 CONTINUE

131


E. PROGRAMMING INFORMATION

1. General
The program is comprised of a main program, six subroutines called ENCODE, DECODE,
DASORT, SETUP, SIGNIF and READER; a function subprogram DROUND; and a BLOCK DATA
subprogram. The main routine and subroutines are liberally interspersed with

comments.

Modifications in the dimensions converted and their conversion factors may be

accomplished by changing the appropriate values in BLOCK.

The program is written in American National Standard Fortran! 4] and is essentially

machine independent.

The source program consists of about 1200 FORTRAN statements. When tested on the

UNIVAC 1108 it required approximately 12,000 words of memory.

2. Accuracy and Size of Numbers

The program uses double precision arithmetic so as to minimize the limitations of
computer word length. Of the computers upon which the program was tested the
smallest mantissa in the double precision floating point number representation
was 54 bits for the PDP-10 under DECsystem 10 with KA10 "long mode" number
representation.

Word length should not be a limitation on any computer with equivalent double
precision floating point representation. This includes virtually all large scale

computers and some minicomputers.

38


II

III

TABLE OF CONTENTS

INTRODUCTION «1 we te ee eee ee ee ee ee

CONVERSION PACKAGE COMPONENTS . 1... ee eee eae

A

B.

Tape

Documentation... eee ee eee ee eee

METCO PROGRAM «we wee ee ee ee ee eee ee

A.

Abstract 2 6 6 ee eee ee ee he ee

Background Information ....... 2. ee ee

Problem Definition 6... 6 ee ee eee eee

1.
2.

3.

Conversion Capability ...... 2. ee eae
Input Identifier... 2. eee ee ee eae
Rounding Conventions... 1... 1... eee
a. Millimetres .. 1. ee ee eee eee

b. Other Units. 2... eee eee eee

Application Information... 1... 2... ee eee

1.

Input 2 ee ee ee ee eee ee
a. Header Card... eee eee ee eee
be Special Identifier Card... ......
ce. Data Card... ee ee eee eee ene
Output 2 we ee ee ee eee
a. Metric to U.S. Customary Conversion Table

be Identification, Error Messages and Table

of Conversion Factors... .....004

Sample Computations .....-.....0048

viii

il

11

15

15

15

16

16

18

20

23

25

26

27

27


SF1341
1000.
100.
19.35
20025
77.0
26

Ye

ae

20.

12.0

8.0
11.25
22.55
22.0
17.50
50.
10.
57.0
2.40
128.0
38.10
32.0
447.22
25.17
21.8
20283
19.8
16.0
6635

+76

50.0
17.0
18.0
19.0
19.0

15
MPA
DEG C
N/MM

BAR
LITRE
KM
DEG C
NM

ML

REF

DEG TOL
ML

ML

ML

DEG T
DEG C
DEG TOL
DEG TOL
DEG TOL
ML

ML

KM
KM

KM
KM

DEEP

STOP

7.0
1.5

12.25

0.5
0.05
0.051

0.0505

INPUT

4.0 200

0.
47633
15460

DEG TOL 20.00
ML

712.00+

Sample 2

32

NEG Fo

SAMPLE 2

123800
123900
124000
124100
124200
124300
124400
124500
124600
124700
124800
12490n
125000
125100
125200
125300
125400
125500
125609
125700
125800
125900
126009
126100
126200
126309
126400
126500
12669n
126700
126800
126900
127000
127100
127200
127300
127400
127500
127600
127709
127800
127909
128000
128100
128200
128300
128400
128500
128600
128700
128809
128900
129000
129100
129200
129309
129400
129500
129600


& Tidiws
SKdvnou

1074

YSISIANSOL WOST 9930
w4ISILNagl W93aT1 9930

AdAL YOuNS waLaTLn3al
"(S)d0ted du 3dAL BWUS HLIM (S)GUYD VLiVU INdNI 3HL Suv

u T T oO SEN
Sd3Isisnaut YaHLO bw SNOILIGOV SONVHD
Gsaqy SNWINTOD LNdLNO
30 a3unies 30 NauANN

S1dVL NOISHSANOD AYVWOLSND

mend
o*se

NOISN3WIG
MO738 G31S11
setero

Y3SWON
Luvd

A = JTuLay

n2


tooling and gauging in the U.S. Customary units. To change or define these parts
in metric units would accomplish nothing and result in an unnecessary expense with
no return. Therefore, existing drawings can remain in inches until the last
stages of the conversion program; when most drawings and manufacturing equipment
are in metric, It may then be desirable to convert the drawings of inch designed

parts that are still being manufactured.

New parts, assemblies and groups are designed and dimensioned in metric units.
Ideal metric modules can be used unless the dimension defines a size or interface
requirement that originated in U.S. Customary units; then direct conversions of
the U.S. Customary units must be specified. The end result of this practice is

a "new product" consisting of parts defined in both U.S. Customary units and
metric units. However, neither the part nor the customer can tell the difference

since one can manufacture and measure anything in either measurement system.

C. PROBLEM DEFINII/ N

1. Conversiou Capability
The METCO program converts dimensions in any of 31 different metric units to
equivalent dimensions in U.S. Customary units. Column 1 of Figure 4 lists the
units that the program will accept. Column 2 lists the corresponding U.S.
Customary units of the output. These 31 "standard" conversions are built into

the system.

Several options exist for changing or adding metric units to the program. The

user may:

11


FEDERAL INFORMATION PROCESSING STANDARD SOFTWARE SUMMARY

01. Summary date] 02. Summary prepared by (Name and Phone) 03. Summary action
Yr. [Mo. Day | Ruth K. Anderson, (301) 921-3551 New Replacement ——_Deletinn
| 7h, Lol sll) 05. Software titte @ a o
Ss seltwars $218} General Motors Corporation Millimetre to Inch Previous Internal Software 10
Wr} Me. 0% Conversion Program
7/4} of si 2] 1 (07, Internal Software 1D
06. Short title GMME’
08. Software type 09. Processing mode 10. 1 Application area
Automated Data ‘Computer Systems: Management/
System Interactive ] Supportutitity  Businese
‘Computer Program Batch {K] Scientific/Engineering ( Process Controt
{D Subroutine/ Module [] Combination () Bibliographic/Textual ‘Other
11. Submitting organization and address 12, Technical contact(s) and phone
Institute for Computer Sciences and Technology Dr. Joseph 0, Harrison, Jr.
National Bureau of Standards (301) 921-3551
Washington, D.C. 20234
413, Narrative Program was developed by General Motors Corporation to convert millimetre

dimensions to inches. The user has the option of requesting instructions from the program
in entering data from the termipal. The program is written in a portable version or FORTRAN

and is essentially machine-independent. It has been tested on the UNIVAC 1108 the PpP-1C
and the IBM 370.

‘14. Keywords
METRIC, MILLIMETRE CONVERSION
| 15. Computer manufr and model | 16. Computer operating system 17. Programing language(s) 18. Number of source program state-
American National Stan+ TM**ts

See narrative n/a dard FORTRAN X3.9-1966 approximately 400
19. Computer memory requirements | 20. Tape drives 21. Disk/Drum units (22. Terminals
12,000 words (UNIVAC 1 (or other scratch 0 1
1108) external device)

23, Other operational requirements

24, Software availability 25. Documentation availability

Available Umited In-house only Availabie Inadequate In-house only
o Oo i Qo ia

26. FOR SUBMITTING ORGANIZATION USE

ia5-107 FIGURE 2 Standard Farm 108

1974 Ju
USS. Dept, of Commerce—NOS


At NBS, thanks are due to Dr. Hans J. Oser, Chief, Mathematical Analysis Section,
Applied Mathematics Division, under whose direction the testing and validation
were done, as well as to other members of the Applied Mathematics Division who
contributed to the testing and supplied material for the documentation: William
G. Hall, Frederick C. Johnson, Russell A. Kirsch, Daniel W. Lozier, and Donald

J. Orser.

Other NBS persons to whom thanks are due are Margaret R. Fox, Acting Chief, Com-
puter Information Section, Information Technology Division, Institute for Computer
Sciences and Technology, for her assistance with the documentation; J. Paul Cali,
Chief, and Thomas W. Mears of the Office of Standard Reference Materials, Institute
for Materials Research, for their work in distributing the program package; and Louis
E. Barbrow, Coordinator of Metric Activities, Engineering and Product Standards
Division, Institute for Applied Technology, for serving as an advisor and review-
ing the document. Thanks are also due to M. Zane Thornton, Deputy Director,
Institute for Computer Sciences and Technology; Gordon B. Fields, NBS Staff
Attorney; Dr. H. Thomas Yolken, Deputy Chief, Office of Standard Reference
Materials; and Jeffrey V. Odom, Chief, Metric Information Office for reviewing

all or part of the document.


C WHETHER THAT HAS BEEN DONE. FOR REJECTION® OTH AMe THE ST7Ee
€ AND NOr THE TOLERANCE» MUST RE THE SAME,

31 CONTINUE

32 CONTINUE
IF (JeGTeN2)GOTO 34
IF CAM(1T) .NE*AM(J))GOTO 31
IF(ND(I) .NE«ND(J))GOTO 31
N2=N2~1
ISWP=1
DO 33 K=drN2
K1=K+1
AM(K)=AM(K1)
ND(K) =ND(K1)
33 CONTINUE
GOTO 32
34 CONTINUE
IF CISWP.EQs1) WRITE (IWRITE® 35)
35 FORMAT(/34H DUPLICATE MEASUREMENT(S) PEMOVED./)

THE PAUSE IS NEEDED TO PUT IN THE SPECIAL TRANSPAPENT ©RINTOUT
PAPER. THE C IN COL. 1 SHOULD RE REMOVED IF THIS OPTION TS WANTED
PAUSE

REWIND IUNIT
WRITE CIWRITE’ 3) IBLANKe (LA(1) + T=1eL11)
WRITE (IUNIT*® 36)

36 FORMAT (6(7X + 2HMMe 5X9 GHC INCH) 0 1X) )
REWIND IUNIT
NC=21*IW
READ(IUNIT?3) (L(I) eI=19NC)
WRITE CIWRITE? 37)

37 FORMAT(1H )

WRITECIWRITE?3) (LOCI) e T=1 9 NC)
WRITE (IWRITE? 37)
REWINN TUNIT
NL=(N2+IW-1)/IW

anno

C THE NEXT DO LOOP PRINTS THE OUTPUT.
1=0
DO 51 I1=1°N1i
K1=1
K2=NH

THE NEXT DO LOOP PREPARES ONE LINE OF THE TARLE. EACH TIME
THROUGH ONE PAIR OF COLUMNS IS PREPARED.

DO 47 12=1+Iw

IsIti

IF(I+GTeN2)GOTO 44

CALL CONVMM(AM(T) »ND(T) USC(I))

IF(ND(T) -LTo1) WRITE CIUNIT? 38) AM(T) pUSC(T)

ao00

124


poosy
sare
pores
sane

o Tavs,
Smtiviae

Avaits
Asis
Adkins
Abas

AaVvHOHAL V Sa
AuvuOdhal V Si
AovsOawdL ¥ Si
AGvHOGNSL V SL

401d Saal.

*(S)U0dus dU BdAL SRUS HALIM

DH nite

ane
Slo, eae
SIna see

ore
Avail
Gaduy

40 wai

da1slangaL WIT WN
asl 4Lina0l Wwo3TH, 38
w41d1.N301 WITH HOW
eal STANT WIT 338

3dAl yOvUs = UST ATANSOL

oro0t
Sek
stat
eso

NOISNAWIG

(S)0MV9 VIVE 4NdNI 3HL uy MOT3e O31S17

ovuses cgnuete I- aH/ONNOd Hox
oouoort GooeL*9uZ T= BHGH/AL HMY/ PW
vouut? coauLtgee HONT W ¥930
aouor* audeetes = oT HONT 4aL3W
vouoc* enego" te £14/97 Wom
vouoort eouou't 0 eWo79 £6979
oouoo"T d0nohtod — 0 204/20 awsom
vouoes ToousnuZe T= cal OW
oouot* agnue*e t a om
oouoT* onLes*s v Z0 oH
gouges Leseo* I- 20 9
Guugu Gowuett I- £04 w
ouuats oLgso'T T 10 Tea)
oouots cotuets v 817 20 a
oouuo* Teno" Te 811 zo 617 owo
oouuos zuigo" I- NI ew
oouot Guget*T T 2aa 2
o0u00" GOust* te ent ew
o0u00* ssToo* Te 2NT eu
o0Got* Zetec? 1 37IW WM
oov00" oeoue*e I- 14 Ww
vov90" oudeers T- HONT wa
oouone oLgoe? I- HONT wo
vouot? Lsoe* T suW wn
oovooe otutets co HONI/E7 WH/N
oouot* oLeve't 1 HONT 20 Wo
gouoo* gGeec* Is 4387 WN
oovoo Quoteshez = Te 4a7 Nx
Oouuos Tenee? Te 387 N
oovoe"t ouous't Oo. oL 930 or 930
oovoo't oovge't= oo 4 936 2 930
00000°T Ooono’sntT 0 Isd van
vouoo* osnto I- Isd uven
oouo0rt oonus*ht =o Isa uve
Arn woLowd BNOTWHOSL ano NI
ONLGNNOY = —-UTSYIANOD NNO MBI4TAN3OI  Y31411N301
me = FTWVL NOISH3ANOD NI S3TYAN3 40 Y3WAN

ort ore 0 ° 848989
AsHLO Whe = SNOTLTGGv BONVHD agen
SWANIIOD Lid4Nd lave

30 Sadan

FIGVL NOTSUBANOD AYYWOASNI *S*N = JTHLZW

102


APPENDIX III

LISTING

61


Rounding Method 3 (Code 0)

Converted dimensions are rounded to whole numbers but retain a maximum of three

significant digits. Zeros are used as required.

Example: Computed Value Rounded Value
~ 0034864 0.
+ 34864 0.
3.4864 3.
34864. 34900.

In the program itself, these three methods are referred to by the codes -1,

1, 0 respectively.

D. APPLICATION INFORMATION
1. Input
Data is entered in units of data sets consisting of 500 or less dimensions each.

Normally a data set will consist of all the dimensions on a single drawing.

Punched cards are used as input and there are three different card types for each
data set:

Header Card

Special Identifier Card (optional)

Data Card
If the user is entering dimensions in any of the 31 metric units ordinarily
accepted by thé program, he will use one header card followed by one or more
data cards. If he is inputting dimensions in metric units not included in the
list of 31, he must complete a special identifier card for each unit. A typical

deck set-up for a single data set would appear as in figure 6.

16


NBS-114A (REV. 7-73)

U.S. DEPT. OF COMM. 1. PUBLICATION OR REPORT NO. 2. Gov't Accession | 3. Recipient’s Accession No.
BIBLIOGRAPHIC DATA No.
SHEET. NBS TN-872

‘4. TITLE AND SUBTITLE 5. Publication Date

COMPUTER PROGRAM PACKAGE FOR METRIC CONVERSION: July 1975

REFERENCE MANUAL 6, Performing Organization Code

7. AUTHOR(S) : 8. Performing Organ. Report No.

Ruth K. Anderson and Joseph 0. Harrison, Jr
9. PERFORMING ORGANIZATION NAME AND ADDRESS 10. Project/Task/Work Unit No.

NATIONAL BUREAU OF STANDARDS
DEPARTMENT OF COMMERCE
WASHINGTON, D.C. 20234

11, Contract/Grant No.

12. Sponsoring Organization Name and Complete Address (Street, City, State, ZIP) 13. Type of Report & Period
‘overe
Same as Item 9 Final

14. Sponsoring Agency Code

15. SUPPLEMENTARY NOTES
Library of Congress Catalog Card Number: 75-600045

16. ABSTRACT (A 200-word or less factual summary of most significant information. If document includes a significant
bibliography or literature survey, mention it here.) The programs in this package are designed to conver
dimensions and other quantities appearing on engineering drawings from metric to U. S.
customary units and vice versa. They were developed by Caterpillar Tractor Co. and
General Motors Corporation. In addition to the programs themselves, the package contains
documentation explaining how to get the programs running on different computers and how
to use them, and test problems to permit users to verify that the programs run correctly
on their own computers. The Caterpillar program converts 31 different metric units to
their U. S. customary equivalents. In contrast, the General Motors programs convert in
both directions but work with millimetres and inches only. The General Motors programs
also use rounding conventions differing somewhat from those employed in the Caterpillar
Program. Both the Caterpillar and the General Motors programs are written in American
National Standard FORTRAN and are suitable for use on a wide range of computers with
little or no modification. The Caterpillar program is operated in batch mode while the
General Motors programs are interactive.

17. KEY WORDS (six to twelve entries; alphabetical order; capitalize only the first letter of the first key word unless a proper

name; separated by semicolons) Caterpillar Tractor Co.; computer program; documentation;
lengineering drawing; General Motors Corporation; metric conversion; rounding; test
problem: tolerance

i 19. SECURITY CLASS 21, NO. OF PAGES.
18. AVAILABILITY {X2 Unlimited CEnis REPORD
(C For Official Distribution. Do Not Release to NTIS 145
UNCLASSIFIED
{X) Order From Sup. of Doc., U.S. Government Papeing: fice 20. SECURITY CLASS 22. Price
~ Washington, D.C. 20402, SD Cat. No. C13« 40? (THIS PAGE)
Order From National Technical Information Service (NTIS) $2.10
a Springfield, Virginia 22151 UNCLASSIFIED

USCOMM.OG 290a2-P74


The package consists of computer programs developed by Caterpillar Tractor Co. and
General Motors Corporation, documentation explaining how to get the programs run-
ning on different computers and how to use them, and test problems to permit users

to verify that the programs run correctly on their own computers.

The programs' main advantage is in providing the design engineer with control over
the accuracy of the conversion process and the tolerances to be maintained. In
this way, errors and costs that would be unavoidable in a shop where everyone
makes his own conversions are eliminated. Control at the design level also
increases productivity by speeding up the manufacturing process and providing

an automatic self-checking system that is essentially error-free.

The Caterpillar part of this package consists of a single program that converts
31 different metric units to their U.S. customary equivalents. There are two
General Motors programs, however. One of them converts from millimetres to
inches while the other converts in the reverse direction. jimensions other than
millimetres and inches are not converted. The General Motors programs use
rounding conventions somewhat different from those employed in the Caterpillar
program. Both the Caterpillar and the General Motors programs are written in
American National Standard Fortran!4] and are suitable for use on a wide range
of computers with little or no modification. The Caterpillar program is operated

in the batch mode while the General Motors programs are interactive.

The NBS role was to assemble the documentation from material supplied by Cater-
pillar Tractor Co. and General Motors Corporation, to validate the programs, and

to distribute the package. The NBS validation consisted of testing to determine


38
39
40
41
42
43
44

45

46

47

4B
49

50
SL

c
C THE

92
53

Sa
55

Cc

Cc SUB!

CALL CONVINCAM(T) eND(T) USCC) )

IF (ND(1) sLToL) WRITE (CIUNIT? 38) USC(T) 6 A(T)
FORMAT (F7.00F8.004X)

IFCND(T) 2EQe L)WRITECTUNITs 39) USC(T) 2 A(T)
FORMAT (F7.00F9019 3X)

IF(ND(T) -EQ62)WRITECIUNITe4O)UISC(T) pAMCT)
FORMAT (FBe19F90202X)

IF(ND(T) -EQ@e3) WRITE CIUNTT #41) USC(T) @ A(T)
FORMAT (F9.20F90301X)

IF(ND(T) -EQe4) WRITE (CTUNT Ts 42)USC(T) »AM(T)
FORMAT (F10.30F 904)

TF (ND(T) GT 64) WRITE (TUNTT 643)
FORMAT(19(1H ))

GOTO 45

CONTINUE

WRITE (IUNTT*#43)

CONTINUE

REWIND IUNIT
READ(IUNIT #46) (LL(K) #K=K1 9 K2)

REWIND IUNIT

FORMAT(19A1)

1+NH

K2=K2+NH

CONTINUE

K2=K2-NH

K3=K2+1

NO 48 J=1leK2

K=K3~-J

IF(LL(K) «NE*IRLANK)GOTO 49

CONTINUE

CONTINUE

WRITE CIWRITE? 50) (LLG) @J=1 eK)
FORMAT(G(3ALe1Xe15ALe 1X9 AI) )

CONTINUE

TABLE HAS BEEN COMPLETFN SO ASK IF THERE TS ANOTHEO ONE,

WRITE CIWRITE?S2)

FORMAT(//37H ENTER THE IDENTIFICATION (COMMA) AMDy

125H wIOTH FOR ANOTHER TARLE./

150H TO END PROGRAM? ENTER ANY ALPHARETICA!
ISwi=t

REWIND TUNIT

GOTO 2

CONTINUE

WRITE (IWRTTE?*55)

CHARACTER.)

FORMAT(48H THERE HAS Rf EN AN FRROR TM FNTERING THE MANTMLIMy
113H TABLE WIDTH./42H PLEASE PFENTFR THE INENTTFICATION

113H TABLE WIDTH./)
REWIND TUNIT

GOTO 2

END -

SUBROUTINE CONVIN(ArN eA)

ROUTINE CONVIN CONVERTS INCHES Ar TNTO MILLIMETPES+ 9,

133

AND Tre


Item

Rounding unit

Column No.

Description

37-45

Indicate the smallest increment that the
program should recognize in the rounded
dimension. This will normally be one unit
in the last place retained, but not
necessarily so. It could, for example, be
5 units in the last place retained which
would permit rounding to 1/2 of the next
larget unit; or 25 units in the last place
retained which would permit rounding to 1/4
of the next after the next larger unit.

The rounding must be an integral multiple of
one unit in the least significant decimal
place retained. It should be left blank
with round technique code -1 but always
used with round technique codes 0-5.

21


+9007
0010
+063
+006
+009
202

205

+08

el

4

+7

Led

25

17.5
1765
850.001
850.004
850.007

A12.358

9mM7107
B5e
Heb

5.5
Bed
14.
17.
2265
9

29.5
48.5

KG/H
MK /K Wh
MJ/KWH

GRAM
LITRE
ALD
LITRE
LITRE
LITRE
LITRE
LITRE
LITRE
LITRE
LITRE
LITRE

20908
#901
2904
007
2010
203
296
Pal)
>

5
8
Pal

17

B50.nn2

850.095

850.008

0.0
100.0
ioan.an
190.0
12M.
256

100
10.005
1900.0

KG/H
Kes

NEC C
NOM
uM
KM
a2
ob
Ma
KG
KG/m3

29909
290:

290
00
Oh
My
007
010
3
oA
Ac)
1.0
75

850.902
850.906
8506009

5.0
ano
lo.

1n90c.

iro

ind
10.

2
5
a

of
sc

on

90

wom
MG KW EL

nee To
Ge

C

main
cut

6
KOsND

SAMPLE 5

127900
128800
133100
13R000
138390
138400
1RA500
AzsAne
138700
1zAaPOO
138900
1zannn
129100
139200
139200
139400
129500
129600
139700
1*990n
1s9a00n
teon0e
1s010n
120200
1ad3z0r
1egann
120500
1anaan
1H070n
1unAon
yanoon
1atoan
tation
1eipan
14i3g0ae
Antane
141500
14a1Edn
141700
141899
d4aiann
142009
12109
142200
182300
1424unn
14250
14260n
14270n
1u2ann
14290n
14a300n
143407
143200


c

C REJECT ANY DUPLICATE MEASUREVFNTS, ISP TS THO SeETCH TyaT Terie
C WHETHER THAT HAS REEN' DONE. FOR REJECTION® MOTH AM, TUF Star,

C AND NNe THE TOLERANCE, MUST AF THE SAME,

ISWP=0

31 CONTINUE
I=I+1

32 CONTINUE
IF (JUeGT.N2)GOTO 34
IFCAM(T) eNE*AM(J))G60TO 31
IF(NO(T) «NESND(J)IGOTO 31
N2=N;

K1=K+1
AM(K)=AM(K1)
NOD (K)=ND(K1)
33 CONTINUE
60TO 32
34 CONTINUE
IF CISWP.EO. 1) WRITE (THRTTE 35)
35 FORMAT(/34H DUPLICATE MEASUREMENT(S) 9F WEN, 7)

THE PAUSE IS NFEDEN To PUT Tit THE SPECTAL TRANSPAPFET ORTeToUT
PAPER. THE C IN COL. 1 SHOULD BE PEMOVED TF THTS optics Is Harter
PAUSE
REWIND IUNIT
WRITE (IWRITE® 3) ISLANKe (LUCT) oTH1eL 11)
WRITE (IUNIT #36)
36 FORMAT (6 (7X9 2HMM + 5X 6 GH (THCH) 6 1X) )
REWIND IUNIT
NC=21*IW
READ (IUNIT# 3) (LCT) ep T=19NC)
WRITE (IWRITE® 37)
37 FORMAT(1H )
WRITE (LWRITE* 3) (LOT) 9 T= 1 9NC)
WRITE (IWRITE? 37)
REWIND TUNIT
N1=(H2+IW=1) /T

anaa

c
C THE NEXT DO LOOP PRINTS THE OUTPUT.
I=0
NO S1 T1=16N1
K1=1
K2=NH.

THE NEXT DO LOOP PREPARES ONE LINE OF THF TARLE. ESCH TIME
THROUGH ONE PAIR OF COLUMNS IS PREPARE,

DO 47 12=191w

I=I+1

IF(1eGT.N2)GOTO 44

a00

132


aanaaanaAAAD

WBN FUE ODIO FUN WODVNouFuUne

BVOHFUNE

LABEL (S¢

100)

4Aar T10

THIS ARRAY STORES THE FOLLOWING -
(FIRST 4& CHARACTFRS)
(LAST 4 CHARACTERS)

LABEL (1)
LAREL (2)
LAREL(3)
LABEL (4)
LABEL(5)
-1
0
1705

INPUT IDENTIFIER
INPUT IDENTIFIFR
OUTPUT IDENTIFIER
OUTPUT IDENTIFIER

ROUND TECHNIQUE CONE
3 SIGNIFICANT DIGITS ONLY

ROUND
ROUND

DATA LABO1(01)+

LABOL

(06)9

LABO1(11)¢

LaBo1

(16)6

LABOL(21)¢

4H ’
4HBAR ¢
4HMRAR?
GHMPA +
4HDEG +

DATA

SH
4H
GH
SH
GHC

LABO2(01)>

LABO2(06)+
LABO2(11)+
LABO2(16)+
LABO2(21)+

GHOEG ¢
4HN ,
4HKN op
4GHNMo¢
4HGM +

DATA

4SHTOL
4H
4H
4H
4H

LABO3(O1)+

LABO3(06) 6
LABO3(11)+
LABO3(16)¢
LABO3(21)+

4HN/MM»
4HUM +
4HCM +
4HOM +
4HM or

DATA

4H
4H
4H
4H
SH

LABO4 (O01) +

LAB04(05) +
LABO4(11)>
LABNG(16)6
LABN4 (21) 6

GHKM oF
4HMM2 +
4HCM2 6
4HM2 6

4H
4H
4H
4H

LARO1(02)¢
LABOL(07)+
LABOS(12)+
LAROL(L7)+
LABO1(22) +
4HBLAN®
4HPST +
4HPSI +
4HPSI +
4HDES +

LABN2(02)
LABN2(07)
LaBo2(12)
LARN2(17)
LaBN2 (22)
4HNEG »
4GHLAF +
GHLBF +
GHLR Fe
GHOZ Te

Lann3(a2)
LABO3(07)
LABO3(12)
LABN3(17)
LABO3(22)
4HLB/T+
GHMILSe
4HINCHe
4HINCH®
GHFT +

LABO4 (02)
LARO0n (07)
LABO4 (12)
LABN4 (17)
LARNa (22)
GHMILE?
GHIN2 +
4HIN2 +
4HYN?2 +

TO NFAREST WHOLE. NUMRER
TO NEAREST Mele 1601" FTC.

LAROL(OR) +
LABO1(09)>
LABNL(12)6
LABOI(19)>
LABOL(23)»
4GHK ,

Or
4H , Ne
4H ed a
4H , Or
4HE ’ 0

LABOA (03) +
LABN? (0%) >
LABN2(13)¢
LABN2 (19) 6
LABO2(2%)»
4HTOL + 0

4H ee a
OH ponte
4HT oomde
@HNCH + 1

LABOS(O3)+
LABOZ(OR) +
LABNZ (1%) 6
LABNA(19) 6
LABN3(23)+

4HNCH ¢ te
BH . de
OH eomte
4H roots
4H soot

LAROG (G3)
LAROG(N9)+
LABO4(12)+
LABNE (12) >
LABON4(23)>

4H , Ve
4H root
4H , —1s
4H 1 oot

83

(FIRST 4 CHARACTEFS)
(LAST 4& CHARACTERS)

LABOL(O4) +
LABOI(U9)®
LABOL(IG)
LABOIC1O) +
LABOI (24) >

/

Lanoa(ndys
LARN2(NAV¢
LABO2 (14%
LAP OA CTO)»
LABN? (2005

7

LARN3Z (OG)
LABNS(IOVe
LAROAC1U)»
VLABNz(12)>
LARCRC2U)»

Jv

PABNU CORY»
LABAN COO)»
LAROUCLE) >
LABPU CTI
LABOU (28.5

LABITCO5)»
LABATCIO)»
LABOL(15) +
LABAI (2D)
Parnas (98)

Tanne (s5)
EAPO? (IM
LABOO(15) +
LAROOCEDY
Laang(ss)

LAROZCOS) es
LABCECION)
LABORCTE) +
LARNA(DN) »
Tara(os)

APAL(FS)
AOU CTO?
ABU CTR)»
ABON(2N)»
ABAK (25)

/

13400
1938n0
1n360n
193709
aAaagn
An3enn
in4noo
ineian
inkean
1nuron
19han9
inason
Tnaaan
Loa7nn
Ingann
inbonn
insaqge
losing
195200
1e53aq
1as4qa
1nssn
1A5Ann
1ns7an
insana
1nsagn
in6nnn
1n6189
ins2nr
ingzce
1n64unn
rsasan
In6enn
196709
1n6eco
1n6ann
197ann
V7"
An7eqn
LA7RAN
1e7KAN
Lo7sae
1n7aoo
197769
197aen
1n7on9
Loanan
prerae
19Roqn
qaarna

Taegan
yoezin


that the programs run correctly on different computers and that they perform in

accordance with the documentation.

More specifically, the programs were tested with the Bell Telephone Laboratories'
Verifier Progran!?] for compliance with standard FORTRAN, and in addition, each
program was compiled and executed on several different computers with test data.
In particular, the Caterpillar Program was tested on an IBM 370/165 under OS and
on a CDC 6400 under SCOPE 3.0. The GM Programs were tested on an IBM 370/165
under TSO, and all three programs were tested on a UNIVAC 1108 under EXEC VIII

and on a PDP-10 under DECsystem-10.
II CONVERSION PACKAGE COMPONENTS
This package consists of two parts--a magnetic tape and this document.
A. TAPE
The tape is a standard 1/2 inch wide 600 foot long reel. It is recorded in

FORTRAN and is available in six versions so far as numbers of tracks, code,

density and parity are concerned:

No. of

Tracks Code Density Parity
9 ASCII 800 Odd
9 ASCII 1600 Odd
9 EBCDIC 800 Odd
9 EBCDIC 1600 Odd
7 BCD 556 Even
7 BCD 800 Even

The printed label on the tape reel identifies the version. Hexadecimal or octal
representations of the FORTRAN Characters in ASCII, EBCDIC and BCD as used on

the tape are given in Appendix II.


29.9 31.0 122500

40.15 44.44 132609

54.755 69.75 132700

85.65 405.0 132800

132900

1300. 1400. 133000

1700. 1A09. 123100

133209

133300

KG 133400

N 123590

ML 133600

LITRE 133700

100.224 133A00
Qe BAR 1%390n
10. Nv 13400r
2. KM 14100
50.0 1342N0
125.0 134300
38.10 1z44un4
32.0 134500
25-17 1s4ann
124700

134e0n

134ann

1350nNn

1"5190

135200

135300

0.5 135400

0.05 135500

0-051 1a5A0N

0.0505 . 135700

SToP 1x5A00

680878 0 20 le Ped SAMPLE 4 1s5anf
MJ/KWH BTU/HPHR “1706.79 1.0 136000
KG/H POUND/HR 1262986 0.225 136190
9.52 REF 16207
9.40 0.05 136300
12.5 1.5 126400
70.0 136590
28.0 136690
325.0 126700
26560 136809
22060 1369900
160-0 127000
66.0 137109
47.0 137200
18.0 137300
34.0 137409
90.0 137509
140.0 127509
20001 «7002 29093 137790
20004 20005 2n0n6 137800

89


63.5

1025.0

om

DM
DM

1595N0
15960"
189700
159800
1s9anN
14a0nAn
1anion
1AN2Z00
1A0300
1snunn
1LAN50N
1460690n
dan700
1RORON
1Anenn
tenon
tation
LAL20q
141309
161409
1ALsan
JA160n
1LA1 700
161800
141900
14A2non
1A2100
162200
142590
1A240n
1e25nn
162600
142700
1a2nnn
JAeann
LaAanon
1463190
14643209
163300
1A3K0n
(A350
1A36NN
143700
143a6n
16390n
tagonn
1A4INA
164200
164300
1A44On
deasan
LA4BON
1464700
1éuean


PART 953144 CHANGE 1

MM INCH MM INCH MM INCH mM TNCH
00001 0 1.3 051 «720 21.8 ASS
200002 «000001 1.375 00541 0221 22.0 +846
0008 00003 1.38 0054 2 ?24 25.0 ORG
001 0 1.5 2059 0226 25.17 2091
010 0004 1.55 061 e231 26.0 1.926
013 0005 1.42 064 A010 6 ?36 27.500 1.9927
020 0008 1.75 069 660 0? 36 30.860 1.2159
003 6001 1.81 O71 6635 «250 32.0 1.260
0040 +0016 1.86 2073 Gott 0252 38.0 1.406
2049 0019 1.875 ©0738 6-425 260° 38.10 1.500
205 002 1.88 0074 6.9 0972 49.0 1.575
0505 «00199 2.00 2079 7.00 2276 41.0 1.614
2051 0020 2.0 0079 Ten 0276 45.0 1.772
006 002 2.06 081 7.365 62900 46.0 1.811
008 003 2.12 0835, 7.50 2?95 50.9 1.969
ol 2004 2046 2097 7.75 2305 504 1,969
012 005 2.50 098 Ban 0315 53.82 9.419
015 +006 2.55 +100 8.00 e715 54.23 2.135
019 +007 2057 011 9.25 0 364 57.0 9,24u
21 +008 2.62 0103 968 X74 60.8 2,308
022 009 2.69 01M 10.0 0704 63.5 Pesan
025 2010 2074 0108 11.90 Purr] 67.0 PASE
231 2012 2.75 +198 11.25 +443 73.0 D> RTH
038 015 2077 109 12.0 e472 74.259 2 92R%D
ob 2017 2.82 elll 12. 072 10A, 3937
05 020 2.88 0113 12.50 0492 12%. He 4%
250 020 3.0 «118 13.0 2512 123.5 196?
256 2022 3.2 «119 13.40 0528 12.0 5.07
062 2024 3.05 120 14.0 551 55R.n 21.9H9
718 +0283 3.06 ©1290 14.25 561 sano 22.835
7417 02920 3.07 0121 15.0 2591 762.0 ANON
075 +030 3.50 0138 15. 591 915.9 3q.084
076 030 3.62 0143 15.50 2610 1990.09 9,370
«781 ©0307 34623 ©1426 15.88 0625 1990.0 ao,is7
079 0031 3.75 143 16.0 0630 1925.0 40.354
281 2032 3.875 #1526 17.0 ABD 1190.9 4X30?
2812 0320 3.88 2153. 17.00 6 fAD 1200.9 NT. 2K4
08 2035 4.00 2157 17.50 +689 1270.0 ea,ann
1.0 2039 4.0 0157 18.0 0799 1300.9 5t.1At
1.00 2039 4.50 0177 18.50 2728 1473.0 57.002
1.06 0042 4.75 +187 19.0 0748, 1594.0 AN.age
1.12 2044 4.88 0192 19.8 2780 1535.0 60.43%
1.16 2046 5.9 197 20.0 TNT 1829.0 72.908
1.19 2047 5.00 0197 20.125 «792% soad.n 2nn.noe
1.25 0049 5.12 0202 20.83 +820 5335.0 PIN NIe


REFERENCES

American Standard FORTRAN, X3.9-1966 American Standards Association,
Available from American National Standards Institute, 1430 Broadway,

New York, N.Y. 10018.

B. G. Ryder, "The FORTRAN Verifier: Users' Guide". The Bell Laboratories,
Computing Science Technical Report #12. Bell Telephone Laboratories, Inc.,
Murray Hill, New Jersey 07974.

SAE Standard, Dual Dimensioning - SAE J390, July 1970. The Society of
Automotive Engineers, 2 Pennsylvania Plaza, New York, N.Y. 10001; after
September 1974, 400 Commonwealth Drive, Warrendale, Pennsylvania 15096.
SAE Handbook Supplement HS J1066, Recommended Guidelines for Company
Metrication Programs in the Metal Working Industry, July 1974. The Society
of Automotive Engineers, 2 Pennsylvania Plaza, New York, N.Y. 10001; after
September 1974, 400 Commonwealth Drive, Warrendale, Pennsylvania 15096.
American Society for Testing and Materials - Metric Practice Guide

E 380-72E. Also designated as American National Standard 2210.1-1973.
American Society for Testing and Materials, 1916 Race St., Philadelphia,
Pennsylvania 19103.

Draft International Standard ISO/DIS2955 submitted 11 January 1973,
Representations for SI and Other Units to be Used in Systems with Limited
Character Sets.

American National Standard 225.1-1940 reaffirmed 1961, "Rules for Rounding
off Numerical Values." Available from American National Standards Institute,

1430: Broadway, New York, N.Y. 10018.

57


THIS IS FILE 1 OF A MAGNETIC TAPE CONTAINING PROGRAMS FOR
CONVERSION BETWEEN METRIC AND U.S. CUSTOMARY UNITS* PLUS TEST
DATA AND TEST OUTPUT FOR ONE OF THEM. THE PROGRAMS+ TEST DATA
AND TEST OUTPUT EXIST AS SEPARATE FILES On THE TAPE. EACH FILE
IS TERMINATED BY A TAPE MARK (END-OF-FILE MARK)» EXCEPT THE
LAST FILE IS TERMINATED BY TWO TAPE MARKS. PROGRAMS AND TEST
DATA ARE REPRESENTED BY 80-CHARACTER CARD IMAGES+ 9 CARD IMAGES
PER PHYSICAL TAPE BLOCK. TEST OUTPUT IS REPRESENTED RY 132-
CHARACTER PRINT LINE IMAGESe 3 PRINT LINE IMAGES PER PHYSICAL
TAPE BLOCK. THE CONTENTS OF THE FILES ON THTS TAPE ARE eee

FILE 2. PROGRAM METCOr METRIC TO U.S. CUSTOMARY CONVERSION.
SOURCE CATERPILLAR TRACTOR COMPANY.
LANGUAGE. +. AMERICAN NATIONAL STANDARD FORTRANe

FILE 3. TEST DATA FOR FILE 2+

FILE 4 TEST OUTPUT FOR FILE 2.

FILE 5. PROGRAM GMMETRe MILLIMETRE TO INCH CONVERSION.
SOURCE GENERAL MOTORS CORPORATION.
LANGUAGE+ + eAMERICAN NATIONAL STANDARD FORTRAN
FEATURES++.eDESIGNED FOR DEMAND TERMINAL USAGE.

FILE 6. PROGRAMeseGmanCHe INCH TO MILLIMETRE CONVERSION.
SOURCE.+eGENERAL MOTORS CORPORATION.
LANGUAGE.» AMERICAN NATIONAL STANDARD FORTRANS
FEATURES.» eDESIGNEt) FOR DEMAND TERMINAL USAGE.

63


III METCO PROGRAM

A. ABSTRACT

A computer program which accepts metric units and converts them to U.S. Customary
units has been developed by Caterpillar-Tractor Co. The program is written in
American National Standard FORTRAN and is being made available to the general
public through the National Bureau of Standards. Both the input metric units and
the output equivalent U.S. Customary units are printed in tabular format conven-

dent for attaching to or copying on an engineering drawing.

The units and methods in the program are specialized to the needs of mechanical
design and manufacture. Even though the designer and the man in the shop may be
able to work in metric measure, others in the Process flow, such as material
control groups, data processing groups, purchasing groups, etc., will require a
conversion chart in order to be able to conveniently intermix requirements for

metric and U.S. Customary designed parts.

B. BACKGROUND INFORMATION*

This computer program was developed by Caterpillar Tractor Co. to generate metric
drawing conversion charts. The Company has turned the program over to the National
Bureau of Standards for distribution to the general public. While Caterpillar
Tractor Co. and the National Bureau of Standards believe that the information con-
tained herein is complete and correct, they disclaim any and all liability that

may still exist or any responsibility for updating any of the information.

————
*This section was written by Joseph G. Langenstein of Caterpillar Tractor Co.


9A3099
0.5
100-0
47.55
50.00
16645
40.45
29.39
8.20
0.25
7.0
120.0
0.8
(Let
50.0
57.15
0.02
4BN.

953144
METRE
57.0
566
19.35
30-860
5.6
200.0
300.0
400.0
500.0
1000.0
10.0
1.00
135.44
14.95
1.5
11.00
75.0
1.00
10.0
20.0
10.0
0.01
12

12.
012
00123

LITRE
LITRE
LITRE
GRAM

LITRE
LITRE
STOP

MPA
STOP
1

TNCH
N/MM

OM
cM
HG
OL
MPA

N/MM

REF

DEG C
MPA

1.0
4.0
139.57
0.013
10.0 MPA
Ol
1.0
5
10090.c0
1200.0
Ol

2.0 1.9
Oot

5.0 NEKA

2.55

1199.9
1590.0

1

SAMPLE 6

SAMPLE 7

143300
143400
1H35an
1H36n0
143700
14u3A0n
1430909
144oon
1e41an
144ann
1n4snn
1n44gn
144s5on
mn4een
14709
1a4Rgn
reason
1usane
105700
yasaa00
105309
1asunn
1usson
1asenn
145700
14asann
qasonn
1sennr
146190
1H6290
14300
14640n
1H6500
146699
Th6B70r
1ugann
146900
ta790n
1471098
La720n
187300
Le7ene
we7saa
VU7AAD
167790
yu7Ann
1u7enn
1uRAAA
1MALnn
LRAPON
Jaazon
148400
qessan
1nBANN



a. Replace any of the 31 units listed in Figure 4 with other units that
may be more applicable to his requirements.

b.  Augment the list of metric units by an additional 18 to a total of 49
units. This may be done in two ways. One is to add the additional
units on a permanent basis by changing the program. The other is to use
special identifier cards and add additional units for an individual run
as explained in Section D, in the paragraph entitled Special Identifier

Card.

The program is specialized to the conversion of millimetres, the most commonly
used unit of measure on engineering drawings. It assumes that any input dimension
not accompanied by an identifier is in millimetres (default condition), and it

also applies a special rounding convention to all millimetre conversions.

2.. Input Identifier

Except for millimetres, each dimension to be converted by METCO is entered into
the program with a label identifying its metric unit of measure. As noted earlier,
the absence of a label indicates to the program that the dimension is in milli-
metres. This label is called an "Input Identifier" and is used by the program

to select the conversion factor to operate on the dimension, to determine the
rounding convention to be applied and to control the labelling of the output.
Shown in Figure 5 is a list of the 31 metric units the program will handle, along
with their input identifiers, conversion factors, U.S. Customary units and the
rounding method used by the program. The input identifier must be entered
exactly as shown in the figure observing the presence or absence of blanks. In-

correct identifiers will be printed at the beginning of the output as errors.

13


are limited by the output format. The dividing point is one-tenth rather than
unity since a decimal point is mandatory in the output format but not in the inpu
format. The magnitude of the dimension that can be processed depends also on the
rounding rule employed since this dictates the number of places to the right of

the decimal point.

It will be noted from figure 5 that most built-in conversion factors have been
rounded to five significant digits. This does not affect the accuracy of the
computed results, however, since converted dimensions are rounded to at most

three significant digits.

Other built-in conversions handle signed numbers in a manner similar to the way
that millimetre conversions do. In all cases, the magnitude of a signed number

must be decreased by a factor of ten, but the error is unaffected.

C. Numerical Values
Based upon these considerations the maximum permissible magnitudes of the input
dimensions and the maximum errors produced have been calculated and verified and
are presented in figure 8 for both millimetre and built-in non-millimetre dimen-
sions. In the table the maximum dimensions are conservative approximations -

i.e., rounded downward from their true values.

42


989721 13. SAMOLE L 1? 1700

285 GRAM 121a0n
865 LITRE 121900
14. LITRE 12200"
17. LITRE 1921090
22.5 LITRE 122200
3165 DEG Cc 122300
2.0 DEG TOL 122400
740.0 DEG C 12250
29.5 LITRE 122600
34. LITRE 12270n
170. LITRE 122R0n
65.5 LITRE 1220n0
68. LITRE 1a30nn
75. LITRE 123100
75-5 LITRE 123200
3060. GRAM 123300
1066 LITRE 19340n
148. LITRE 123500
519. LITRE 123600

STOP 193700
3F1341 15 1.0 4.0 2.0 SAMPLE 2 123A00
1000. MPA 100. Oe 12390n
100. DEG Cc 3. 12nAAN
19.35 N/MM 35 124109
20025 621 47.33 124200
77.0 8540 154.0 19430n
2. BAR 4 12440
we LITRE ol 124500
2. KM ol 1?460n
20. DEG C 2. 12470n
10. NM Qe 124RNNn
566 youann
35. ML 125000
30.860 0.013 195100
506 . 1asean
14.25 5 125300
1.5 125400
11.00 125500
7520 REF 125¢0n
Se DEG ToL 7.0 OFG TOL 20.00 DES Tor 125700
2.0 ML 1.5 ML 125ann
3.0 ML 195000
5.0 ML 126000
“31.5 DEG C 196100
740230 DEG C 1262nn
2.0 DEG TOL 126300
P-.0 DEG TOL 1p6ann
4.0 DEG TOL 1965N0
B60 ML 12660n
12.0 ML 196700
2.0 KM 126R00
3.0 KM 126990
8.0 kia 197000

87


backed Plastic sheet and tien put on the engineering drawing. (3) The output could be
typed directly onto the adhesive backed plastic sheet and then put on the drawing. The
option depends on the equipment and the required distribution of the conversion

chart.

A special option can be added to the program to provide output through a plotter.
This option, however, is not included in the program being furnished. Such

hookups vary too greatly to provide this option.

2. Output
Output from the METCO program consists of:
(1) metric to U.S. Customary conversion tables (Tables showing U.S.
Customary units and their corresponding metric values for specific drawings.)
(2) identification, error messages and (under certain conditions) a

table of conversion factors employed.

These two items are addressed in the order given in this document for expository

reasons. They appear on the computer printout in reverse order. All of this

material is referred to collectively on the computer printout as "Metric--U.S.

25


(3)

38
39
40
41
42
43
44

45

46

47

48
49

50
SL

THE

$2

55

FORMAT (F7s09°FAe004X)

IF (ND (1) o£Qe1) WRITE (CTUNITs 39) AMC) UST (T)
FORMAT (F7«0+F9.193X)

IF(ND(T) -EQ62) WRITE CIUNIT®40) AMC) pUSC(T)
FORMAT (F8.10F9.202X)

IF(ND(T) -EQe3) WRITE (TUNTT 941) AM(T) @UISC(T)
FORMAT(F9.29F9.301X)

TF(ND(T) -EQ.4) WRITE CTUNTT £42) AM(T) pUSC(T)
FORMAT (FIN. 39F 904)

IF (ND(T) 6GT.G) WRITE (IUNIT #43)
FORMAT(19(1H ))

GOTO 45

CONTINUE.

WRITE (IUNTT #43)

CONTINUE

REWIND TUNIT

READ (TUNIT*# 46) (LL(K) #K=K1eK2)

REWIND IUNIT

FORMAT (19A1)

K1=K1+NH

K2=K2+NH

CONTINUE

K2=K2=NH

K3=K2+1

DO 48 J=1+K2

K=K3-J

IF(LL(K) eNEIBLANK)GOTO 49

CONTINUE

CONTINUE

WRITE CIWRITE 250) (LL (CU) pJ=i eK)
FORMAT(6(3ALF1X er 15AL° 1X9 AL))

CONTINUE

TABLE HAS BEEN COMPLETED SO ASK IF THFRF TS ANOTHER ONT,
WRITE (IWKITE? 52)

FORMAT(//37H ENTER THE TURNTIFICATION (COMMA) AND,
125H WIDTH FOR ANOTHER TA@LE./
150H TO END PROGRAM» ENTER ANY ALPHABETICA! CHAPRACTFR.«/)
ISW1=1

REWIND TUNTT

GOTO 2

CONTINUE

WRITE CIWRITE?S5)

FORMAT(48H THERE HAS REEN AN FRROR IN ENTFRING THE MAXIMUM?

113H TABLE WIDTH./42H PLEASE RFENTER THE INENTTFICATION AND THE»

113H TARLE WIDTH./)

REWINO TUNIT
GOTO 2
END

SUBROUTINE CONVMM(ArN®&)

SUBROUTINE CONVMM CONVERTS MILLIMFTRES* Ae TuTO INCHES? Be

hy

IS THE NUMRFR OF (SIGNIFICANT) DIGITS THERE SHOULD RE TO THE

RIGHT OF THE DECIMAL POINT Iii 8B. FIRST A TS CONVERTED TO

125


In industry, an engineering drawing triggers a chain of events that ends in a
product that can be sold to a customer. When Caterpillar Tractor Co. management
decided to change to the metric system, they reviewed the experience of their
overseas plants in the United Kingdom which were making the change to the metric
system. They also reviewed the experience of other companies in the United States
which were dual dimensioning engineering drawings. From this review, they noted
that organizations using the dual dimensioning practices described in Society of
Automotive Engineers 3390131 had not achieved a change in their staff's thinking
from the U.S. Customary to the metric system. The engineer making the drawing
and the man in the shop making the part were no closer to thinking in metric units
after years of dual dimensioning than they were prior to dual dimensioning. As

a result, Caterpillar has taken a different approach to providing dual capability
on engineering drawings. This approach entails completing the engineering drawing
in metric units and then generating a chart to provide conversion from the metric
units back to the U.S. Customary. Society of Automotive Engineers (SAE) Off Road
Vehicle Council (ORVC) Report HS si066!41 further describes metric drawing

practices.

This program was written only for generating the conversion chart used on metric
engineering drawings. Experience has shown that if provided with the proper tools
designers can design new parts in metric measure and the man in the shop can make
parts from the metric drawing. Then the question arises, "Why do we need to pro-
vide any conversion?" The following conditions justify the need for the conver-

sion chart:


above described accuracy should be obtained on any computer with equivalent or
greater fixed and floating point word length. The programs are not intended to

be run on computers with lesser capability.

3. Rounding Conventions
GMMETR output in inches contains one more decimal place than the input milli-

metre measurement.

GMINCH output in millimetres contains one less decimal place than the input

inch measurement.

4, Error and Other Special Conditions

Diagnostics are printed immediately following an incorrect line of input. If
multiple errors occur on the same line, only the first will be recognized and
flagged. The program stops examining the input after the first diagnostic and

requests the user to reenter the line.

Each of the following conditions generates a diagnostic message and a request to
reenter data.
1. Illegal character in input dimension
a. alpha character

Os», two consecutive commas

(2)o, Two consecutive decimal points not separated by a comma.

(1) Two consecutive commas at the end of a line are not detected.

(2) Some computers automatically append decimal points to integers.

53


Tswc=n
GOTO 22

16 CONTINUE
IF(ISwP.EQ21)GOTO 17
NP=
ISWP=1
Iswc=a
GOTO 22

17 CoNTINUF
WRITE (CIWRITE? 18)

18 FORMAT(51H THE LINE HAS TO MECTMAL POINTS WITHOUT A CaMMA Tite

19H BETWEEN+/25H PLEASE REENTER THE LINE S/)
GOTO 10
19 CONTINUE
IFCISWC.EQ.1) GO TO 20
N=N+1
ND(N) =I-NP
IF CISWP.EQ.OND(NI=L
TSWC=1
ISwP=0
GOTO 22
20 CONTINUE
WRITE (IWRITE* 21)

21 FORMAT(49H THERE IS AN TLLEGAL CHARACTER IN THE INPUT LINE e/
161H ONLY POINTS SINGLE COMMAS+ AND THE TEN PTGITS MAY BF ONSED./
125H PLEASE REFNTFR THE LINE./)

GOTO 10
22 CONTINUE
N2=N41
ND (N2)=JeNP+1
IF CISWP.EQ.OND(N2DEL
IF (N2.GToNM+1) WRITE (IWR ITE 2 23)NMe NM

23 FORMAT(SH ONLY*T5¢24i4 MUMRERS CAN RE FNTERED./

21SH ONLY THE FIRST*15022H ARE BEING PROCESSSEN.)
N2=MINO (N2 ¢NM)

c
C uRITE THE DATA AS HOLLERITH CHARACTFRS ON CHANMEL TUNTT AMM REA TT
C BACK FREE-FIELD FORMAT (AS NON-INTEGE? NUMRFPS).

JPLSJ+1

REWIND IUNIT

DO 245 K=1°JUPL

IF (KeLTeJUPL «AND, LIK) .NE*ICOMMA) GO TO 245

K2=K=1
TS=21-K
DO 241 II=K1rK2
IJ=IS+II

241 IBUF(IJ)=SLCIT)
WRITE (IUNIT? 3) IRUF
DO 243 TI=KieK2
IJ=IS+1I

243 IBUF (TJU)=IBLANK
K1=K2+2

245 CONTINUE

122


19 *68e SuLIT

19 “one ayLlId

19 *H0T El Fe a

10 Te9e suLIT

19 0°9g SYLIT

19 6°ss BYLt)

19 ees auLI1

19 erie SuLI7

Lo 6°Se 3uL17

10 eee SYyLIT

10 o°eT SyLI7

410 Bent 34117

10 0°6 3YuLI7

19 wes 3uLIT

Lo Brt ayLlIt

SLINN wid SLINN

*S€ BONVHD

YsISIIN3GI Wo3TII Wwvud
dals1insdl W93771 dav
eaISILN301 93771 wvuo
3adAL YOuus uaIaILnaar

*g9¢
"eee
S*96
s*te

“es

ots
S*eh
S*6e
sre
s*ze

°LT
eat
se
G°s
oth

wid

LOTLW6 Luvd

*nede
“se

NOISN3WIG

*(S)d08G5 JU AdAL BWUS HiIM (S)G4VD VLIVG INdNI 3HL Juv MO aE g31Si7

s Dlanvs a t T 0
Savnsd 101d SaBT st awaui YaHLo Ww SNOTLIGQV
g3uuy SNWNT09 LNdLNO
dO S3dWii dO SadWNN

“se
BONVHD

L0TLW6
YaeWriN
Luvd

J 1dvL NOISYBANOD AYWWOLSND °s°n = O1uLaw

106


cored
nate
pores
paees
sane

4 Shues
Sade

Agia
AUN
AULA
AuLia
AYLI

Aavuouna,
AwvuOuHaL
AavavanaL
AuvaounsL
Auv suns.

*(S)G0UsS JU BdAL BnOS HLM (S)Odvd

Si SIHL
S1 SInk
SIH.
Sf SIWL
Si $Int

<ccce
v

Ao ode

wee
aeed
peeed
peed
peewee

vovot?
oouses
ouvoort
oovut?
guvot®,
oouuo?
eouos't
vguuort
gouuos
ooust
Govot*
gouvo
gouog*
gover?
oovor*
uguao*
gouoe
euuot?
oouuet
vuvogs
oouuT*
Gouoo
vouuc*
Oouvor
ouucT*
vouce*
youut?
ououae
vouug*
oouuo*
oovvort
ouvert
wouuort
oguue*
wougo'h

1
ONLUN Oa

SaTSTANSOL WeaT
wsIalinagr Wo3ITH
yaldLiNaal Wo3sT

SHI Lfd4No

du

BdAL yOuNa

xvW
438
W W3G

¥AT4TANSOT

seret
arse
ors

NOISNAWIG

VivG ANdNI 3H Bev MO738 GaLSI7

gooretos oT HON BuLaW
ovnvere 1 YH/ONNOd H/O8
Ov0eL*902 T= wHdH/NLe HAY/PW
COoudteoe oT HONT W v230
dooeetoe oT HONT 433K
eneyor I= £14787 eHsOx
ououo't ° W279 ew279
OUmontoe 0 204/20 ewson
Tuou9*hoee T= Cal ow
oynvere T a ox
onzeste Tv 20 on
Zesco* I z0 9
ougoe't I SOA ew
02950" T 10 BMLIT
ouieete T ©11 Zo 10
Teekut 1- 817 70 O17 Nd
zorgo* od €NT ew
ougeT*T T 2a ew
o0SsT* Ie ent ew
Sstoo* i 2n1 evn
“eteg* v an oo
duuuere I 43 W
dusLore I HONT e wa
dLeo8t - HONT wo
igexo* T Suw i)
olvie's i HONI/97 w/t
Oewus'T T HON 70 Wo
9GLeL" t+ 4487 WN
euulethe2 Te 407 Nw
Tunez? - 487 N
duuus't 0 JoL 930 701 930
duouetI= oo 4 930 2 930
Guunotsnt 0 1Sd vd
osnlot I ISd avant
CunuStHt =o IS¢ we
uLovs HMOINHO SL Ano NI
HOLSuaANO NNO MALATANAGT Y3TSTLNIOT
be STG NO1S@3ANOD NE SAIMLN3 40 YBHHIN
oth 6 Tt nntese
Wie = SNOTLIUGY 3ONVHO aaanANn
dovd

Sabet
FWevL NUSUTANGD ABVHOLSND *S*N = ITHLaW

108


DISCLAIMER

The National Bureau of Standards (NBS) has tested each of the programs in this
package on several computers and found them to be functioning as described in the
documentation that follows. Machine dependence was largely eliminated by restrict-
ing the programs to American National Standard FORTRAN. No amount of testing can
anticipate, however, flaws that may no. show up, except under very special circum-
stances, or may be caused by pecul.a.: input conditions.* Therefore, neither NBS
nor the companies whose programs are included in the package can assume responsi-
bility for loss or damage due to (1) malfunctioning of the programs, (2) erroneous

answers, or (3) errors in documentation.

*Computer systems consist of hardware and séftware and seldom are two systems
completely alike. NBS tested each of these three programs on several systems.

For details see Section I - INTRODUCTION.


aan00

8 4H 4H 1 4H + 4H 1%
9 4H + 4H 1 4H * 4H 1 OF

DATA LABI0(01)+ LABLN(O2)+ LABLO(N3)>+ LABLIO(ON)s LABIA(NS)>
1 LAB1N(06) LARLO(O7) + LABIO(NI+ LABIO(OA)+ LASINGIN
2 LAB1O(11)— LARING12)» LAGING13)» LABING HY)» LARLOCIS)e
3 LAB10(16)— LARLO(17) + LASLO(19)» LARTO(19)* LABIN(20)»
4 LABIO(21)+ LARIN(22)+ LABIO(23)+ LABIO(24) 6 LABIO(O5)
5 4H » 4H o 4H + 4H , Or

6 4H » 4H » 4H + 4H + OF

7 4H + 4H . 44 * 4H + Ce

B 4H + 4H 1 4H + 4H 1%

9 4H + 4H * 44 + 4H 1 OF

TABLE(2+ 50) = ARRAY FOR CONVERSTON FACTORS AND POUNDING UNTTS

WORD 1 = COWVERSTON FACTOR ( 5 SIGHTFICANT FIGURES )
WORD 2 = ROUNDING UNIT (5 STGNTFICANT FIGURTS )

DATA TBL1(O1)* TAL1(N2)5 TALI(N3)+ TELLCOHds TALIM) se

1 TRL1(06)*— TALICA7)»+ TRLI(C8)» THL1CO9), TRLIC10)»

2 TBLI(12)% TBLI(12)—5 TRLVC13)*+ Titi(ieds TRLICIS) +

3 TBLI(16)*5 TALLC17), TRLICIAY® Tht (19* TALLCP Oe

4 TALI(21)* TRLI(22)5 TRLI(23)*6 Tei(2ud, TALI(25) 7

5 OMe 0.0% 14.5045 1.0% OeMt4SGe

6 060 145.049 1698 <16R Late

7 1.8 1.00 16220814 060% 224.816

Bo 0408 0.73756 MeO 1.3297, Mote
9 5e710i90 O6Nr NeN39S7e Oole 0.3937 /

DATA TRL2(O1)+ TAL2(02)*+ TPLO(03)*+ THOM)» TAL2(O5)+

1 TRL2(06)» TRAL2(N7)+ TPLOA(OA)® THL2(OO) + TRLACLO)+
2 TALA(11)» TSLAC12)5 TRL2¢13)— TEL (ind, TRLOC1S)>
3 TBL2(16)5 TAL2(17), TAL2C18) + THOC1L9)*® TRLOCPO»
4 TBL2(21)» TAL2(22)5 TAL2(23)56 THLe(ande TRLO(25) 7
5 Oonr 36937+ Nate Be2ANRe AAG
6 0.62137 Owls 9.00155+ 0.0 O.155¢

7  Q+0r 161960" O.te 00610299 04%%

B 06M 33B1+ 060" 3.381) Oede 1.95676
9 Ole 1.308N+ 60% O-O352749NN F

DATA TRL3(O1)+ TSL3(92)5 TPL3(93)5 T3308), TRLACNS) >

1 TBL3(96)— TRLACA7)+ TRLACMBY+ TH (9O)*+ TALACLO’

2 TPL3(11)% TAL3(12)— TAL3(13)* TSLACLE)*® TBLAILS)¢

3 TBLY(16)% TALY(T7) 6 TRLECTAD® TH ACL) TALEO)

4 TRAL3(21)—6 TAL3(22)—¢ TRLR(23%)e THLA(2N)e = TPLB(25) /

5 3e5274r Oole 220460 Oole

6 04% 29,4947 160% 1.0%

7 —0406242890.0+ N60r 0.0"

B 060% 0.0 O60y 0.0%

9 O.0e OOF O-0r Me

DATA TALS(OL)® TSLE(O2)+ TRLY(O%+ THEN (OH. TRLACOS)

1 TALS(06)* TRALUCO7) + TRLACMAY® TULUCOO) + TRLUCIO)+

2 TRALU(A1)» TALA(12)+ TRLA(13)6¢ T3Le(ie)s TBLOCLS) >

85

114200
114300
114K0n
114500
114600
114700
114300
114900
115000
115100
115200
115399
115400
115500
115080n
115709
115A09
115909
116009
116100
116200
116309
116409
116509
116A0n
116700
11690n
116907
117000
117109
11720
117300
117400
117509
117400
11770n
117800
117a00
118000
11AION
118200
118300
118400
118509
11A60n
118707
11AR0n
1t1acna
119009
119199
119200
119200
119409
119599


OUTPUT - IDENTIFICATION AND ERRORS

METRIC = UsS. CUSTOMARY CONVERSION TABLE

NUMBER OF NUMRER OF
PART OUTPUT COLUMNS, ADDED
NUMBER CHANGE ADDITIONS = 4M OTHER IDENTIFIERS PLOT
989721 13. 9 1 1 9

LISTED BELOW ARE THE INPUT DATA CARD(S) WITH SOME TYPE OF ERROP(S).«
DIMENSION IDENTIFIER ERROR TYPE

285 GRAM ILLEGAL IDENTIFIER
3060. GRAM ILLEGAL IDENTIFTER

OUTPUT - CONVERSION TABLE,

PART 989721 CHANGE 13.

DIM UNITS DIM UNITS
4060 neG Cc ORG F
73165 DEG Cc DEG F
2.0 PEG TOL DEG ToL
8.5 LITRE oT
1b. LITRE oT
1% LITRE at
24.5 LITRE at
28.5 CITRE Qt
34 LITRE oT
£565 LITRE oT
68. LITRE aT
75. LITRE aT
75.65 LITRE oT
106. LITRE aT
148. LITRE aT
1706 LITRE aT
519. LITRE oT

Sample 1 (Continued)

REMARKS
SAMPLE 1


Te Dldwvs
SAdvinde

u
1070 SedIsidicdui
Gaus

SO asta

i t u
daridu © vw SNOTLIGUY
SNAIITOD Lida NO
dv Hountin!

o

g2col0°T eeethee
2zoLo°t eetnele
c6L0°T Tine]
oL0°T ones
9L0°L eeele
4g0°T neege
court Se
HONI WW
SONVHD ECLEXe Luvd
0 CECEXE
SONVHD YaUWiN
Luvd

F1wVL NOISYIANOD AUVWOLSND °S°N = JIYL34

uz


0123.5
18.95
05

1.65
22.0
17250
10.

50.

356

4e
7100.22+
2.

2

50.0
128.0
38.10
32.0
25.17
21.8
20.83
19.8
16.0
6.35

MAX
MIN
1E526

KG
ML
LITRE

BAR
KM

DECA-TM
KG/H

BSC

NM
M3
CMS
MPA
MPA

DEGREF C
GM

ML

DEG C

1.0

0.5
0.05
0.051
0.0505
0.08
0.049
0.05
17.88
55.55
10.00
100.
15.
0.00001
5.0
20-0
1.
5.0

KG/H 10.9
0.03
NM 25.55
M3 AML.
CMS 15.55
50.
3.0
0.00002
ou 10060
MND
DFG TOL

92

MO/IKWH

Ane
Ms
cu

Gu

1nA7en
laasan
qupann
qnanna
1ea1Aen
1H920n
149400
yuoynn
masan
1H9BRA
1H97n4
yuaann
Lagann
Legnon
TSA19N
159290
1503200
1s08040
1eoRoN
160000
1EN7ON
rsdean
istann
ysioon
151100
181299
TS1309
is14nn
181509
151609
LS170n
1s1Aan9
1s19n9
1s2nge
152100
152200
152300
152400
is2soe
182000
182700
is2aor
152000
is3ann
A5310n
153200
VE3300
183400
153500
182600
183709
1s3a00
153009
154000


OUTPUT ~ IDENTIFICATION AND ERRORS

METRIC = U.S. CUSTOMARY CONVERSION TABLE

NUMBER OF NUMRER OF
PART OUTPUT COLIMNS, ADNED
NUMBER CHANGE ADDITIONS = #M OTHER IDENTTFIERS PLOT REMARKS
SF1341 15 160 4.0 2.0 9 SAMPLE 2
LISTED BELOW ARE THE INPUT DATA CARD(S) WITH SOME TYPE OF FRROR(S).
DIMENSION IDENTIFIER ERROR TYPE
100. O- ILLEGAL IDENTIFIER
NM TULEGAL IDENTIFIER
ML ILLEGAL IDENTIFIER
REF ILLEGAL IDENTIFIER
ML ILLEGAL IDENTIFIER
ML ILLEGAL IDENTIFIER
Me ILLEGAL IDENTIFIER
ML ILLEGAL INDENTIFIFR
DEG TOL ILLEGAL CHARACTE® IN DIMENSTON
ML TLLEGAL IDENTIFIER
ML ILLEGAL IDENTIFIER
A ILLEGAL IOENTIFIFR
DEEP TLLEGAL IDENTIFIER
=12.00+ TLLEGAL IDENTIFIER
OUTPUT ~ CONVERSION TABLES
PART SF13a1 CHANGE 15
on INCH “Mm NCH “ INCH “Mm INCH
00010 +030 17.50 +689 38.10 1.500
0005 +059 18.0 +709 47.33 1.BAS,
2079 19.0 +748, 50.0 1.969
118 19.8 +780 57.0 2e2ae
+220 20683 +820 77.0 3.031
+250 2168 +858 85.0 34346
+433 22.0 +866 128.0 54039
2561 25.17 2991 158.0 6083
+630 30.860 «= 1.2150
3669 32.0 14260
PART 3F1341 CHANGE 15
DIM UNITS om UNITS UNTTS om UNITS
2. BAR 29. PST _ 2425 LAF
1000. MPA 145000. PST N/MM 1106 LB/INCH
4060 DEG ¢ ~40. DEG F KM 162 WILE
33165 DEG ¢ 25. DEG F KM 1.2 MILE
206 DEG ¢ 6A. DEG F kM 149 MILE
1006 DEG ¢ 212. DEG F Ku 5.0 MILE
2.0 DEG TOL 4 DEG TOL KM 7.0 MILE
4.0 DEG TOL 7. DEG TOL kM 14.0 MILE
Se DEG TOL = DEG TOL. LITRE 4.2 eT
7.0 DEG TOL = 136 DEG ToL. KG 110. tp
20.00 DEG TOL = 36+ DEG ToL

Sample 2 (Continued)

33