program c (input:/,output);
include 'pas:pascmd.pas';
var i: integer;
    tok: packed array [1..1] of char;
    mystring: packed array [1..2] of char;
    mytab: table;
    q: real;
begin
mytab:=tbmak(5);
tbadd(mytab,1,'- ',0);
tbadd(mytab,2,'+ ',0);
   while true do
      begin
	 cminir('Foo>');
	 cmmult;
	 cmdef('QQ');
	 for i:=1 to 2 do mystring[i]:='Q';
         for i:=1 to 1 do
	    cmtok(mystring);
	 tok[1]:='-'; cmtok(tok);
	 tok[1]:='%'; cmtok(tok);
	 tok[1]:='&'; cmtok(tok);
	 i:=cmdo;
	 cmcfm;
	 writeln(tty,'command selected was ',i);
      end {while true}
end
.
