I use a floating point variable ALPHA. It gets a value and the next step is a macro call with input this variable ALPHA. In this macro this input variable does not change value.
Flowcode simulations shows after ending this macro that the value of ALPHA has been lost (=0). Moreover, this program does give a general C-translation error.
What is wrong?
Jan Lichtenbelt
Value lost after macro call
Moderator: Benj
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Value lost after macro call
- Attachments
-
- Store_fractional_number.fcf
- (11.73 KiB) Downloaded 584 times
- 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: Value lost after macro call
Hello Jan,
Right I found the problem. It was because the Alpha variable was being used in the return box for the Frac_To_Bytes macro call. Even though the box was greyed out the simulation was still trying to return to that variable. I have edited the macro call so that the greyed out return box is now empty and the program seems to be behaiving correctly now.
Compilation is now working correctly too.
Right I found the problem. It was because the Alpha variable was being used in the return box for the Frac_To_Bytes macro call. Even though the box was greyed out the simulation was still trying to return to that variable. I have edited the macro call so that the greyed out return box is now empty and the program seems to be behaiving correctly now.
Compilation is now working correctly too.
- Attachments
-
- Store_fractional_number.fcf
- (11.72 KiB) Downloaded 587 times
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
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: Value lost after macro call
Dear Ben,
I meet this problem again. I tried to copy the wrong macro into a new one, but with the same grey area with variable name in the output macro. How do I get rid of it? How did you manage that?
Jan Lichtenbelt
I meet this problem again. I tried to copy the wrong macro into a new one, but with the same grey area with variable name in the output macro. How do I get rid of it? How did you manage that?
Jan Lichtenbelt
- 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: Value lost after macro call
Hello Jan,
We are looking into resolving this problem. For now you will have to change the macro call for a call that does have the paramater. You can then delete the text in the parameter while the box is not greyed out and then you can switch the macro call back.
We are looking into resolving this problem. For now you will have to change the macro call for a call that does have the paramater. You can then delete the text in the parameter while the box is not greyed out and then you can switch the macro call back.
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