Page 1 of 1

Assembler error

Posted: Thu Jun 19, 2003 2:02 pm
by Fenix
I got a problem with nested Select/Case statements. Compiling the source leads to following error:


PureBasic.asm[731]:
_Case0:
error: symbol already defined.

(using command line compiler shows: "Assembly error ! Please mail us the file")

Any idea why?



Fenix

Posted: Thu Jun 19, 2003 2:17 pm
by Fred
Can you post your code ?

Posted: Thu Jun 19, 2003 2:34 pm
by Fenix
Found the "error"!
It´s been two "empty" Select/Case statements (see : >>> lines)
Commenting those lines kills the "error"!

Code: Select all

   lEvent.l = WaitWindowEvent()                             ; Wait for event
   lEventWindow.l = EventWindowID()
   lEventMenu.l = EventMenuID()
   Select lEventWindow                                   ; check which window is affected
      Case #Main                                  ; main window?
>>>         Select EventGadgetID()                             ; check for gadget input
>>>         EndSelect
         Select lEventMenu                               ; check for menu input
            Case #mnOPTIONS
               Open_Options()
            Case #mnEXIT
               Goto Finish
            Case #mnABOUT
               Open_About()
         EndSelect
      Case #Options                               ; options window?
>>>         Select EventGadgetID()
>>>         EndSelect
      Case #About                                 ; about window?
         Select EventGadgetID()
            Case #bAboutOK                                  ; OK button -> closewindow
               CloseWindow(#About)
         EndSelect
   EndSelect
   
Until lEvent = #PB_Event_CloseWindow

Thx anyway

Fenix

Posted: Thu Jun 19, 2003 3:58 pm
by Fred
Nice one. I will fix it tonight.

Posted: Sat Jun 21, 2003 6:07 pm
by Fred
Fixed. For next version.