Changeset 4341


Ignore:
Timestamp:
10/13/03 11:50:32 (19 years ago)
Author:
piso
Message:

classOf(), typep()

File:
1 edited

Legend:

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

    r3888 r4341  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Ratio.java,v 1.35 2003-09-19 12:43:59 piso Exp $
     5 * $Id: Ratio.java,v 1.36 2003-10-13 11:50:32 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    6060    }
    6161
    62     public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    63     {
    64         if (typeSpecifier == Symbol.RATIO)
     62    public LispClass classOf()
     63    {
     64        return BuiltInClass.RATIO;
     65    }
     66
     67    public LispObject typep(LispObject type) throws ConditionThrowable
     68    {
     69        if (type == Symbol.RATIO)
    6570            return T;
    66         if (typeSpecifier == Symbol.RATIONAL)
     71        if (type == Symbol.RATIONAL)
    6772            return T;
    68         if (typeSpecifier == Symbol.REAL)
     73        if (type == Symbol.REAL)
    6974            return T;
    70         if (typeSpecifier == Symbol.NUMBER)
     75        if (type == Symbol.NUMBER)
    7176            return T;
    72         return super.typep(typeSpecifier);
     77        if (type == BuiltInClass.RATIO)
     78            return T;
     79        return super.typep(type);
    7380    }
    7481
Note: See TracChangeset for help on using the changeset viewer.