LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

First line of code after a comment is seen as comment

Hello to all,
My problem is that the first line of code under a comment is seen as a comment.

for example:
// line of comment
if (Function1()) goto Error;
Function2();

The soft goes to Function2(), without executing the line above; and in debbug mode, I can't put a breakpoint in front of the first line, which has "no executable code" or so CVI say.
I 've got CVI 5.5, with patches downloaded on this site.
Any hint would be welcome, thanks, florent.
0 Kudos
Message 1 of 4
(3,346 Views)
I have seen something like this before.
My problem seemed to be something non printable that was encoded in the line.

I had been moving between CVI and another text editor
and belive some un-wanted formating got inserted that caused CVI to see the two lines as one line.

Try deleting the lines in question and re-typing.
Don't use cut and paste.

If that does not work, test it by inserting some
do nothing function in between and see how it is
effected. Insert a new comment line in between.
Message 2 of 4
(3,346 Views)
Thanks you Omar,it worked fine.
I've deleted my line of comment, which was effectively coming from another source project, and re-type it.
My worry now is to find a way to find how many time I may have this problem; the idea of putting breakpoints in front of each line of a 30-40 000 lines project is not very attractive to me.
Thanks again, florent.
0 Kudos
Message 3 of 4
(3,346 Views)
If you can find one more place where this happens,
then you can open the c file in a file viewer
that shows you all the characters
(line feed, carriage returns, etc) plus any ?funny one?
Then you may see what is wrong and how to fix it.
Then you can search the whole file for more.

When it happened to me I only had one (in a small file)
And fixed it without knowing just what caused it.
0 Kudos
Message 4 of 4
(3,346 Views)