PDA

View Full Version : Warning No. 7



Clive Richmond
17-Jun-2018, 08:45 AM
In the FMAC and Package Build Notes 19.1 section (alpha-1) the following is mentioned.


Major Package and Code Merge
...
...
...
These are the three I am backing off on unless your do the compiler_warnings 7 thing. There were just too many of them.


Use of "item" in commands
Use of Get Syntax for global and external_functions instead of recommended Move (func…) syntax
Use of If evaluations outside of an expression (e.g., if iVal eq 1)



We would certainly like to enable this for last two items and have these reported. Is it still possible to do this? e.g.

#warning -7

In alpha-3 use the following syntax.


CompilerLevelWarning IfExp On

Stephen W. Meeley
17-Jun-2018, 08:48 AM
Clive,

Yes. Give it a try!

Nils G. Svedmyr
17-Jun-2018, 09:18 AM
Stephen,

When I just tried this in Alpah II I get this message;
"- Warning -7: C:\Projects\DF18\DbUpdateFramework\AppSrc\DUFCodeG enerator.src (ln 1) Error number out of range"

...after putting a "#warning -7" at the top of that program. Did I do something wrong?

Stephen W. Meeley
17-Jun-2018, 10:43 AM
Nils,

The syntax is "compiler_warnings 7"

Nils G. Svedmyr
17-Jun-2018, 11:56 AM
Aha, that worked much better. Thanks.

John Tuohy
18-Jun-2018, 02:27 PM
Don't get too comfortable with this because it will be changed in the next alpha - same capability but a different interface.

-John

Nils G. Svedmyr
18-Jun-2018, 02:30 PM
OK, thanks for the warning. I only added it to five programs so easy to change and I won't add it to any other programs after this information.

Clive Richmond
16-Jul-2018, 10:04 AM
Hi John,


Don't get too comfortable with this because it will be changed in the next alpha - same capability but a different interface.

Is there a compiler option to turn on the warnings when an application is compiled from the command line?

More information can be found in this reply (https://support.dataaccess.com/Forums/showthread.php?63011-Compiler-Options-Switches&p=335739#post335739)from Stephen.