Dear Mick

If source code (MB file) is fully self contained then it produces an
MBX.

If an MB file calls a subroutine ( and Declares it ) but does not give
code for the routine then the compiler produces an MBO. If Sub Main is
missing the compiler also produces an MBO.

You can produce a project file (MBP) that lists a set of MBOs to be
linked together and gives a name for the proposed MBX.

OK - so why would you want to do this?

Well firstly if you are using the standard MapBasic editor your source
code is limited to 64k in theory and anything from about 30K up to 64k
in practice. However an MBX as a collection of MBOs has no limit. ( We
have MBXs up to 900MB in size).

More importantly MBO files allow you to make use of reusable code, share
code development amongst a team of programmers and avoid unnecessary
recompilation of code that hasn't changed.

In other words if you develop a "cool" set of routines that say allow
map production or CAD tools then you probably want these in several
apps. By using MBOs you can achieve this without recompiling the code,
wihout cutting and pasting and also without giving your source code to
other developers who you might want to include your code.

Other programmers can use your code without knowing how it works ("Black
boxes") and when you improve code a quick recompilation of all projects
gets the latest code in all of them.

Hope this helps understanding of the concepts.

Bob
By Design
Wales





In message <002501bee6b2$1ef20fe0$c82a8bca@census>, SOLOMON ISLANDS
POPULATION CENSUS <[EMAIL PROTECTED]> writes
>Hello, greetings from the Solomons,
>
>I have been writing a few MapBasic programs for village searches and data 
>checking/updating  for the village tables we have here. One, which works fine, 
>creates a menu, depending on the item selected from the menu another .mbx is run 
>to find the input village etc.
>
>I was adapting this for another purpose, but found when I compiled the code it 
>created an *.mbo file, not an .mbx file which is what I was expecting. I 
>compared the two code listings and the I had not  inserted the:
>
>Sub exit_menu
>
>   '** Restore default menubar
>   Create Menu Bar as Default
>
>   '** Exit this application
>   Terminate Application "menu.mbx"
>
>End Sub
>
>Having inserted this it works fine. 
>The on line help gives me the following:
>
>"If the file compiles successfully, MapBasic creates a filename.MBX file (if the 
>file is a stand-alone program) or a filename.MBO file (if the file is part of a 
>multiple-module project). If the file generates compilation errors, MapBasic 
>displays a list of error messages at the bottom of the edit window"
>
>At the moment, the nature of my relatively simple programs means that I can do 
>what I want to do without setting up a multi module project, I do however remain 
>slightly confused by the differences between MBX/MBO/MBP and how they all fit 
>together etc. and would be interested in any pointers as to when this multi-
>module approach would be worth me exploring further.
>
>Thanks in advance
>
>Mick Saunders
>

-- 
Bob Young
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to