There isn't away to exactly as you'd like, however you can create a "jagged array" like that very easily:

1
let arr = [| [| 1; 2 |] ; [| 1; 2 |] |]

The syntax to access is slightly different:

1
let x =arr.(0).(0)

The only really difference is that all subarrays are not guaranteed to be equal. If you really need a matrix style array it should be fairly easy to write a function to transform a jagged array into a matrix.

Cheers,
Rob

By on 2/27/2008 9:24 AM ()

Cool ! The jagged array will do.
Thanks,
v.

By on 2/28/2008 5:37 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper