-- file: MFOpsImpl7.mesa
-- Pascal-to-Mesa translator output, translated at October 31, 1985 4:28:02 pm PST


DIRECTORY
  PascalBasic,
  MFTypes,
  MFProcArray,
  MFInteraction,
  MFMath,
  MFMemory,
  MFSymbols,
  MFInput,
  MFParsing,
  MFOps;

MFOpsImpl7: PROGRAM IMPORTS MFProcArray, MFInteraction, MFMath, MFMemory, MFSymbols, MFInput, MFParsing, MFOps EXPORTS MFOps = PUBLIC
BEGIN OPEN PascalBasic, MFTypes, MFProcArray, MFInteraction, MFMath, MFMemory, MFSymbols, MFInput, MFParsing, MFOps;
--:1151----1161:--
BocC: PascalInteger;

BocP: PascalInteger;
  DoAssignment: PROCEDURE
 = 
BEGIN Lhs:Halfword;P:Halfword;Q:Halfword;
 IF CurType#20  THEN BEGIN DispErr[0,748];BEGIN HelpPtr←2;
HelpLine↑[1]←749;HelpLine↑[0]←750; END;Error[];DoEquation[];
 END  ELSE BEGIN Lhs←CurExp;CurType←1;GetXNext[];VarFlag←77;
ScanExpression[];
IF CurCmd=51  THEN DoEquation [] ELSE IF CurCmd=77  THEN DoAssignment[];
IF Internal↑[7]>131072  THEN--997:--BEGIN BeginDiagnostic[];PrintNl[123];
IF  INT[Mem[Lhs]↑.Hh.Lh]>2241  THEN Print[IntName↑[Mem[Lhs]↑.Hh.Lh-(2241)]] ELSE
ShowTokenList[Lhs,0,1000,0];Print[330];PrintExp[0,0];PrintChar[125];
EndDiagnostic[FALSE]; END--:997--;IF  INT[Mem[Lhs]↑.Hh.Lh]>2241  THEN--998:
IF CurType=16  THEN Internal↑[Mem[Lhs]↑.Hh.Lh-(2241)]←CurExp  ELSE BEGIN
DispErr[0,752];Print[IntName↑[Mem[Lhs]↑.Hh.Lh-(2241)]];Print[753];
BEGIN HelpPtr←2;HelpLine↑[1]←754;HelpLine↑[0]←755; END;PutGetError[];
 END--:998-- ELSE--999:--BEGIN P←FindVariable[Lhs];
IF P#0  THEN BEGIN Q←StashCurExp[];CurType←UndType[P];
RecycleValue[P];Mem[P]↑.Hh.B0←CurType;Mem[ INT[P]+1]↑.Int←0;
MakeExpCopy[P];P←StashCurExp[];UnstashCurExp[Q];MakeEq[P];
 END  ELSE BEGIN Obliterated[Lhs];PutGetError[]; END; END--:999--;
FlushNodeList[Lhs]; END; END;--:995----1014:-- DoTypeDeclaration: PROCEDURE
 = 
BEGIN T:SmallNumber;P:Halfword;Q:Halfword;
 IF CurMod>=13  THEN T←CurMod  ELSE T←CurMod+1;
DO P←ScanDeclaredVariable[];
FlushVariable[Eqtb↑[Mem[P]↑.Hh.Lh].Rh,Mem[P]↑.Hh.Rh,FALSE];
Q←FindVariable[P];IF Q#0  THEN BEGIN Mem[Q]↑.Hh.B0←T;Mem[ INT[Q]+1]↑.Int←0;
 END  ELSE BEGIN BEGIN IF Interaction=3  THEN NULL;PrintNl[133];Print[765]; END;
BEGIN HelpPtr←2;HelpLine↑[1]←766;HelpLine↑[0]←767; END;PutGetError[];
 END;FlushList[P];IF  INT[CurCmd]<79  THEN--1015:
BEGIN BEGIN IF Interaction=3  THEN NULL;PrintNl[133];Print[768]; END;
BEGIN HelpPtr←5;HelpLine↑[4]←769;HelpLine↑[3]←770;HelpLine↑[2]←771;
HelpLine↑[1]←772;HelpLine↑[0]←773; END;
IF CurCmd=42  THEN HelpLine↑[2]←774;PutGetError[];ScannerStatus←2;
DO GetNext[];--742:
IF CurCmd=39  THEN BEGIN IF  INT[StrRef↑[CurMod]]<127  THEN IF  INT[StrRef↑[CurMod
]]>1  THEN StrRef↑[CurMod]←StrRef↑[CurMod]-1  ELSE FlushString[CurMod]
; END--:742--; IF  INT[CurCmd]>=79 THEN EXIT; ENDLOOP;ScannerStatus←0; END--:1015--;
 IF  INT[CurCmd]>79 THEN EXIT; ENDLOOP; END;--:1014----1020:-- DoRandomSeed: PROCEDURE
 = 
BEGIN GetXNext[];IF CurCmd#77  THEN BEGIN MissingErr[330];
BEGIN HelpPtr←1;HelpLine↑[0]←779; END;BackError[]; END;GetXNext[];
ScanExpression[];IF CurType#16  THEN BEGIN DispErr[0,780];
BEGIN HelpPtr←2;HelpLine↑[1]←781;HelpLine↑[0]←782; END;
PutGetFlushError[0]; END  ELSE--1021:--BEGIN InitRandoms[CurExp];
IF  INT[Selector]>=2  THEN BEGIN OldSetting←Selector;Selector←2;
PrintNl[783];PrintScaled[CurExp];PrintChar[125];PrintNl[157];
Selector←OldSetting; END; END--:1021--; END;--:1020----1028:
 DoProtection: PROCEDURE = 
BEGIN M:PascalInteger[0..1];T:Halfword; M←CurMod;
DO GetSymbol[];T←Eqtb↑[CurSym].Lh;
IF M=0  THEN BEGIN IF  INT[T]>=83  THEN Eqtb↑[CurSym].Lh← INT[T]-83;
 END  ELSE IF  INT[T]<83  THEN Eqtb↑[CurSym].Lh← INT[T]+83;GetXNext[];
 IF CurCmd#79 THEN EXIT; ENDLOOP; END;--:1028----1030:-- DefDelims: PROCEDURE
 = 
BEGIN LDelim, RDelim:Halfword; GetClearSymbol[];LDelim←CurSym;
GetClearSymbol[];RDelim←CurSym;Eqtb↑[LDelim].Lh←31;
Eqtb↑[LDelim].Rh←RDelim;Eqtb↑[RDelim].Lh←62;
Eqtb↑[RDelim].Rh←LDelim;GetXNext[]; END;--:1030----1033:

END.