File perq-pascal-lisp-project/pasn.perq artifact 35e067ff3f part of check-in 3af273af29


(*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 %               PASCAL BASED MINI-LISP
 %
 % File:         PASN.RED - Trailer File
 % ChangeDate:   5:39am  Saturday, 26 September 1981
 % By:           M. L. Griss
 %               Add Hooks for CATCH/THROW
 %
 %           All RIGHTS RESERVED
 %           COPYRIGHT (C) - 1981 - M. L. GRISS
 %           Computer Science Department
 %           University of Utah
 %
 %           Do Not distribute with out written consent of M. L. Griss
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*)


(* pasN.PAS ---- the last file to be appended, close CATCH, do init *)
BEGIN     (*  Body of Catch  *)
IF initphase=0 THEN  (* Kludge to get into scope of CATCH *)
    BEGIN init; initphase := 1; firstp; END
ELSE BEGIN
    initphase := initphase + 1;
    idspace[xthrowing].val := nilref;
    catch_stk:=st;                        (* Capture Stack *)
    catch_bstk:=idspace[xbstack].val;     (* Capture Bstack *)
    xeval;
    initphase := initphase - 1;
   (* Return Point *)
    IF idspace[xthrowing].val <> nilref
    THEN BEGIN
	st:=catch_stk;
	r[2]:=catch_bstk;
	xunbindto; (* return value, old stack *)
	END;
    END
END (* catch *);

BEGIN   (* Top Level *)
    initphase := 0;
    r[1] := nilref;
    Xcatch;
      writeln('halt after top catch');
 exit(pas0);
end.


REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]