! Program to 'find' everyone
! MDP '84

%begin

%include "Useful:Whodat.Inc"

%predicate connect gone file (%string (6) whois)
   %on 9 %start
      %false
   %finish

   open input (1,whois.":GONE.AWAY")
   select input (1)
   %true
%end

%routine print gone message (%string (255) Line)
   %integer sym, Count = 150

   %on 9 %start
      %return
   %finish

   %cycle
      read symbol (sym)
      Count = Count - 1
      %exit %if Count = 0 %or Sym = Nl
      Line = Line . To String (Sym)
   %repeat %until Count = 0

   Format (Line)
   New Line
%end

%string (127) %fn print name (%integer whois)

   %if whois > Max Fs Users %then %result = Fs Names (whois) . " " %c
                            %else %result = Fs Names (whois)." (".Fs Users (whois).") "

%end

%integer Index

   %for Index = Min FS Users, 1, Max FS Users %cycle
      %if Connect Gone File (Fs Users (Index)) %start
         Print Gone Message (Print Name (Index))
      %finish
   %repeat

%endofprogram
