#property strict - Giving lot of warnings

 

Hello,


When i add #property strict it gives me lot of working.


Before adding Property Strict : 10 warning


After adding Property Strict :65 warnings



Is this normal?.

 
One has to take compiler warnings seriously. Those warnings help you make your code better. However you can execute your code without solving warnings.
 
In the MQL5 programming language, `#property strict` is a preprocessor directive used to enable strict mode during code compilation. When this directive is activated, the compiler becomes more rigorous regarding syntax and language rules, helping to detect potential errors and issues in the code during compilation. This can improve the quality and robustness of the code by helping to prevent common errors.
 
  1. strict only applies to MT4. It is automatic in MT5.

    Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
    Next time, post in the correct place. The moderators will likely move this thread there soon.

  2. Always use strict. Fixing the warnings will save you hours of debugging, but you must understand the differences.

Reason: