Changeset 4253


Ignore:
Timestamp:
10/08/03 17:26:49 (20 years ago)
Author:
piso
Message:

%VSET

File:
1 edited

Legend:

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

    r4252 r4253  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.464 2003-10-08 14:56:36 piso Exp $
     5 * $Id: Primitives.java,v 1.465 2003-10-08 17:26:49 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    18581858    {
    18591859        public LispObject execute(LispObject first, LispObject second,
    1860             LispObject third) throws ConditionThrowable
     1860                                  LispObject third)
     1861            throws ConditionThrowable
    18611862        {
    18621863            try {
     
    18751876        {
    18761877            return new Vector(args);
     1878        }
     1879    };
     1880
     1881    // ### %vset
     1882    // %vset vector index new-value => new-value
     1883    private static final Primitive3 _VSET =
     1884        new Primitive3("%vset", PACKAGE_SYS, false)
     1885    {
     1886        public LispObject execute(LispObject first, LispObject second,
     1887                                  LispObject third)
     1888            throws ConditionThrowable
     1889        {
     1890            try {
     1891                ((AbstractVector)first).set(Fixnum.getValue(second), third);
     1892                return third;
     1893            }
     1894            catch (ClassCastException e) {
     1895                throw new ConditionThrowable(new TypeError(first, "vector"));
     1896            }
    18771897        }
    18781898    };
Note: See TracChangeset for help on using the changeset viewer.