Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Compilation error: semi colon expected

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-14-2010, 09:06 PM
Senior Member
 
Join Date: Sep 2009
Location: Surrey, UK
Posts: 111
Default Compilation error: semi colon expected

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
Attached Files
File Type: sbp LogSearch.sbp (2.8 KB, 5 views)
__________________
Caravelle
I learn by my mistakes - so I learn a lot in a short time.

Last edited by Caravelle : 01-14-2010 at 09:08 PM.
Reply With Quote
  #2 (permalink)  
Old 01-14-2010, 09:12 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

You are missing an ampersand. This is a classic error that the IDE lets you get away with but the compiler doesn't.

Temp = Temp & recList.Item(9) & " " & recList.Item(10) & " " & recList.Item(11)
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #3 (permalink)  
Old 01-15-2010, 12:18 AM
Senior Member
 
Join Date: Sep 2009
Location: Surrey, UK
Posts: 111
Default

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
__________________
Caravelle
I learn by my mistakes - so I learn a lot in a short time.
Reply With Quote
  #4 (permalink)  
Old 01-15-2010, 09:22 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Caravelle View Post
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.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #5 (permalink)  
Old 01-15-2010, 10:07 AM
Senior Member
 
Join Date: Sep 2009
Location: Surrey, UK
Posts: 111
Default

<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
__________________
Caravelle
I learn by my mistakes - so I learn a lot in a short time.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error CS0012 during compilation tsdt Questions (Windows Mobile) 4 01-06-2010 12:52 AM
ControlExDesktop compilation error derez Questions (Windows Mobile) 4 04-06-2009 04:28 PM
error compilation in smscontrol mircome Share Your Creations 1 01-01-2009 05:13 PM
Error during compilation mozaharul Questions (Windows Mobile) 2 06-10-2008 03:50 AM
6.01 Optimized compilation error dpriem Bug Reports 2 01-06-2008 04:42 PM


All times are GMT. The time now is 05:02 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0