edit/duplicate makro - return type not show/not correct type

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

User avatar
Rudi
Posts: 666
Joined: Mon Feb 10, 2014 4:59 am
Has thanked: 494 times
Been thanked: 188 times

edit/duplicate makro - return type not show/not correct type

Postby Rudi » Wed Jun 29, 2016 12:48 am

hi guys
sorry for this, too.
think have found the second small bug, that had annoyed me in the past too
Now I could catch him at last: here you go:

create an empty makro with string return
you will see this correct line if you export the makro:

Code: Select all

..
<return name='Return' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
<array size='20' />
..


bug1: if you try to edit this makro, the return type is not show again,
you do not know, what the makro is return just in time ( in edit mode )

return_1.png



now duplicate the makro two times and change the return

a) one times:
to byte
you will see this line if you export the makro
we have only a byte - line with the array size is the bug2

Code: Select all

..
<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
<array size='20' />
..


this relict of "<array size='20' />" makes the problem then in the call makro like you see here:
return_2.png



and in c code the return is missing
and works with the pointer technic from the preview string return as parameter..
( see to the last with create a new macro with return byte )

Code: Select all

..
void FCM_cpyReturn_String_change2byte(MX_UINT8 *FCR_RETVAL, MX_UINT16 FCRsz_RETVAL);
..


to do:
clean the line with <array size='20' />

b) second times:
no return
you will see this line if you export the makro
we have no return - line with the array size is the bug2

Code: Select all

..
<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' >
<array size='20' />
..


we have no return now selected, but
this relict of "<array size='20' />" makes the problem bug3 then in the call makro like you see here:

return_3.png



to do:
same like before,
clean the line with <array size='20' />

FYI:
with certain compiler flags stops the compiler because wrong return sometimes.


btw:
a new created makro with return byte show correct this line

Code: Select all

..
<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
</flowline>


and shows in c code correct:

Code: Select all

..
MX_UINT8 FCM_newByteReturn();
..



thanks
best wishes
rudi ;-)
These users thanked the author Rudi for the post (total 2):
EtsDriver (Wed Jun 29, 2016 6:46 am) • LeighM (Wed Jun 29, 2016 8:57 am)
Rating: 10.53%
 

User avatar
LeighM
Matrix Staff
Posts: 1920
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 461 times
Been thanked: 650 times
Contact:

Re: edit/duplicate makro - return type not show/not correct

Postby LeighM » Wed Jun 29, 2016 8:58 am

Hi Rudi
Thanks for your detailed report.
I'll add it to our list.
Thanks
Leigh
These users thanked the author LeighM for the post:
Rudi (Wed Jun 29, 2016 9:27 am)
Rating: 5.26%