MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Abstract data types

  • To: mathgroup at
  • Subject: [mg14003] Re: Abstract data types
  • From: "David Keith" <dkeith at>
  • Date: Sat, 12 Sep 1998 16:59:24 -0400
  • Organization: Hevanet Communications
  • References: <6tbum2$>
  • Sender: owner-wri-mathgroup at

I use the list method you describe. For example:

    newDataType = { {labelString, dateString}, {xlist, ylist, zlist} }

Since Mathematica allows list structures to appear on the left side, I
process items from a such a structure passed to a function by using

    { {label, date}, {xlist, ylist, zlist}} = argument

Where label, date, xlist, ylist, zlist  are variables private to the
module defining the function.


Morten N. Aasnes wrote in message <6tbum2$mru at>...
>Is there a way to make new datatypes in Mathematica? I have some
>routines for reading various sorts of data from files,  along with some
>information about the data, like label to use for plot, axis labels,
>etc. And I would like to be able to treat all this like  a single
>object. I supose I could just use a list, and have the first element be
>the data itself, the second element as the label, etc. and then have
>functions like setLabel/getLabel but this dosn't seem very elegant. Any
>Morten Nygaard Aasnes     mortena at       "Nothing's the same
>anymore" Fantoft Stud.By A626,     (+47)55276131            -Sinclair
>in b5:"Chrysalis" N-5036 FANTOFT, NORWAY

  • Prev by Date: Re: Select x s.t. y>10
  • Next by Date: Re: Graphics options converted to primitives?
  • Previous by thread: Abstract data types
  • Next by thread: Black-Scholes and exotic options