Changeset 8656


Ignore:
Timestamp:
02/28/05 00:58:44 (16 years ago)
Author:
piso
Message:

typeOf(), classOf(), typep(), writeToString()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Environment.java

    r8649 r8656  
    33 *
    44 * Copyright (C) 2002-2004 Peter Graves
    5  * $Id: Environment.java,v 1.19 2005-02-27 20:01:57 piso Exp $
     5 * $Id: Environment.java,v 1.20 2005-02-28 00:58:44 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5252        }
    5353        vars = new Binding(symbol, value, vars);
     54    }
     55
     56    public LispObject typeOf()
     57    {
     58        return Symbol.ENVIRONMENT;
     59    }
     60
     61    public LispObject classOf()
     62    {
     63        return BuiltInClass.ENVIRONMENT;
     64    }
     65
     66    public LispObject typep(LispObject type) throws ConditionThrowable
     67    {
     68        if (type == Symbol.ENVIRONMENT)
     69            return T;
     70        if (type == BuiltInClass.ENVIRONMENT)
     71            return T;
     72        return super.typep(type);
    5473    }
    5574
     
    200219    }
    201220
    202     public String writeToString()
    203     {
    204         return unreadableString("ENVIRONMENT");
     221    public String writeToString() throws ConditionThrowable
     222    {
     223        return unreadableString(Symbol.ENVIRONMENT);
    205224    }
    206225
     
    221240    };
    222241
    223     // ### environment-vars
     242    // ### environment-variables
    224243    private static final Primitive ENVIRONMENT_VARS =
    225         new Primitive("environment-vars", PACKAGE_SYS, false, "environment")
     244        new Primitive("environment-variables", PACKAGE_SYS, true, "environment")
    226245    {
    227246        public LispObject execute(LispObject arg) throws ConditionThrowable
Note: See TracChangeset for help on using the changeset viewer.