SyntaxColoring.CheckVariableDeclaration.SetLimits
-------------------------------------------------

Sets limits for variable check.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SyntaxColoring](component_SyntaxColoring.md) | [10.2](newinversion102.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "SyntaxColoring.CheckVariableDeclaration.SetLimits" { ; Limit1; Limit2 } ) 

**MBS**( **"SyntaxColoring.CheckVariableDeclaration.SetLimits";** /\* Sets limits for variable check. \*/  
**$Limit1**; /\* Optional; How many lines to look up.e.g. 500 \*/   
**$Limit2**) /\* Optional; How long a script may be to not be checked at all.e.g. 2000 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Limit1 | How many lines to look up. | 500 | Optional |
| Limit2 | How long a script may be to not be checked at all. | 2000 | Optional |

### Result

Returns OK or error.

### Description

Sets limits for variable check.  
By default this returns 500 and 2000 as we look up to 500 lines up for variable declaration and don't check scripts with 2000 or more lines.  
Script workspace gets slower if we check &gt;500 lines on every change made.  
  
It may be good to repeat the variable declarations with @variable comments instead of increasing the limits.  
### Examples

Set higher limits:

 MBS ( "SyntaxColoring.CheckVariableDeclaration.SetLimits"; 600; 2400 )  
Reduce to half of the deault:

 MBS ( "SyntaxColoring.CheckVariableDeclaration.SetLimits"; 250; 1000 )  
### See also

- [SyntaxColoring.AutoCompleteVariables.SetEnabled](SyntaxColoringAutoCompleteVariablesSetEnabled.md)
- [SyntaxColoring.CheckVariableDeclaration.Disable](SyntaxColoringCheckVariableDeclarationDisable.md)
- [SyntaxColoring.CheckVariableDeclaration.Enable](SyntaxColoringCheckVariableDeclarationEnable.md)
- [SyntaxColoring.CheckVariableDeclaration.Enabled](SyntaxColoringCheckVariableDeclarationEnabled.md)
- [SyntaxColoring.CheckVariableDeclaration.GetLimits](SyntaxColoringCheckVariableDeclarationGetLimits.md)

### Blog Entries

- [Goodies 24: Auto Complete variables and functions](https://www.monkeybreadsoftware.com/filemaker/SyntaxColoring/24-AutoCompletevariablesandfunctions.shtml)
- [Goodies 12: Check variables](https://www.monkeybreadsoftware.com/filemaker/SyntaxColoring/12-Checkvariables.shtml)
- [Variable Name Auto Completion](https://www.mbsplugins.de/archive/2021-12-06/Variable_Name_Auto_Completion/monkeybreadsoftware_blog_filemaker)
- [News about the MBS FileMaker Plugin 10.2](https://www.mbsplugins.de/archive/2020-05-19/News_about_the_MBS_FileMaker_P/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 2nd May 2020 , last changed 17th October 2022

  
[SyntaxColoring.CheckVariableDeclaration.Notification.Enabled](SyntaxColoringCheckVariableDeclarationNotificationEnabled.md) - [SyntaxColoring.Clear](SyntaxColoringClear.md)

[HTML Version](SyntaxColoringCheckVariableDeclarationSetLimits.shtml)