Hello
1.If I have in a user macro a "return variable an " , all time show " an" 0x00.....dont work
2.After close and reopen v5,locale variablen (.return) in the debug-window are loost...
Both points are working in V4 ok
Regards Wolfgang
user macro .return
Moderator: Benj
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
- Contact:
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: user macro .return
Thanks Wolfgang - I will take a look tomorrow. I hope this doesn't cause too much concern when you are debugging. I assume this is only for the .return variable and all other locals are being reported OK.
Jonny
Jonny
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
- Contact:
Re: user macro .return
Hello Jonny
Unfortunately I must tell you,after test again , with lokal : return, Parameters,constants and variable;
(point 2. loost after..) refer for all four lokal types.
Have a nice evening wolfgang
Unfortunately I must tell you,after test again , with lokal : return, Parameters,constants and variable;
(point 2. loost after..) refer for all four lokal types.
Have a nice evening wolfgang
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
- Contact:
Re: user macro .return
Hello Jonny
Do you have any idea what going wrong the value of the return variable all times 0 ?
Point 2. with these i can live.......
Regards Wolfgang
Do you have any idea what going wrong the value of the return variable all times 0 ?
Point 2. with these i can live.......
Regards Wolfgang
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: user macro .return
Hi Wolfgang.
I am having problems replicating your issue. Can you post an example program replicating this issue and I can look into it?
Cheers,
Jonny
I am having problems replicating your issue. Can you post an example program replicating this issue and I can look into it?
Cheers,
Jonny
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
- Contact:
Re: user macro .return
Hello Jonny
V4 work a different way as V5:
V5 : If the red bevel mark "end icon" (inside the call macro) >> one more "step into" >> red bevel mark "Call Macro" in the main,without change the variable >> one more "step into" the value have the correct value oh oh............
V4 : If the red bevel mark "end icon" (inside the call macro) >> one more "step into" >> red bevel mark the next icon in the main,and the value change.
consequence : no error
but point 2. exist real.
Regards Wolfgang
V4 work a different way as V5:
V5 : If the red bevel mark "end icon" (inside the call macro) >> one more "step into" >> red bevel mark "Call Macro" in the main,without change the variable >> one more "step into" the value have the correct value oh oh............
V4 : If the red bevel mark "end icon" (inside the call macro) >> one more "step into" >> red bevel mark the next icon in the main,and the value change.
consequence : no error
but point 2. exist real.
Regards Wolfgang
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: user macro .return
Hi. No probs. v5 works differently to v4 as it tries to tie in more closely with what you would see on the chip.
On the chip, when you call a macro the returned value is stored in a temporary location (in a register or on the stack). Only once you return from the function does the program copy the temporary value into your destination variable. As this is technically 2 separate stages v5 shows these if you single-step. This is how most debuggers behave.
I will ensure that local variables are remembered correctly across saves in future Flowcode revisions. I hope this is only a cosmetic issue and not too much of a problem for you.
Jonny
On the chip, when you call a macro the returned value is stored in a temporary location (in a register or on the stack). Only once you return from the function does the program copy the temporary value into your destination variable. As this is technically 2 separate stages v5 shows these if you single-step. This is how most debuggers behave.
I will ensure that local variables are remembered correctly across saves in future Flowcode revisions. I hope this is only a cosmetic issue and not too much of a problem for you.
Jonny
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
- Contact: