DIRECTORY ViewerClasses, Rope, Menus, IO, Convert, ViewerIO, ViewerTools, TypeScript, AlgebraClasses, Points, Bools, Ints, BigRats, RatIntervals, Reals, Complexes, Variables, Polynomials, AlgebraicNumbers, ExtensionFields, Matrices, Formulas, MathCommunication, MathExpr; CaminoRealMain: CEDAR PROGRAM IMPORTS Menus, ViewerIO, IO, Convert, Rope, ViewerTools, TypeScript, Ints, AlgebraClasses, Points, Bools, BigRats, RatIntervals, Reals, Complexes, Variables, Polynomials, AlgebraicNumbers, ExtensionFields, Matrices, Formulas, MathCommunication = BEGIN OPEN AC: AlgebraClasses, PTS: Points, INTS: Ints, BR: BigRats, RI: RatIntervals, VARS: Variables, AN: AlgebraicNumbers, EF: ExtensionFields, POL: Polynomials, MAT: Matrices, QFF: Formulas; computeTS: TypeScript.TS; computeIn, computeOut: IO.STREAM; structureTS: TypeScript.TS; structureIn, structureOut: IO.STREAM; workingVariableSequence: VARS.VariableSeq; workingMatrixSize: NAT; workingRatInt: RI.RatInterval _ NIL; workingAlgNum, workingRealAlgNum: AN.AlgebraicNumber _ NIL; workingStructure, XStructure, YStructure, AuxStructure: AC.Structure _ NIL; X, Y, Aux: AC.Object _ NIL; XViewer: ViewerClasses.Viewer _ MathCommunication.Create[NIL,"X Register"]; YViewer: ViewerClasses.Viewer _ MathCommunication.Create[NIL,"Y Register"]; AuxViewer: ViewerClasses.Viewer _ MathCommunication.Create[NIL,"Auxiliary Register"]; PrintStructure: PROC [structure: AC.Structure, identifier: Rope.ROPE] ~ { IF structure # NIL THEN structureOut.PutRope[ Rope.Cat[identifier, " set to (", Rope.Cat[AC.StructureCategoryToRope[structure.class.category], ") ", structure.class.printName[structure], "\n\n"] ] ] ELSE structureOut.PutRope[Rope.Concat[identifier, " undefined"] ]; }; SetIntegers: Menus.MenuProc = { workingStructure _ INTS.Ints; PrintStructure[workingStructure, "Working Structure"]; }; SetRationals: Menus.MenuProc = { workingStructure _ BR.BigRats; PrintStructure[workingStructure, "Working Structure"]; }; SetReals: Menus.MenuProc = { workingStructure _ Reals.Reals; PrintStructure[workingStructure, "Working Structure"]; }; SetComplexes: Menus.MenuProc = { workingStructure _ Complexes.Complexes; PrintStructure[workingStructure, "Working Structure"]; }; SetVarSeq: Menus.MenuProc = { workingVariableSequence _ VARS.VariableSeqFromRope[ViewerTools.GetSelectionContents[] ]; structureOut.PutRope[ Rope.Cat["Variables = ", VARS.VariableSeqToRope[workingVariableSequence], "\n\n"] ]; }; MakePolyRing: Menus.MenuProc = { workingStructure _ POL.MakePolynomialStructure[workingStructure, workingVariableSequence]; PrintStructure[workingStructure, "Working Structure"]; }; MakeFormulaAlgebra: Menus.MenuProc = { IF NOT POL.IsPolynomialRing[workingStructure] THEN ERROR; workingStructure _ QFF.MakeFormulaAlgebra[workingStructure]; PrintStructure[workingStructure, "Working Structure"]; }; SetGenAlgebraicNum: Menus.MenuProc = { data: POL.PolynomialRingData _ NARROW[AuxStructure.instanceData]; groundStructure: AC.Structure _ data.coeffRing; IF groundStructure.class.category # field AND groundStructure.class.category # divisionAlgebra THEN ERROR; IF groundStructure.class.algebraicallyClosedField THEN ERROR; workingAlgNum _ AN.MakeAlgebraicNumber[AuxStructure, NARROW[Aux, POL.Polynomial]]; AN.WriteAlgebraicNumber[workingAlgNum, structureOut]; structureOut.PutF["\n"]; }; MakeGenExtField: Menus.MenuProc = { IF workingAlgNum = NIL THEN ERROR; workingStructure _ EF.MakeExtensionField[workingAlgNum]; PrintStructure[workingStructure, "Working Structure"]; }; SetRatInt: Menus.MenuProc = { workingRatInt _ RI.RatIntervalFromRope[ViewerTools.GetSelectionContents[] ]; RI.WriteRatInterval[workingRatInt, structureOut]; structureOut.PutF["\n"]; }; SetRealAlgebraicNum: Menus.MenuProc = { IF workingRatInt = NIL THEN ERROR; workingRealAlgNum _ AN.MakeAlgebraicNumber[AuxStructure, NARROW[Aux, POL.Polynomial], TRUE, workingRatInt ]; AN.WriteAlgebraicNumber[workingRealAlgNum, structureOut]; structureOut.PutF["\n"]; }; MakeRealExtField: Menus.MenuProc = { IF workingRealAlgNum = NIL THEN ERROR; workingStructure _ EF.MakeExtensionField[workingRealAlgNum]; PrintStructure[workingStructure, "Working Structure"]; }; SetMatrixSize: Menus.MenuProc = { workingMatrixSize _ Convert.CardFromRope[ViewerTools.GetSelectionContents[] ]; structureOut.PutF["Matrix/Point Size = %g\n\n", IO.card[workingMatrixSize] ]; }; MakeMatrixRing: Menus.MenuProc = { workingStructure _ MAT.MakeMatrixStructure[workingStructure, workingMatrixSize]; PrintStructure[workingStructure, "Working Structure"]; }; MakePointStructure: Menus.MenuProc = { workingStructure _ PTS.MakePointStructure[workingStructure, workingMatrixSize]; PrintStructure[workingStructure, "Working Structure"]; }; SetXStruct: Menus.MenuProc = { XStructure _ workingStructure; X _ NIL; -- set corresponding Camino variable to NIL, but don't touch Meddle viewer PutExpr[ XStructure, X, XViewer]; PrintStructure[XStructure, "X Structure"]; }; SetYStruct: Menus.MenuProc = { YStructure _ workingStructure; Y _ NIL; PutExpr[ YStructure, Y, YViewer]; PrintStructure[YStructure, "Y Structure"]; }; SetAuxStruct: Menus.MenuProc = { AuxStructure _ workingStructure; Aux _ NIL; PutExpr[ AuxStructure, Aux, AuxViewer]; PrintStructure[AuxStructure, "Aux Structure"]; }; ShowXStruct: Menus.MenuProc = { PrintStructure[XStructure, "X Structure"]; }; ShowYStruct: Menus.MenuProc = { PrintStructure[YStructure, "Y Structure"]; }; ShowAuxStruct: Menus.MenuProc = { PrintStructure[AuxStructure, "Aux Structure"]; }; PutExpr: PROC [structure: AC.Structure, structureElement: AC.Object, viewer: ViewerClasses.Viewer] ~ { IF structureElement = NIL THEN { computeOut.PutF["structureElement = NIL\n\n"]; MathCommunication.SetContents[viewer, NIL ]; RETURN; }; structure.class.write[computeOut, structureElement]; computeOut.PutRope["\n\n"]; IF structure.class.toExpr = NIL THEN RETURN; MathCommunication.SetContents[viewer, structure.class.toExpr[structureElement] ]; }; XFromY: Menus.MenuProc = { X _ Y; XStructure _ YStructure; PutExpr[ XStructure, X, XViewer]; PrintStructure[XStructure, "X Structure"]; }; XFromAux: Menus.MenuProc = { X _ Aux; XStructure _ AuxStructure; PutExpr[ XStructure, X, XViewer]; PrintStructure[XStructure, "X Structure"]; }; YFromX: Menus.MenuProc = { Y _ X; YStructure _ XStructure; PutExpr[ YStructure, Y, YViewer]; PrintStructure[YStructure, "Y Structure"]; }; YFromAux: Menus.MenuProc = { Y _ Aux; YStructure _ AuxStructure; PutExpr[ YStructure, Y, YViewer]; PrintStructure[YStructure, "Y Structure"]; }; AuxFromX: Menus.MenuProc = { Aux _ X; AuxStructure _ XStructure; PutExpr[ AuxStructure, Aux, AuxViewer]; PrintStructure[AuxStructure, "Aux Structure"]; }; AuxFromY: Menus.MenuProc = { Aux _ Y; AuxStructure _ YStructure; PutExpr[ AuxStructure, Aux, AuxViewer]; PrintStructure[AuxStructure, "Aux Structure"]; }; CaminoGetX: Menus.MenuProc = { X _ XStructure.class.fromRope[ViewerTools.GetSelectionContents[], XStructure]; PutExpr[ XStructure, X, XViewer ]; }; MeddleGetX: Menus.MenuProc = { X _ XStructure.class.fromRope[MathCommunication.GetContents[XViewer], XStructure]; PutExpr[ XStructure, X, XViewer ]; }; CaminoGetY: Menus.MenuProc = { Y _ YStructure.class.fromRope[ViewerTools.GetSelectionContents[], YStructure]; PutExpr[ YStructure, Y, YViewer ]; }; MeddleGetY: Menus.MenuProc = { Y _ YStructure.class.fromRope[MathCommunication.GetContents[YViewer], YStructure]; PutExpr[ YStructure, Y, YViewer ]; }; CaminoGetAux: Menus.MenuProc = { Aux _ AuxStructure.class.fromRope[ViewerTools.GetSelectionContents[], AuxStructure]; PutExpr[ AuxStructure, Aux, AuxViewer ]; }; MeddleGetAux: Menus.MenuProc = { Aux _ AuxStructure.class.fromRope[MathCommunication.GetContents[AuxViewer], AuxStructure]; PutExpr[ AuxStructure, Aux, AuxViewer ]; }; SetScalar: Menus.MenuProc = { groundStructure: AC.Structure; dataMatrix: Matrices.MatrixStructureData; dataGenExtField: EF.ExtensionFieldData; dataRealExtField: EF.ExtensionFieldData; IF XStructure.class.category # vectorSpace AND XStructure.class.category # algebra AND XStructure.class.category # divisionAlgebra THEN ERROR; IF Matrices.IsMatrixRing[XStructure] THEN{ dataMatrix _ NARROW[XStructure.instanceData]; groundStructure _ dataMatrix.elementStructure; } ELSE IF EF.IsGeneralExtensionField[XStructure] THEN { dataPolynomial: POL.PolynomialRingData; dataGenExtField _ NARROW[XStructure.instanceData]; dataPolynomial _ NARROW[dataGenExtField.primitiveElement.minPolyRing.instanceData]; groundStructure _ dataPolynomial.coeffRing; } ELSE IF EF.IsRealExtensionField[XStructure] THEN { dataPolynomial: POL.PolynomialRingData; dataRealExtField _ NARROW[XStructure.instanceData]; dataPolynomial _ NARROW[dataRealExtField.primitiveElement.minPolyRing.instanceData]; groundStructure _ dataPolynomial.coeffRing; } ELSE ERROR; Aux _ groundStructure.class.fromRope[ViewerTools.GetSelectionContents[], groundStructure]; AuxStructure _ groundStructure; PutExpr[ AuxStructure, Aux, AuxViewer ]; PrintStructure[AuxStructure, "Aux Structure"]; }; AddStructureElements: Menus.MenuProc = { X _ XStructure.class.add[X, Y]; PutExpr[ XStructure, X, XViewer ]; }; NegateStructureElement: Menus.MenuProc = { X _ XStructure.class.negate[X]; PutExpr[ XStructure, X, XViewer ]; }; SubtractStructureElements: Menus.MenuProc = { X _ XStructure.class.subtract[X, Y]; PutExpr[ XStructure, X, XViewer ]; }; MultiplyStructureElements: Menus.MenuProc = { X _ XStructure.class.multiply[X, Y]; PutExpr[ XStructure, X, XViewer ]; }; InvertStructureElement: Menus.MenuProc = { IF XStructure.class.invert = NIL THEN { computeOut.PutRope["No invert op in this structure\n\n" ]; RETURN; }; X _ XStructure.class.invert[X]; PutExpr[ XStructure, X, XViewer ]; }; DivideStructureElements: Menus.MenuProc = { IF XStructure.class.divide = NIL THEN { computeOut.PutRope["No divide op in this structure\n\n" ]; RETURN; }; X _ XStructure.class.divide[X, Y]; PutExpr[ XStructure, X, XViewer ]; }; RemainderStructureElements: Menus.MenuProc = { IF XStructure.class.remainder = NIL THEN { computeOut.PutRope["No remainder op in this structure\n\n" ]; RETURN; }; X _ XStructure.class.remainder[X, Y]; PutExpr[ XStructure, X, XViewer ]; }; ScalarMultiply: Menus.MenuProc = { IF XStructure.class.scalarMultiply = NIL THEN { computeOut.PutRope["No scalarMultiply op in this structure\n\n" ]; RETURN; }; IF Aux = NIL THEN ERROR; X _ XStructure.class.scalarMultiply[Aux, X]; PutExpr[ XStructure, X, XViewer ]; }; MatrixTranspose: Menus.MenuProc = { IF NOT Matrices.IsMatrixRing[XStructure] THEN { computeOut.PutRope["Structure is not a matrix ring\n\n" ]; RETURN; }; X _ Matrices.Transpose[XStructure][X]; PutExpr[ XStructure, X, XViewer ]; }; MatrixDeterminant: Menus.MenuProc = { data: Matrices.MatrixStructureData; IF NOT Matrices.IsMatrixRing[XStructure] THEN { computeOut.PutRope["Structure is not a matrix ring\n\n" ]; RETURN; }; data _ NARROW[XStructure.instanceData]; Aux _ Matrices.Determinant[XStructure][X]; AuxStructure _ data.elementStructure; PutExpr[ AuxStructure, Aux, AuxViewer ]; PrintStructure[AuxStructure, "Aux Structure"]; }; PolynomialDiff: Menus.MenuProc = { IF NOT POL.IsPolynomialRing[XStructure] THEN { computeOut.PutRope["Structure is not a polynomial ring\n\n" ]; RETURN; }; Aux _ POL.Differentiate[XStructure][X]; AuxStructure _ XStructure; PutExpr[ AuxStructure, Aux, AuxViewer ]; PrintStructure[AuxStructure, "Aux Structure"]; }; MainVarEval: Menus.MenuProc = { IF POL.IsPolynomialRing[XStructure] THEN { dataPolynomial: POL.PolynomialRingData _ NARROW[XStructure.instanceData]; coeffRing: AC.Structure _ dataPolynomial.coeffRing; Aux _ POL.MainVarEval[XStructure][NARROW[X, POL.Polynomial], Y ]; AuxStructure _ coeffRing; PutExpr[ AuxStructure, Aux, AuxViewer ]; PrintStructure[AuxStructure, "Aux Structure"]; } ELSE computeOut.PutRope["No MainVarEval op in this structure\n\n" ]; }; AllVarEval: Menus.MenuProc = { IF POL.IsPolynomialRing[XStructure] THEN { dataPolynomial: POL.PolynomialRingData _ NARROW[XStructure.instanceData]; baseCoeffRing: AC.Structure _ dataPolynomial.baseCoeffRing; evalPoint: Points.Point _ NARROW[Y]; Aux _ POL.AllVarEval[XStructure][NARROW[X, POL.Polynomial], evalPoint]; AuxStructure _ baseCoeffRing; PutExpr[ AuxStructure, Aux, AuxViewer ]; PrintStructure[AuxStructure, "Aux Structure"]; RETURN; } ELSE IF QFF.IsFormulaAlgebra[XStructure] THEN { evalPoint: Points.Point _ NARROW[Y]; Aux _ QFF.AllVarEval[XStructure][NARROW[X, QFF.Formula], evalPoint]; AuxStructure _ Bools.Bools; PutExpr[ AuxStructure, Aux, AuxViewer ]; PrintStructure[AuxStructure, "Aux Structure"]; } ELSE computeOut.PutRope["No AllVarEval op in this structure\n\n" ]; }; DoSubst: Menus.MenuProc = { Aux _ POL.Subst[XStructure][NARROW[X, POL.Polynomial], NARROW[Y, POL.Polynomial]]; AuxStructure _ XStructure; PutExpr[ AuxStructure, Aux, AuxViewer ]; PrintStructure[AuxStructure, "Aux Structure"]; }; SylvesterMatrix: Menus.MenuProc = { matrix: Matrices.Matrix _ NARROW[POL.SylvesterMatrix[XStructure][NARROW[X, POL.Polynomial], NARROW[Y, POL.Polynomial] ] ]; Aux _ matrix; AuxStructure _ matrix.structure; PutExpr[ AuxStructure, Aux, AuxViewer ]; PrintStructure[AuxStructure, "Aux Structure"]; }; Resultant: Menus.MenuProc = { matrix: Matrices.Matrix _ NARROW[POL.SylvesterMatrix[XStructure][NARROW[X, POL.Polynomial], NARROW[Y, POL.Polynomial] ] ]; data: Matrices.MatrixStructureData _ NARROW[matrix.structure.instanceData]; Aux _ Matrices.Determinant[matrix.structure][matrix]; AuxStructure _ data.elementStructure; PutExpr[ AuxStructure, Aux, AuxViewer ]; PrintStructure[AuxStructure, "Aux Structure"]; }; structureTS _ TypeScript.Create[info: [name: "CaminoReal Structures" ] ]; Menus.ChangeNumberOfLines[menu: structureTS.menu, newLines: 4]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"Ints", proc: SetIntegers]]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"BigRats", proc: SetRationals]]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"Reals", proc: SetReals]]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"Complexes", proc: SetComplexes]]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"VarSeq", proc: SetVarSeq], line: 1]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"PolyRing", proc: MakePolyRing], line: 1]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"Formulas", proc: MakeFormulaAlgebra], line: 1]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"GenAlgNum", proc: SetGenAlgebraicNum], line: 1]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"GenExtField", proc: MakeGenExtField], line: 1]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"RatInterval", proc: SetRatInt], line: 1]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"RealAlgNum", proc: SetRealAlgebraicNum], line:1]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"RealExtField", proc: MakeRealExtField], line: 1]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"Matrix/PointSize", proc: SetMatrixSize], line: 2]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"MatrixRing", proc: MakeMatrixRing], line: 2]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"Points", proc: MakePointStructure], line: 2]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"SetXStruct", proc: SetXStruct], line: 3]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"SetYStruct", proc: SetYStruct], line: 3]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"SetAuxStruct", proc: SetAuxStruct], line: 3]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"ShowXStruct", proc: ShowXStruct], line: 3]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"ShowYStruct", proc: ShowYStruct], line: 3]; Menus.AppendMenuEntry[menu: structureTS.menu, entry:Menus.CreateEntry [name:"ShowAuxStruct", proc: ShowAuxStruct], line: 3]; computeTS _ TypeScript.Create[info: [name: "CaminoReal Compute" ] ]; Menus.ChangeNumberOfLines[menu: computeTS.menu, newLines: 4]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Add ", proc: AddStructureElements], line: 0]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Neg ", proc: NegateStructureElement], line: 0]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Sub ", proc: SubtractStructureElements], line: 0]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Mult", proc: MultiplyStructureElements], line: 0]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Inv", proc: InvertStructureElement], line: 0]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Div", proc: DivideStructureElements], line: 0]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Rem", proc: RemainderStructureElements], line: 0]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Deriv ", proc: PolynomialDiff], line: 1]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"MainVarEv", proc: MainVarEval], line: 1]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"AllVarEv", proc: AllVarEval], line: 1]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Subst", proc: DoSubst], line: 1]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"SylvMat", proc: SylvesterMatrix], line: 1]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Resultant", proc: Resultant], line: 1]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Transpose ", proc: MatrixTranspose], line: 1]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"Det ", proc: MatrixDeterminant], line: 1]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"ScaMult", proc: ScalarMultiply], line: 1]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"XFromY", proc: XFromY], line: 2]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"XFromAux", proc: XFromAux], line: 2]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"YFromX", proc: YFromX], line: 2]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"YFromAux", proc: YFromAux], line: 2]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"AuxFromX", proc: AuxFromX], line: 2]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"AuxFromY", proc: AuxFromY], line: 2]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"MeddleGetX", proc: MeddleGetX], line: 3]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:" CaminoGetX", proc: CaminoGetX], line: 3]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"MeddleGetY", proc: MeddleGetY], line: 3]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"CaminoGetY", proc: CaminoGetY], line: 3]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"MeddleGetAux", proc: MeddleGetAux], line: 3]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"CaminoGetAux", proc: CaminoGetAux], line: 3]; Menus.AppendMenuEntry[menu: computeTS.menu, entry:Menus.CreateEntry [name:"SetScalar", proc: SetScalar], line: 3]; [in: computeIn, out: computeOut] _ ViewerIO.CreateViewerStreams[name: "CaminoReal Compute",viewer: computeTS ]; [in: structureIn, out: structureOut] _ ViewerIO.CreateViewerStreams[name: "CaminoReal Structures",viewer: structureTS ]; END. lCaminoRealMain.mesa Last Edited by: Arnon, August 20, 1986 10:06:51 am PDT Commander, Process, windowCount: INT _ 0; -- a count of the number of calculators created MakeCalculator: ENTRY Commander.CommandProc = BEGIN Puts up a calculator window. title: Rope.ROPE; windowCount _ windowCount+1; title _ IO.PutFR["Algebra machine number %g", IO.int[windowCount]]; TRUSTED {Process.Detach[FORK Calculate[title]];} END; Calculate: PROC[title: Rope.ROPE] = { dataVectorSpace: DO out.PutChar[in.GetChar[] ]; ENDLOOP; }; Commander.Register[ key: "Algebra", proc: MakeCalculator, doc: "Simple algebra system"]; Κ˜šœ™J™6J™—šΟk ˜ Jšœ ™ Jšœ™Jšœ˜Jšœ˜Jšœ˜Icodešœ˜K˜KšœΟc˜ K˜ Kšœ ˜ J˜J˜J˜J˜Jšœ˜Jšœ ˜ J˜Jšœ ˜ Jšœ ˜ Jšœ ˜ J˜J˜J˜ J˜ Jšœ˜Jšœ ˜ J˜—InamešΠbxœœ˜Jšœœν˜ψJšœœœœœ œœ œœ œœœœ œ ˜ΔJ˜Kšœ œž/™EunitšΟnœœœ™4Jšœ™Jšœ œ™Jšœ™Jšœœ$œ™CJšœœ™0Jšœ™—J˜š  œœ œ™%Kšœœ˜Jšœœœ˜!Kšœœ˜Jšœœœ˜%Jšœœ ˜*Jšœœ˜Jšœœœ˜$Jšœ"œœ˜;Jšœ*  œœ œ˜KJšœ œœ œ˜Kš œ2œ˜KKš œ2œ˜KKš  œ2œ˜UJ˜š œœ œœ˜Išœ œ˜Jšœ8˜8Jšœ œk˜v—š˜Jšœ=˜=—K˜K˜—š  œ˜Jšœœ˜Jšœ6˜6J˜J˜—š  œ˜ Jšœœ ˜Jšœ6˜6J˜J˜—š œ˜Jšœ˜Jšœ6˜6J˜J˜—š  œ˜ Jšœ'˜'Jšœ6˜6J˜J˜—š  œ˜Idefaultšœœ:˜XJšœ0œ7˜kJ˜J˜—š  œ˜ NšœœD˜ZJšœ6˜6J˜J˜—š œ˜&Kš œœœ$œœ˜9Nšœœ&˜˜>Jšœ˜J˜—Nšœœ˜'Nšœ˜Jšœ)˜)Jšœ.˜.J˜J˜—š  œ˜šœœœ˜*Jšœœœ˜IJšœ œ&˜3Nšœœœœ˜ANšœ˜Jšœ(˜(Jšœ.˜.J˜—Jšœ@˜DJ˜—˜J˜—š  œ˜šœœœ˜*Jšœœœ˜IJšœœ*˜;Jšœœ˜$Nšœœœœ˜GNšœ˜Jšœ)˜)Jšœ.˜.Jšœ˜J˜—šœœœœ˜/Jšœœ˜$Nšœœœœ˜DNšœ˜Jšœ)˜)Jšœ.˜.J˜—Jšœ?˜CJ˜J˜—š œ˜Nš œœœœœœ˜RNšœ˜Jšœ)˜)Jšœ.˜.J˜J˜—š œ˜#Jš œ œœœœœ˜zNšœ ˜ Nšœ ˜ Jšœ)˜)Jšœ.˜.J˜J˜—š  œ˜Jš œ œœœœœ˜zJšœ%œ ˜KNšœ5˜5Nšœ%˜%Jšœ)˜)Jšœ.˜.J˜—J™—KšœI˜IJšœ?˜?Jšœh˜hJšœl˜lJšœf˜fJšœn˜nJšœq˜qJšœv˜vJšœ|˜|Jšœ}˜}Jšœ|˜|Jšœv˜vJšœ~˜~Jšœ~˜~Jšœ˜Jšœz˜zJšœz˜zJšœv˜vJšœv˜vJšœz˜zJšœx˜xJšœx˜xJšœ|˜|J˜KšœD˜DJšœ=˜=Jšœx˜xJšœz˜zJšœ}˜}Jšœ}˜}Jšœy˜yJšœz˜zJšœ}˜}Jšœt˜tJšœt˜tJšœr˜rJšœl˜lJšœv˜vJšœr˜rJšœy˜yJšœu˜uJšœu˜uJšœl˜lJšœp˜pJšœl˜lJšœp˜pJšœp˜pJšœp˜pJšœt˜tJšœu˜uJšœt˜tJšœt˜tJšœx˜xJšœx˜xJšœr˜rJ˜Kšœo˜oKšœx˜xK˜š™Jšœ™Jšœ™—J™J˜šœ™JšœD™DJ™—J˜Jšœ˜˜J™——…—N\`δ