s-news
[Top] [All Lists]

[S] Vectors of classes

To: s-news@wubios.wustl.edu
Subject: [S] Vectors of classes
From: Brad Wallet <brad@mail.chromagraphics.com>
Date: Mon, 27 Dec 1999 11:54:40 -0800 (PST)
Sender: owner-s-news@wubios.wustl.edu
Hello,

Is there a way to construct a vector of a user defined class?  For
instance, suppose I have the following constructor:

myclass _ function(x=NULL, startx=0, stopx=0) {
     y _ list(x=x, startx=startx, stopx=stopx)
     class(y) _ "myclass"
     y
}

How can I construct an object, z, such that I could make the following
reference or something similar:

z[1]$x

Brad


----------------------------------------
Bradley C. Wallet
Director of Pattern Recognition Research
Chroma, Inc
+1(650)685-6811
http://www.chroma-corp.com/
http://www.chromaenergy.com/
http://www.chromagraphics.com/

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>
  • [S] Vectors of classes, Brad Wallet <=