<> <> DIRECTORY Commander USING [Register, CommandProc], Rope USING [ROPE, Cat, FromChar, Length, Fetch], ViewExpr; MakeCaminoViewer: CEDAR PROGRAM IMPORTS ViewExpr, Commander, Rope ~ BEGIN DoIt: Commander.CommandProc ~ { <> <> name: Rope.ROPE _ ""; -- label for viewer <> FOR i:INT IN [0..cmd.commandLine.Length[] - 1] DO c: CHAR _ cmd.commandLine.Fetch[i]; IF c IN ['\040..'\176] THEN name _ Rope.Cat[name, Rope.FromChar[c]]; ENDLOOP; IF name.Length[] = 0 THEN name _ "CaminoReal Expr"; [] _ ViewExpr.CreateCaminoItem[name, NIL]; }; Commander.Register[key: "Camino", proc: DoIt, doc: "Opens a new CaminoReal math expression editor viewer."]; END.