Changeset 3859
 Timestamp:
 09/17/03 19:20:24 (20 years ago)
 Location:
 trunk/j/src/org/armedbear/lisp
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/j/src/org/armedbear/lisp/Bignum.java
r3781 r3859 3 3 * 4 4 * Copyright (C) 2003 Peter Graves 5 * $Id: Bignum.java,v 1.4 0 20030914 17:36:11piso Exp $5 * $Id: Bignum.java,v 1.41 20030917 19:19:52 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 43 43 } 44 44 45 public LispObject typep(LispObject typeSpecifier) throws LispError 46 { 47 if (typeSpecifier == Symbol.BIGNUM) 48 return T; 49 if (typeSpecifier == Symbol.INTEGER) 50 return T; 51 if (typeSpecifier == Symbol.RATIONAL) 52 return T; 53 if (typeSpecifier == Symbol.REAL) 54 return T; 55 if (typeSpecifier == Symbol.NUMBER) 56 return T; 57 if (typeSpecifier == Symbol.UNSIGNED_BYTE) 45 public LispClass classOf() 46 { 47 return LispClass.BIGNUM; 48 } 49 50 public LispObject typep(LispObject type) throws LispError 51 { 52 if (type == Symbol.BIGNUM) 53 return T; 54 if (type == LispClass.BIGNUM) 55 return T; 56 if (type == Symbol.INTEGER) 57 return T; 58 if (type == LispClass.INTEGER) 59 return T; 60 if (type == Symbol.RATIONAL) 61 return T; 62 if (type == LispClass.RATIONAL) 63 return T; 64 if (type == Symbol.REAL) 65 return T; 66 if (type == LispClass.REAL) 67 return T; 68 if (type == Symbol.NUMBER) 69 return T; 70 if (type == LispClass.NUMBER) 71 return T; 72 if (type == Symbol.UNSIGNED_BYTE) 58 73 return value.signum() >= 0 ? T : NIL; 59 return super.typep(type Specifier);74 return super.typep(type); 60 75 } 61 76 
trunk/j/src/org/armedbear/lisp/Fixnum.java
r3832 r3859 3 3 * 4 4 * Copyright (C) 20022003 Peter Graves 5 * $Id: Fixnum.java,v 1.6 7 20030916 19:01:07piso Exp $5 * $Id: Fixnum.java,v 1.68 20030917 19:20:24 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 47 47 } 48 48 49 public LispObject typep(LispObject typeSpecifier) throws LispError 50 { 51 if (typeSpecifier == Symbol.FIXNUM) 52 return T; 53 if (typeSpecifier == Symbol.INTEGER) 54 return T; 55 if (typeSpecifier == Symbol.RATIONAL) 56 return T; 57 if (typeSpecifier == Symbol.REAL) 58 return T; 59 if (typeSpecifier == Symbol.NUMBER) 60 return T; 61 if (typeSpecifier == Symbol.UNSIGNED_BYTE) 49 public LispClass classOf() 50 { 51 return LispClass.FIXNUM; 52 } 53 54 public LispObject typep(LispObject type) throws LispError 55 { 56 if (type == Symbol.FIXNUM) 57 return T; 58 if (type == LispClass.FIXNUM) 59 return T; 60 if (type == Symbol.INTEGER) 61 return T; 62 if (type == LispClass.INTEGER) 63 return T; 64 if (type == Symbol.RATIONAL) 65 return T; 66 if (type == LispClass.RATIONAL) 67 return T; 68 if (type == Symbol.REAL) 69 return T; 70 if (type == LispClass.REAL) 71 return T; 72 if (type == Symbol.NUMBER) 73 return T; 74 if (type == LispClass.NUMBER) 75 return T; 76 if (type == Symbol.UNSIGNED_BYTE) 62 77 return value >= 0 ? T : NIL; 63 if (type Specifier== Symbol.BIT)78 if (type == Symbol.BIT) 64 79 return (value == 0  value == 1) ? T : NIL; 65 return super.typep(type Specifier);80 return super.typep(type); 66 81 } 67 82
Note: See TracChangeset
for help on using the changeset viewer.