Changeset 3985


Ignore:
Timestamp:
09/22/03 11:07:33 (19 years ago)
Author:
piso
Message:

typeOf(), classOf(), typep()

File:
1 edited

Legend:

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

    r3575 r3985  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: DivisionByZero.java,v 1.1 2003-09-04 14:39:25 piso Exp $
     5 * $Id: DivisionByZero.java,v 1.2 2003-09-22 11:07:33 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3232        return "division by zero";
    3333    }
     34
     35    public LispObject typeOf()
     36    {
     37        return Symbol.DIVISION_BY_ZERO;
     38    }
     39
     40    public LispClass classOf()
     41    {
     42        return BuiltInClass.DIVISION_BY_ZERO;
     43    }
     44
     45    public LispObject typep(LispObject type) throws ConditionThrowable
     46    {
     47        if (type == Symbol.DIVISION_BY_ZERO)
     48            return T;
     49        if (type == BuiltInClass.DIVISION_BY_ZERO)
     50            return T;
     51        return super.typep(type);
     52    }
    3453}
Note: See TracChangeset for help on using the changeset viewer.