Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3    Statistic    FMM    Blog  

SyntaxColoring.CheckVariableDeclaration.Enable

Enables checking variable declarations in FileMaker Scripts.

Component Version macOS Windows Linux Server iOS SDK
SyntaxColoring 3.5 ✅ Yes ❌ No ❌ No ❌ No ❌ No
MBS( "SyntaxColoring.CheckVariableDeclaration.Enable" )

Parameters

none

Result

Returns OK on success.

Description

Enables checking variable declarations in FileMaker Scripts.
Settings are saved in preferences files and you can use different settings in different FileMaker versions.
Works with FileMaker 11 or newer.
Checking variable declarations can only be enabled in FileMaker Pro, not in server or runtime versions.
By default this is off. It takes some additional CPU time for drawing the script and not everyone may want to have it on. Of course the extra work for the CPU should not be noticeable to the developer. Variable names declared inside Let commands are not recognized.
May only work in Advanced version of FileMaker.

You can declare variables in comment when writing @param, @variable or @constant in the comment followed by variable name.

Examples

Enable or disable checking variable declarations:

If (Enable)
      Set Variable [$r; MBS( "SyntaxColoring.CheckVariableDeclaration.Enable" )]
else
      Set Variable [$r; MBS( "SyntaxColoring.CheckVariableDeclaration.Disable" )]
end if

Use @variable to declare variable:

# Declare variable via comment as plugin has no way to know easily that $test is defined here
# @variable $test
Insert Current Time [ Select ; Target: $test ]

Declare variable via comment:

# Declare variables via comment as plugin has no way to know easily that $test is defined here
# @parameter $param1
# @parameter $param2
Set Variable [ $r ; Value: Let ( [ parameters = Get(ScriptParameter); $param1 = GetValue(parameters; 1); $param2 = GetValue(parameters; 2) ] ; 1 ) ]

See also

Blog Entries

Created 18th August 2014, last changed 15th December 2019


SyntaxColoring.CheckVariableDeclaration.Disable - SyntaxColoring.CheckVariableDeclaration.Enabled

Feedback: Report problem or ask question.




Links
MBS FileMaker blog

Start Chat