<> <> <<>> <> <<>> DIRECTORY Commander USING [CommandProc, Register], Rope USING [ROPE], FS USING [StreamOpen], IO USING [ int, PutF, Close, STREAM, PutRope]; Scsi: CEDAR PROGRAM IMPORTS IO, Commander, FS = BEGIN ROPE: TYPE = Rope.ROPE; outputName: ROPE _ "Scsi.part"; ScsiProc: Commander.CommandProc = BEGIN i: CARD; out: IO.STREAM _ FS.StreamOpen[outputName,$create]; IO.PutF[out, "4096 2048 -300 -375 200 5775 -100 -400 SCSI PARC-SCSI J\n"]; FOR i IN [1..50] DO IO.PutF[out, "%g %g ", IO.int[-169*((i-1) / 25)], IO.int[-85*((i-1) MOD 25)]]; IO.PutF[out, "P%g ", IO.int[i]]; IO.PutF[out, "255 19 %g 0 ", IO.int[i]]; IF i = 1 THEN IO.PutF[out, "4\n"] ELSE IO.PutF[out, "3\n"]; ENDLOOP; IO.Close[out]; cmd.out.PutRope["File Scsi.part Written\n"] END; Commander.Register[ key: "Scsi", proc: ScsiProc, doc: "Generates a Scsi.part file\n"]; END.