alg-form.red 797 B

12345678910111213141516171819202122232425262728293031
  1. module alg!-form; % Some particular algebraic mode analysis functions.
  2. % Author: Anthony C. Hearn.
  3. % Copyright (c) 1991 RAND. All rights reserved.
  4. global '(inputbuflis!* resultbuflis!* ws);
  5. symbolic procedure forminput(u,vars,mode);
  6. begin scalar x;
  7. u := cadr u; if eqcar(u,'!:int!:) then u := cadr u;
  8. if null(x := assoc(u,inputbuflis!*))
  9. then rerror(alg,1,list("Entry",u,"not found"));
  10. return caddr x
  11. end;
  12. put('input,'formfn,'forminput);
  13. symbolic procedure formws(u,vars,mode);
  14. begin scalar x;
  15. u := cadr u; if eqcar(u,'!:int!:) then u := cadr u;
  16. if x := assoc(u,resultbuflis!*) then return mkquote cdr x
  17. else rerror(alg,2,list("Entry",u,"not found"))
  18. end;
  19. put('ws,'formfn,'formws);
  20. endmodule;
  21. end;