Strict Compilation Mode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 14
- Joined: Wed Dec 07, 2011 1:39 pm
Strict Compilation Mode
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
Re: Strict Compilation Mode
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
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
Re: Strict Compilation Mode
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 

-
- VIP Livecode Opensource Backer
- Posts: 14
- Joined: Wed Dec 07, 2011 1:39 pm
Re: Strict Compilation Mode
I think the #pragma is a good one. Local overrides od the compiler would fit the job nicely. Alex
Re: Strict Compilation Mode
You feel like writing it, or want me to?