Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

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