C-Error due to filename

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
User avatar
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:

C-Error due to filename

Post by Jan Lichtenbelt »

Whatever can be is error message? (fout=error, resultaten=results)

I substract 2 integers: RC_Time_on=RC_Time_On - RC_Center. But this gives an error?????????
Error_message.jpg
Error_message.jpg (178.13 KiB) Viewed 6122 times
Who can help?

Kind regards

Jan Lichtenbelt

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Error substracting 2 integers

Post by JohnCrow »

Hi Jan

Thats a strange one.

Ive just tried a simple flowchart using your variable names, and it works regardless of which value is the larger.
(fout=error, resultaten=results)
Are you using any C code, I think fout is a file command in C.
1 in 10 people understand binary, the other one doesn't !

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Error substracting 2 integers

Post by kersing »

Jan,

A simple test program with just an integer subtraction works fine so it is probably something specific to your total program. PM the file if you want me to take a look.

Groeten,

Jac
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Error substracting 2 integers

Post by kersing »

JohnCrow wrote:
(fout=error, resultaten=results)
Are you using any C code, I think fout is a file command in C.
John,

As Jan stated, fout is the dutch translation of error. He was referring to the message at the bottom of the screen dump "Foutresultaten", "Error results" when using the English language setting.

fout is a standard construct in C++, not in C afaik.

Best regards,

Jac
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Error substracting 2 integers

Post by JohnCrow »

Yes, I see what Jan was refering to now.
Ah well it was the end of the day :)
1 in 10 people understand binary, the other one doesn't !

User avatar
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: Error substracting 2 integers

Post by Jan Lichtenbelt »

I have the feeling that it has to do with the ROM use (97%), but I'm not sure, see msg.txt file.

Jan Lichtenbelt
Attachments
RC_to_Motor_V20_12F1840.msg.txt
(6.25 KiB) Downloaded 244 times

User avatar
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: Error substracting 2 integers

Post by JonnyW »

Good morning Jan.

At a guess is the line that the error is showing up on line 1840 of the generated .c file?

It may be that the parsing is getting mixed up as to what is an error and what is not. How the error report works is it looks at the compiler output for the filename and a line number (we can not even guarantee the word 'error' is present). If it finds the .c files name and a line number it can link to an icon, it reports this in the error window.

I'd be surprised if this is the case, as the parser should see 12F1840 as a single word and discard it, but I'm at a loss from the msg.txt to find anything else that could cause this.

Jonny

User avatar
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: Error substracting 2 integers

Post by Jan Lichtenbelt »

Dear Johnny,

You are right. The error is on line 1840/1841 of the C-program. Changing the flowcode filename into test.fcf did not give this error message anymore.

Thanks a lot for help!!

Kind regards

Jan Lichtenbelt

User avatar
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: Error substracting 2 integers

Post by JonnyW »

How very odd. Thanks for letting me know - I'll look into this as I've been looking at the code this morning and cant see why this would be!

Cheers,

Jonny

User avatar
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:

C error on text equal filename

Post by Jan Lichtenbelt »

Again in a complete other situation, I get an error in C on the place where the text in C is equal to the filename. Now the error is in the first comment, which indeed contains the filename. The filename in this case is "RS232 RX flowcode_V2.2". The error given is in the comment which contains: "RS232 RX flowcode".

Remark: Foutresultaten means error results.
Filename_C_error.jpg
(385.46 KiB) Downloaded 1168 times
It stays indeed very odd, but consistent.

kind regards

Jan Lichtenbelt

Post Reply