Compilation error: semi colon expected

Caravelle

Active Member
Licensed User
Longtime User
This occurs on my Win XP2 laptop using B4PPC v6.8. The program is a simple sqlite data search widget in which I type in a search string and get back the relevant data. It works perfectly when run from the IDE but it won't compile (optimised) for a Windows.exe, giving the error message:
"Error message: error CS1002: ; expected
Line number: 38
Line: Temp=Temp & recList.Item(9) & " " recList.Item(10) & " " & recList.Item(11)"
[If anyone knows how to copy and paste these error messages, please let me know!]

So what's this about a semi-colon being expected?
The entire program is attached, but not the 40 Megabyte database it looks at. I wrote it for use on the laptop, so haven't attempted to compile it for my iPAQ.

Many thanks in advance for any clues how to fix this.

Caravelle
 

Attachments

  • LogSearch.sbp
    2.8 KB · Views: 219
Last edited:

Caravelle

Active Member
Licensed User
Longtime User
Ah, that fixed it, thanks.

The Delphi equivalent I'm used to wouldn't have run from the IDE with a concatenation error like that - I sort of assumed that if it runs OK, it's OK.

So how come the error message says that a semi-colon is expected? One for the confusing error message list?

Thanks again, now to move on to the next one.

Caravelle
 

agraham

Expert
Licensed User
Longtime User
So how come the error message says that a semi-colon is expected?
For optimised compilation the code is translated to C#. In C# every statement is terminated by a semi-colon. Without the ampersand the optimising compiler translated the code into an erroneous form where the C# compiler thought that a statement had ended without the terminating semi-colon. Hence the error.
 

Caravelle

Active Member
Licensed User
Longtime User
<sigh>

As far as I'm concerned the main purpose of any programming language other than a variety of C is to avoid the user having to work with any variety of C !

Thanks

Caravelle
 
Top