ushort with error function type definition
Moderator: Benj
ushort with error function type definition
when you create a function in Flowcode v5, void Address_set (ushort x1, y1 ushort, ushort x2, y2 ushort) The unsigned integer variable is not set, I had to add the following code (ushort typedef unsigned int;), to compile correctly
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ushort with error function type definition
Hello,
I don't think ushort is standard C syntax which is why it is not supported by default. Some compilers may specifically type define this for you to use but most won't have it by default as they use the more generic unsigned int instead.
I don't think ushort is standard C syntax which is why it is not supported by default. Some compilers may specifically type define this for you to use but most won't have it by default as they use the more generic unsigned int instead.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ushort with error function type definition
the variable type (ushort) was defined by Flowcode, to create a new macro of type integer. when you try copilar gave error, undefined variable. agrege the definition of new type and compile correct. I just want you in Flowcode check where is the error for not being manually adding the definition of the variable type, which incidentally is new flowcode5.
regards
regards
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ushort with error function type definition
Hello,
I have just given this a go in v5.2 and the code seems to be being generated correctly.
Here is the C code from the macro I made.
void FCM_ben1(MX_UINT16 FCL_BEN1_TEST)
The MX_UINT16 is the Flowcode unsigned int data type.
I have just given this a go in v5.2 and the code seems to be being generated correctly.
Here is the C code from the macro I made.
void FCM_ben1(MX_UINT16 FCL_BEN1_TEST)
The MX_UINT16 is the Flowcode unsigned int data type.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel