KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Syntax Check is not a Code Sanity Check
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: July 9, 2025

The 4D syntax check is a useful feature to have 4D parse through the code in the database and report any issues detected. However, the syntax check is not a comprehensive sanity check. While many items may be flagged, due to some of the logic of the code, there can be cases where the syntax check does not flag something that might be flagged otherwise.

For example, if the database settings has the Compilation Path setting set to "All Variables are typed":



The syntax check will begin to flag variables that were not typed.
Variables can typically be typed by declaring them, however some 4D commands can impose a type on variables passed as a parameter. This means that even though a variable has not been typed through a declaration, it will not flag the variable as it has been implictly typed by the 4D command.

As the documentation mentions, the syntax check can be used to help, but it is on the developer to make sure that the variables are declared properly:
https://developer.4d.com/docs/Project/compiler#additional-options-compatibility

"You just have to make sure that all your variables are declared using the regular var syntax and that your method and function parameters are declared in their prototypes (the Check Syntax feature can help you detecting missing or invalid declarations)."