var clicked:command; ... repeat clicked:=getclickedcommand; if clicked=cancom then menu; ... until clicked=okcom;