FLUENT 6 - Character declaration and initialization in interpreted UDFs


FLUENT does not permit the simultaneous type declaration and initialization of a character array in interpreted UDFs.

the following example will FAIL:

#include "udf.h"

DEFINE_ON_DEMAND(datout4)
{
char *digits[2]={"2","7"};
}
The workaround is to separate the character type declaration statement from the initialization statement.

The follwing example will work:

#include "udf.h"

DEFINE_ON_DEMAND(datout4)
{
char *digits[2];

digits[0]="2";
digits[1]="7";
}





Show Form
No comments yet. Be the first to add a comment!