Changeset 3626


Ignore:
Timestamp:
09/08/03 17:18:07 (19 years ago)
Author:
piso
Message:

length()

File:
1 edited

Legend:

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

    r3193 r3626  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: DisplacedArray.java,v 1.1 2003-08-03 00:09:29 piso Exp $
     5 * $Id: DisplacedArray.java,v 1.2 2003-09-08 17:18:07 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3131        this.array = array;
    3232        this.offset = offset;
     33    }
     34
     35    public int length() throws LispError
     36    {
     37        if (getRank() == 1)
     38            return array.getDimension(0) - offset;
     39        throw new TypeError(this, "sequence");
    3340    }
    3441
Note: See TracChangeset for help on using the changeset viewer.