Christophe It could be because of your "Exit Sub" which can only be issued in a sub-procedure. Therefore, MB is interpreting your Sub Main as a sub-proc - so the module is treated as a sub-module and not the main module.
I don't see the need for the exit sub here - it is superfluous. It can be used to "bomb out" of a proc but not for an elegant end to it. J'�sp�re que celui-ci aide Terry -----Original Message----- From: Christophe Brabant [mailto:[EMAIL PROTECTED] Sent: 07 December 2004 14:59 To: MapInfo Help Subject: MI-L compile a Mapbasic program Hi everybody I don't understand why, when I compile a Mapbasic program, I always get a MBO file and not a MBX file. The structure is : Include "..\inc1.def" Include "..\inc2.def" Declare Sub Main Declare Sub sub1 Declare Sub sub2 '====================== Sub Main OnError Goto ErrorMain ....... Exit Sub ErrorMain : Note "Error" End Sub '====================== Sub sub1 ....... End Sub '====================== Sub sub2 ........ End Sub Thank you - Christophe --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14402
