/* Set/Get variables
name = value par
172638
static function val($name, $value = null) 
    {
        if ($value === null)
            return static::$vars[$name];
        static::$vars[$name] = $value;
    }
177414
public void setVariable(String name, Iterable<? extends WindupVertexFrame> frames)
    {
        Map<String, Iterable<? extends WindupVertexFrame>> frame = peek();
        if (!Iteration.DEFAULT_VARIABLE_LIST_STRING.equals(name) && findVariable(name) != null)
        {
            throw new IllegalArgumentException("Variable \"" + name
                        + "\" has already been assigned and cannot be reassigned");
        }

        frame.put(name, frames);
    }
285392
public void setBlockVariable( String name, Object value )
        throws UtilEvalError
    {
        super.setVariable( name, value, false/*strict?*/, false );
    }
771957
function (values, options, callback) {
            if (values) {
                var _value = null;
                for (var _name in values) {
                    if (values.hasOwnProperty(_name)) {
                        _value = values[_name];
                        if((callback && callback(_value, _name, options))!==false){
                            this.set(_name, _value, options);
                        }
                    }
                }
            }

            return this;
        }
737573
function setVars(origEnv, setVars) {
  var key;
  if (typeof setVars !== 'object')
    return;
  if (Array.isArray(setVars))
    return;
  for (key in setVars) {
    if (has(setVars, key)) {
      if (!has(origEnv, key)) {
        origEnv[key] = [
          !!has(process.env, key),
          process.env[key]
        ];
      }
      process.env[key] = setVars[key];
    }
  }
  return;
}
1093871
public static function set_variable($name, $value, $usevar = true) {
        $output = '';

        if ($usevar) {
            if (strpos($name, '.')) {
                $output .= '';
            } else {
                $output .= 'var ';
            }
        }

        $output .= "$name = ".json_encode($value).";";

        return $output;
    }
1296535
function parseAndPushVariableItem(varDeclaration, result) {
	for (var i = 0; i < varDeclaration.declarations.length; i++) {
		var item = varDeclaration.declarations[i];
		var variableInfo = {};

		variableInfo.name = item.id.name;
		if (item.init !== null) {
			variableInfo.type = item.init.type;
		}

		result.push(variableInfo);
	}
}
1029307
function _set_property(itemsObject, name, value) {
  const nameArray = name.split(".");
  if (nameArray[1]) {
    itemsObject[nameArray[0]][nameArray[1]] = value;
  } else {
    itemsObject[name] = value;
  }
}
1026351
@Override
    public void setTessVariable(String key, String value) {
        prop.setProperty(key, value);
    }
69607
function setGlobalVariable(key, value) {
        return _execute('PUT', '/variables', {
            key: key,
            value: value
        }, 'Could not add or update variable key [' + key + ' with value [' + value + ']');
    }
1260854
@Override
	protected void putVariables(Map<String, String> variables) {
		variables.put(ScopeFormat.SCOPE_HOST, hostname);
	}
878559
function getVariable (name, leafNode) {
  let node = leafNode

  while (node != null) {
    const variables = node.variables
    const variable = variables && variables.find(v => v.id.name === name)

    if (variable != null) {
      return variable
    }

    node = node.parent
  }

  return null
}
578097
public boolean setVariable(Object key, Object value) {
		boolean success = false;
		Object object = null;

		for (int i = working.size() - 1; i >= 0; --i) {
			Map<Object, Object> map = working.get(i);
			object = map.get(key);
			if (object != null) {
				map.put(key, value);
				success = true;
				break;
			}
		}
		if (!success) {
			object = global.get(key);
			if (object != null) {
				global.put(key, value);
				success = true;
			}
		}
		return success;
	}
257533
public Variable setLocalVariable(final String name, final Object value,
            final boolean strictJava) throws UtilEvalError {
        return this.setVariable(name, value, strictJava, false/* recurse */);
    }
647498
def match_var(self, tokens, item):
        """"""
        setvar, = tokens
        if setvar != wildcard:
            if setvar in self.names:
                self.add_check(self.names[setvar] + " == " + item)
            else:
                self.add_def(setvar + " = " + item)
                self.names[setvar] = item
864013
function getVariable(variable) {

  if ( cached.data == null ) {
    getData();
  }

  if (variable.toUpperCase() in cached.data ) {
    return cached.data[variable.toUpperCase()];
  } else if (variable in cached.data) {
    return cached.data[variable];
  }
}
69203
function $var(params, fn, envs) {
    if (params == null) {
        return params;
    }
    if (typeof params === 'string') {
        if (envs && envs[params] !== undefined) {
            return envs[params];
        }

        return;
    }
    if (Array.isArray(params) && params.length === 2) {
        const key = params[0];
        if (typeof key === 'string') {
            const value = fn.$var(key, fn, envs);

            return value === undefined ? params[1] : value;
        }
    }
    throw new Error(
        '$var expects a string or an array with two elements of which the first one must be a string'
    );
}