Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: associative arrays


On Jun 19, 2005, at 3:44 AM, Ed Peschko wrote:

> hey all,
>
> Is there a simple way to make an associative array in mathematica?
>
> I noticed that there's a sparse array, but I'd like to be able to
> use a non-numeric value as key..

Don't use arrays, use pattern matching eg:

f[key1]=value1
f[key2]=value2


  • Prev by Date: Re: Transformation rule problem
  • Next by Date: Re: lists of variables
  • Previous by thread: Re: associative arrays
  • Next by thread: Re: associative arrays