wdeclare.red 928 B

1234567891011121314151617181920212223242526272829
  1. %
  2. % WDECLARE.RED - Skeleton WDeclare for WConsts
  3. %
  4. % Author: Eric Benson
  5. % Symbolic Computation Group
  6. % Computer Science Dept.
  7. % University of Utah
  8. % Date: 9 March 1982
  9. % Copyright (c) 1982 University of Utah
  10. %
  11. % <PSL.COMP>WDECLARE.RED.2, 17-Nov-82 17:09:39, Edit by PERDUE
  12. % Flagged WDeclare IGNORE rather than EVAL, so it takes effect
  13. % at compile time rather than load time!
  14. fexpr procedure WDeclare U;
  15. for each X in cddr U do WDeclare1(car X, car U, cadr U, cadr X, caddr X);
  16. flag('(WDeclare), 'IGNORE);
  17. lisp procedure WDeclare1(Name, Scope, Typ, UpperBound, Initializer);
  18. if Typ = 'WCONST then
  19. if Scope = 'EXTERNAL and not get(Name, 'WCONST) then
  20. ErrorPrintF("*** A value has not been defined for WConst %r",
  21. Name)
  22. else% EvDefConst(Name, Initializer)
  23. put(Name, 'WConst, Initializer)
  24. else StdError BldMsg("%r is not currently supported", Typ);