Escaped (or Comment) lines in Mapbasic script

311 views
Skip to first unread message

David Reid

unread,
Feb 9, 2017, 9:46:15 AM2/9/17
to MapInfo-L

Greetings all,

 

Does escaped lines within a MB script; those lines used as comments or notes, lines beginning with an apostrophe…  When the script is compiled, do these lines get ignored?  Or do they actually add to the overall size of the MBX?

 

I have a particular script where I have many lines of notes about several particular functions.  If I want to add or edit any scripting and try to compile, the MB compiler’s knees buckle and can’t compile the script because it’s too big.

 

Thanks,

 

David Reid

Bill Thoen

unread,
Feb 9, 2017, 10:13:03 AM2/9/17
to mapi...@googlegroups.com
Comments are not included in your compiled code. The compiler strips off anything that starts with an apostrophe to the carriage-return, even in object modules ( .mbo files )
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bill Thoen

unread,
Feb 9, 2017, 10:25:40 AM2/9/17
to mapi...@googlegroups.com
(I should read the whole message before responding!)
If you're getting "knee-buckling" behavior (i.e. Your script is too big; or >64k ) then you'll probably have to compile separate modules and then link them together, or be more sparing with your comments. Or you could create a separate document just for notes, like myCode.notes. The down side with that is that you now have 2 separate docs to maintain.

On Feb 9, 2017, at 9:46 AM, David Reid <dwr...@hiwaay.net> wrote:

--

Peter Horsbøll Møller

unread,
Feb 9, 2017, 10:46:01 AM2/9/17
to Bill Thoen, mapi...@googlegroups.com

I'm pretty sure we removed the 64k limit a while back…

What exact error are you getting?

 

Peter Horsbøll Møller
Pitney Bowes
Sent from my mobile - typos may occur

Thomas Bacon

unread,
Feb 9, 2017, 10:49:55 AM2/9/17
to mapi...@googlegroups.com

Bill’s spot on with this. If you’re reaching the 64kb limit, chances are your code could probably do with being split into modules anyway. Not only will it allow you to compile your code, but it will, provided you split your code up sensibly, help organise your code into discreet functional parts. I’ve only hit the 64kb limit a couple of times and in both cases benefited by splitting the code up into separate module files.

 

Tom


______________________________________________________________________

Mouchel Limited I Registered in England No. 1686040 Registered Office: WSP House, 70 Chancery Lane, London, Wc2A 1AF Part of WSP Global Inc. Confidential This message, including any document or file attached, is intended only for the addressee and may contain privileged and/or confidential information. Any other person is strictly prohibited from reading, using, disclosing or copying this message. If you have received this message in error, please notify the sender and delete the message. Thank you.
______________________________________________________________________

Uffe Kousgaard

unread,
Feb 9, 2017, 11:17:28 AM2/9/17
to mapi...@googlegroups.com
David may still be using a mapbasic compiler from before "a while back".

But I can see your ribbonlib has a 290 kb module, so at least from 12.5 it should handle large modules.

Regards
Uffe Kousgaard

David Reid

unread,
Feb 9, 2017, 6:00:20 PM2/9/17
to mapi...@googlegroups.com

Thanks Bill, this is what I suspected.  Quite a few lines (lots) are to create a big ole’ huge tool bar, that if it were in a mechanic’s shop would have every SAE, Metric, wrench, screwdriver; phillips, torx and more in it.  As I use this toolbar quite a bit, I think I’ll pull out all the code for it and put it in it’s own “toolbar only” mbx. This would significantly cut down on the size.

 

Many of my notes are regarding using an old map function that creates a small “vicinity” map to run in conjunction with BlueMarble Geotracker for doing my 9-1-1 Addressing. And I have it quite annotated but that helps me keep things in check when I need to edit it or repeat it elsewhere.

 

Still, I think it’s time I read up on “separate modules” nevertheless.

 

Thanks again old friend!

 

-Dave


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7998 / Virus Database: 4756/13915 - Release Date: 02/09/17

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7998 / Virus Database: 4756/13915 - Release Date: 02/09/17

David Reid

unread,
Feb 9, 2017, 6:01:24 PM2/9/17
to mapi...@googlegroups.com

It wasn’t removed a “while back enough”   :)

Sorry, I should have mentioned in my post, I’m still running 6.5 and have found as Bill stated, it is the 64k limit.   :)

 

Thanks Peter

 

-Dave

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7998 / Virus Database: 4756/13915 - Release Date: 02/09/17

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7998 / Virus Database: 4756/13915 - Release Date: 02/09/17

--

David Reid

unread,
Feb 9, 2017, 6:02:28 PM2/9/17
to mapi...@googlegroups.com

Yeah!   What Tom said  :))

 

Thanks for the input Tom

 

-Dave

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7998 / Virus Database: 4756/13915 - Release Date: 02/09/17

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7998 / Virus Database: 4756/13915 - Release Date: 02/09/17

--

Reply all
Reply to author
Forward
0 new messages