-- File StaticControl.Mesa
-- April 1981 by Forest Baskett
-- Last changed: April 9, 1981 10:28 AM

DIRECTORY IODefs,StreamDefs,StringDefs,SystemDefs,
Real,StaticDefs;
StaticControl: PROGRAM IMPORTS IODefs,StreamDefs,StringDefs,Real,StaticDefs = BEGIN OPEN io:IODefs;

echo: PROCEDURE RETURNS[CHARACTER] =
BEGIN
c: CHARACTER;
c ← io.ReadChar[];
io.WriteChar[c];
RETURN[c]
END;

in:
StreamDefs.StreamHandle;
out1:
StreamDefs.StreamHandle;
out2:
StreamDefs.StreamHandle;
line:
STRING ← [100];
lineIn:
STRING ← [100];
lineOut1:
STRING ← [100];
lineOut2:
STRING ← [100];
lowLimit:
REAL;
highLimit:
REAL;

Real.InitReals[];
io.WriteString["Enter name of chip to be checked : "];
io.ReadID[line];
io.WriteLine[" "]; io.WriteString["Enter minimum ratio : "];
lowLimit ← Real.ReadReal[echo];
io.WriteLine[" "]; io.WriteString["Enter maximum ratio : "];
highLimit ← Real.ReadReal[echo];
io.WriteLine[" "];
StringDefs.AppendString[lineIn, line];
StringDefs.AppendString[lineOut1, line];
StringDefs.AppendString[lineOut2, line];
StringDefs.AppendString[lineIn, ".sim"];
in ← StreamDefs.NewByteStream[lineIn, StreamDefs.Read];
StringDefs.AppendString[lineOut1, ".erc"];
out1 ← StreamDefs.NewByteStream[lineOut1,
StreamDefs.Write+StreamDefs.Append];
StringDefs.AppendString[lineOut2, ".erclog"];
out2 ← StreamDefs.NewByteStream[lineOut2,
StreamDefs.Write+StreamDefs.Append];
StaticDefs.RunStatic[in,out1,out2,lowLimit,highLimit];
out1.destroy[out1];
out2.destroy[out2];
END.