-- file TestBinderImpl.Mesa -- last edited by Satterthwaite, June 16, 1982 10:58 am DIRECTORY Exec: TYPE USING [AddCommand, commandLine], ExecOps: TYPE USING [Command, Bind], Heap: TYPE USING [MakeNode, FreeNode]; TestBinderImpl: PROGRAM IMPORTS Exec, ExecOps, Heap = { Main: PROC ~ { nChars: CARDINAL ~ (Exec.commandLine.s.length - Exec.commandLine.i) + 1; command: ExecOps.Command _ Heap.MakeNode[n~(nChars+1)/2]; j: CARDINAL _ 0; FOR i: CARDINAL IN [Exec.commandLine.i..Exec.commandLine.s.length) DO command[j] _ Exec.commandLine.s[i]; j _ j+1; ENDLOOP; command[j] _ '\n; [] _ ExecOps.Bind[command]; Heap.FreeNode[p~command]}; Init: PROC ~ {Exec.AddCommand["TestBinder.~"L, Main]}; Init[]; }.