« Back to Product

Documentation

SetValueInteger

 bool SetValueInteger (int $VariableID, int $Value) 

Parameters

VariableID

ID of the variable

Value

New value (64-bit integer, 32-bit on armhf systems)

Returns

If the function succeeds, it returns TRUE, otherwise FALSE.

Description

The function sets the value of the IP-Symcon variable with the ID VariableID to Value. The selected variable must have the type Integer. If the variable's type is not Integer, the function stops with an error. A conversion from Float (rounded) or Boolean (0/1) is done. For setting the variable type-unsafely you can use the function SetValue.

Warning

By default, integer variables are 64-bit integers with a range of -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. Only on armhf systems they are 32-bit integers with a range of -2,147,483,648 to 2,147,483,647. armhf is supported until Symcon 10.0.

Example

SetValueInteger(47788, $Number_persons);
Any questions?