Function menu (mname:mstr; mfn:sstr; choices:anystr):integer; VAR k:char; sysmenu,percent,needsys:boolean; n,p,i:integer; prompt:lstr; begin sysmenu:=false; percent:=false; for p:=1 to length(choices)-1 do if choices[p]='%' then if choices[p+1]='@' then percent:=true else else if choices[p+1]='@' then sysmenu:=true; writeln (^B); repeat if chatmode then for n:=1 to 3 do summonbeep; if (timeleft<1) or (timetillevent<=3) then begin printfile (textfiledir+'Timesup'); forcehangup:=true; menu:=0; exit end; if showtime in urec.config THEN Begin Prompt := '[' + strr(timeleft)+' left] ' End ELSE Prompt := ''; prompt := prompt+mname+' menu [?=help'; if percent and issysop then prompt:=prompt+', %=sysop'; prompt:=prompt+']:'; writestr (prompt); n:=0; if length(input)=0 then k:='_' else begin if match(input,'/OFF') then begin forcehangup:=true; menu:=0; exit end; n:=valu(input); if n>0 then k:='#' else k:=upcase(input[1]) end; p:=1; i:=1; if k='?' then begin printfile (textfiledir+mfn+'M'); if sysmenu and issysop then printfile (textfiledir+mfn+'S') end else while p<=length(choices) do begin needsys:=false; if p