Can anybody help please -- passing STRING to aSub record parameter field doesn’t seem to work.
My aSub record
record(aSub,"TRANSMIT")
{
field(INAM,"myfunctionInit")
……
field(INPA,"Test string")
field(FTA,"STRING")
field(NOA,"20")
……
}
myfunctionInit(aSubRecord * pSub)
{
……
char test[40];
strcpy(test, (char *)subr->a);
printf("Text: %s\n", test);
……
}
The printf statement doesn’ t print anything. When I check the length of the ‘test’ variable, it is always 0.
Have I done wrong?
Thanks,
Jim