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

Post Reply
User avatar
Rudi
Posts: 666
Joined: Mon Feb 10, 2014 4:59 am

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

Post by Rudi »

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='""' 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='""' 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 ;-)

User avatar
LeighM
Matrix Staff
Posts: 2043
Joined: Tue Jan 17, 2012 10:07 am
Contact:

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

Post by LeighM »

Hi Rudi
Thanks for your detailed report.
I'll add it to our list.
Thanks
Leigh

Post Reply