>Hello - Unfortunately vfp software doesn't let me create a square sparse matrix (as is doing - for example Matlab software); because I need to overcome the limit of 65,000 memory variables (even double ...) , I'm looking for a solution - anyone has a idea - it is welcome. Thanks in advance for your help, bye, Sorin
(1) Use Collections - the key would be the string of the index
For mulitdimension you'll need to add other collecttions
This becomes a bit messy
(2) If all elements are the same type, use SafeArray
SafeArrays are allocated by windows
http://msdn.microsoft.com/en-us/library/ms221145(v=VS.85).aspx- SaveArrayCreate() or SafeArrayCreateEx() for structures
You can specify the number of dimensions and the lower/upperbounds for each dimension
- SafeArrayCreateVector() for one dimensional arrays
- SafeArrayDestroy() when you no longer need it
- SafeArrayPutElement () to assign a value to an element
- SafeArrayGetElement() to get the contents fo an element
(3) a Cursor may be the simplest way
Gregory