![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello,
I am working on a B4P project, and although there is nothing syntactically wrong with the code, I am receiving the CS1002 error. Supposedly a ";" is expected on the line that reads, "End Sub." As far as I can tell, no loops, decision blocks, or other scoping constructs are out of order, so I want to look at the C# code being generated to figure out what's happening. I understand that the translation process typically negates the need for the developer to even know about the CS code, but in this case it would be very helpful to read. Any ideas? |
|
|||
|
Thanks Erel. You are right; that code is really hard to read. Here are some snipets of what I have:
In Sub AppStart: AddForm("frmClock","Test Form") AddTimer ("tmrClock") tmrClock.Interval = 1000 tmrClock.Enabled = True AddEvent("tmrClock", Tick, "tmrClock_Tick") And now the timer Sub: Sub tmrClock_Tick GetTime If CheckAlarm = True Then Return CheckQuarter CheckHalf CheckThreeQuarters CheckHour End Sub It's this last "End Sub" that is causing the optimizing compiler to error out. CheckAlarm, CheckQuarter, etc are all boolean functions. What is odd is that the unoptimized version compiles, and B4P indicates the code is error free. Since this is a port of an existing shareware product, I can't release the entire source code. If more snippets are needed, please let me know. Thanks very much for the help. Steve |
|
||||
|
Can you please send me your project to erel@basic4ppc.com ?
|
|
|||
|
Hi Erel,
Thanks for the offer. After doing some massive surgery on my code, I found the problem. Several hundred lines down, I had a line which read: pathToCheck = pathList.Item(i]) As this was a port from C, I somehow let the } slip by when I was porting to B4P. In a future version, would it be possible for the code parser to recognize mismatching expressions and coding errors such as String3 = String1 + String2 I am really loving the speed increase that we can enjoy with the translation to .Net code. Thanks for all the work you've put into this product. Best regards, Steve |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GPSInt - Microsoft GPS Intermediate Driver Interface | hsandy | Additional Libraries | 51 | 11-03-2008 06:30 AM |
| Viewing Hex in a ML TextBox | Zenerdiode | Questions & Help Needed | 1 | 10-09-2008 06:36 PM |
| Text output with scrollbar...? | TWELVE | Questions & Help Needed | 2 | 04-28-2008 10:37 AM |
| Strange subroutine output | petrbury | Bug Reports | 3 | 01-31-2008 08:18 PM |
| Viewing Options | RandomCoder | Forum Discussion | 3 | 09-25-2007 12:31 PM |