F# Multidimensional Array Types

Posted by SHiNKiROU on Stack Overflow See other posts from Stack Overflow or by SHiNKiROU
Published on 2010-05-25T23:50:54Z Indexed on 2010/05/26 0:01 UTC
Read the original article Hit count: 394

Filed under:
|

What's the difference between 'a[,,] and 'a[][][]? They both represent 3-d arrays. It makes me write array3d.[x].[y].[z] instead of array3d.[x, y, z].

Why I can't do the following?

> let array2d : int[,] = Array2D.zeroCreate 10 10;;
> let array1d = array2d.[0];;

error FS0001: This expression was expected to have type
    'a []    
but here has type
    int [,]

© Stack Overflow or respective owner

Related posts about F#

Related posts about multidimensional-array