View Single Post
  #3 (permalink)  
Old 08-13-2008, 08:53 PM
Steve Steve is offline
Junior Member
 
Join Date: May 2007
Posts: 28
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