Problem with variavle in C Code

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Halcon0653
Posts: 8
Joined: Sun Apr 21, 2019 5:16 pm
Has thanked: 3 times
Contact:

Problem with variavle in C Code

Postby Halcon0653 » Wed May 15, 2019 6:19 pm

Hello,
I have a problem trying to run C code in my FC6. It seems as it doesn't pay attention to it. For instance, the next easy program:
Sin título.png
Sin título.png (5.71 KiB) Viewed 295 times

The 'Test' variable, begins with a '0', changes to '1', remains with '2' because the C code doesn't work, and in the end of the program, the value is '3'.
But should be '4' if C code were working. Of course, when I complile the program, doesn't appear errors.
May Anyone tellme something?. Thank You in advance.

Halcon0653
Posts: 8
Joined: Sun Apr 21, 2019 5:16 pm
Has thanked: 3 times
Contact:

Re: Problem with variavle in C Code

Postby Halcon0653 » Wed May 15, 2019 6:20 pm

Sorry, I mean:
begins with a '0', changes to '1', remains with '1' because the C code doesn't work, and in the end of the program, the value is '2'.
But should be '3' if C code were working.

mnf
Valued Contributor
Valued Contributor
Posts: 456
Joined: Wed May 31, 2017 11:57 am
Has thanked: 49 times
Been thanked: 255 times
Contact:

Re: Problem with variavle in C Code

Postby mnf » Wed May 15, 2019 8:14 pm

The C code won't simulate in V6. Should work ok on a device.

If you upgrade to V8 you can simulate the C code- and this would give the result you expect.
These users thanked the author mnf for the post:
Halcon0653 (Thu May 16, 2019 9:17 am)
Rating: 5.88%
 

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 529 times
Been thanked: 1040 times
Contact:

Re: Problem with variavle in C Code

Postby kersing » Wed May 15, 2019 8:25 pm

Why are you asking the same question here you asked in the FC5 forum where you state that you’re using FC5 and do not want to upgrade?
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Halcon0653
Posts: 8
Joined: Sun Apr 21, 2019 5:16 pm
Has thanked: 3 times
Contact:

Re: Problem with variavle in C Code

Postby Halcon0653 » Thu May 16, 2019 9:18 am

OK!. Now I understand. Won´t simulate, but work on Chip.
Thank You.