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: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

FM.VariableAdd

Adds a value to a given variable atomically.

Component Version macOS Windows Linux Server iOS SDK
FM Variables 8.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "FM.VariableAdd"; Name; Value )   More

Parameters

Parameter Description Example
Name the name of the variable "test"
Value the value to add to the variable 5

Result

Returns new value or error.

Description

Adds a value to a given variable atomically.
Internally does similar to FM.VariableGet to read value, then adds given parameter and stores like FM.VariableSet, all in one operation, so no other script or calculation can get between.
Creates variable, if it's not existing yet.

Examples

Sets $ID and counts up with each call:

Set Variable [ $ID ; Value: MBS( "FM.VariableAdd"; "ID"; 1 ) ]

See also

Release notes

Blog Entries

This function checks for a license.

Created 8th June 2018, last changed 13th January 2020


FM.ValueListNames - FM.VariableAppend

💬 Ask a question or report a problem