set_variable

Declaration

set_variable (var_name, value: VARIANT)

Description

Sets the value of the variable named var_name to value. Use this function if you want to set a variable, but don't have a reference to it.

See Also

get_variable
script functions
Script Engine

Example

script get_unnamed_variable is
  name := 'section'
  section := 5
  varname := name . str (section) . '_grade'
  set_variable (varname, 56)
    -- 'section5_grade' now holds 56
end

script b is
  message ('called script b', Message_info)
end