setVar(name,value)

Sets (or creates) a variable with given name and value


Syntax

o_setVar(name,value)
name: scalar Text - name of variable to be set (or created)
value: any any - value of the variable to be set (or created)
return: none

Usage

Use this to set an existing variable or create a new one automatically.

Location

menu: veeos ==> Data ==> setVar

library: dataLib

Example

o_setVar("myvar", 567) sets the variable myvar to the value 567.

Notes

One can of course create a new variable using a Set Variable object, and one can set a value using an assignment operator. This function essentially combines both features by setting the named variable if it already exists but also automatically creating a new variable if needed.

Reference

Dependencies

Supported On

VEE7.0+, all platforms

See Also

createConstant


© 2015-2025. All Rights Reserved. Stan Bischof (stan@worldbadminton.com). Last updated 03 February 2023 13:03.