Changeset 3494
- Timestamp:
- 08/24/03 18:36:12 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/Primitives.java
r3489 r3494 3 3 * 4 4 * Copyright (C) 2002-2003 Peter Graves 5 * $Id: Primitives.java,v 1.34 6 2003-08-24 18:27:46piso Exp $5 * $Id: Primitives.java,v 1.347 2003-08-24 18:36:12 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 1414 1414 }; 1415 1415 1416 // ### defparameter 1417 // defparameter name initial-value [documentation] 1418 private static final SpecialOperator DEFPARAMETER = 1419 new SpecialOperator("defparameter") { 1420 public LispObject execute(LispObject args, Environment env) 1421 throws Condition 1422 { 1423 final int length = args.length(); 1424 if (length < 2 || length > 3) 1425 throw new WrongNumberOfArgumentsException(this); 1426 Symbol symbol = checkSymbol(args.car()); 1427 final LispThread thread = LispThread.currentThread(); 1428 LispObject initialValue = eval(args.cadr(), env, thread); 1429 symbol.setSymbolValue(initialValue); 1416 // ### %defparameter 1417 private static final Primitive3 _DEFPARAMETER = 1418 new Primitive3("%defparameter", PACKAGE_SYS, false) { 1419 public LispObject execute(LispObject first, LispObject second, 1420 LispObject third) 1421 throws LispError 1422 { 1423 Symbol symbol = checkSymbol(first); 1424 if (third instanceof LispString) 1425 symbol.setVariableDocumentation(third); 1426 else if (third != NIL) 1427 throw new TypeError(third, "string"); 1428 symbol.setSymbolValue(second); 1430 1429 symbol.setSpecial(true); 1431 thread.clearValues();1432 1430 return symbol; 1433 1431 }
Note: See TracChangeset
for help on using the changeset viewer.