Problem with Macro that return a string

Moderator: Benj

Post Reply
JCMB
Posts: 22
Joined: Wed Feb 08, 2006 3:15 pm
Location: St Etienne, France
Been thanked: 1 time
Contact:

Problem with Macro that return a string

Post by JCMB »

Compiling Test01.fcf to HEX give the error:
Test01.c(128:11): error: ',' expected
In Test01.c J read:
void FCM_HM2Txt2(MX_CHAR* FCR_RETVAL, MX_UINT8 FC_HM2TXT2_SZ_RETURN)
{

MX_CHAR

//Calcul
//Calcul:
// .Return = "abcdef"
FCI_SCOPY("abcdef",6, FCR_RETVAL,FC_HM2TXT2_SZ_RETURN);

}

What the use of MX_CHAR ?
Attachments
Test01.fcf
(11.5 KiB) Downloaded 292 times

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Problem with Macro that return a string

Post by Steve »

Thanks for this. We have seen this before and have solved it, but you will need for an official patch for an actual fix.

The problem affects all user macros that return a string.

There is a simple workaround for now. At the beginning of your macro, add a C code icon with the following text:

Code: Select all

string_return_bug_workaround;

Post Reply