Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Viewing Intermediate Output


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-13-2008, 05:56 PM
Junior Member
 
Join Date: May 2007
Posts: 27
Awards Showcase
Beta Tester 
Total Awards: 1
Default Viewing Intermediate Output

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?
Reply With Quote
  #2 (permalink)  
Old 08-13-2008, 06:30 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

You can find the C# code under: C:\Documents and Settings\All Users\Application Data\Anywhere Software\Basic4ppc\6.0.0.0\Tzor
On Vista it is under ProgramsData.
Note that the generated code is not so easy to understand.

If you like you can post the sub's code and I'm sure that we will be able to help you find the problem.
Reply With Quote
  #3 (permalink)  
Old 08-13-2008, 08:53 PM
Junior Member
 
Join Date: May 2007
Posts: 27
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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
Reply With Quote
  #4 (permalink)  
Old 08-13-2008, 09:20 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

Can you please send me your project to erel@basic4ppc.com ?
Reply With Quote
  #5 (permalink)  
Old 08-14-2008, 08:59 PM
Junior Member
 
Join Date: May 2007
Posts: 27
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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
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 On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 12:26 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0