Strict Compilation Mode

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
alexGAzLSp
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 14
Joined: Wed Dec 07, 2011 1:39 pm

Strict Compilation Mode

Post by alexGAzLSp » Sun Feb 03, 2013 1:44 am

Hi, I have Strict Compilation Mode always set on in the preferences. With a previous background in more traditional languages, it makes a lot of sense to me. However many source code examples are built with this setting off. Is there a way of having that code treated separately in an application with no variable declarations without having to go through manually and adding declarations? Thanks, Alex

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Strict Compilation Mode

Post by dunbarx » Sun Feb 03, 2013 7:54 am

Hi.

If I understand you, is it that you want to test examples of offered code, by pasting into a stack, and temporarily turn off this mode? The reason being that variables included with such examples are usually not declared, and the engine complains?

I don't think so, since this is an IDE global preference, and not a property. Preferences do not seem to be settable via command. Oh, and I could be wrong.

I never use it. I have tripped over variables regularly, of course, and had I had the mode turned on, would have more easily tracked down typos and other related errors. But I grew up on Hypercard, and don't like fancy-pants formalities.

Anyone, though, know how to turn a preference into a property?

Craig Newman

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Strict Compilation Mode

Post by shaosean » Mon Feb 04, 2013 6:13 am

A plugin that would just set the appropriate flag in the preferences file could make it a property, but how would you set it? Maybe would could introduce "#pragma" to the language ;)

alexGAzLSp
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 14
Joined: Wed Dec 07, 2011 1:39 pm

Re: Strict Compilation Mode

Post by alexGAzLSp » Wed Feb 06, 2013 3:56 am

I think the #pragma is a good one. Local overrides od the compiler would fit the job nicely. Alex

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Strict Compilation Mode

Post by shaosean » Wed Feb 06, 2013 6:55 am

You feel like writing it, or want me to?

Post Reply