Simply the best answers.Get 100$ bonus
Fluent6: Documentation: UDF Manual: Section 3.2: Add the fact that multi-dimensional arrays don't work!
A UDF that contains and uses a multi-dimensional array ("real x") can be read by the UDF interpreter without error message. However, executing it generates unpredictable bad results.
It is only the static allocation of the array that goes wrong.
Allocating the memory dynamically works OK.
...set the following in you source code:
for (i = 0; i < 5; i++)
dat[i] = malloc(sizeof(real) * 10);
Then you can use the bi-dimensional array as you like.
If you want to make the array a global variable, you will have to do the allocation exactly once before the first access.