set_variable()

Assigns a value to the given variable name. Calling set_variable('foo', bar) is equivalent to foo = bar.

(since 0.46.1) The value parameter can be an array type.

Signature

# Assigns a value to the given variable name
void set_variable(
  str variable_name,     # The name of the variable to set
  any value,             # The value to set the variable to
)

Arguments

Argument flattening is NOT SUPPORTED by this function.

The function set_variable() accepts the following positional arguments:

Name Type Description Tags
variable_name str

The name of the variable to set

value any

The value to set the variable to

The results of the search are