[Haskell-cafe] Specify array or list size?
Antti-Juhani Kaijanaho
antti-juhani at kaijanaho.info
Sat May 7 15:52:15 EDT 2005
On 20050507T153105-0400, David Roundy wrote:
> In a multi-dimensional array, all the dimensions but the first (or last?)
> are fixed in size. Unfortunately, these are fixed at compile time, so
> there's no way to write a function that can act upon multidimensional
> arrays of arbitrary size. So we get the joy of writing terms like m[i+n*j]
> to deal with matrices...
In C99, you can use variable-length arrays for that, though compiler
support for that feature is lacking (in particular, GCC still gets VLAs
wrong).
--
Antti-Juhani Kaijanaho http://antti-juhani.kaijanaho.info/
Blogi - http://kaijanaho.info/antti-juhani/blog/
Toys - http://www.cc.jyu.fi/yhd/toys/
More information about the Haskell-Cafe
mailing list