Function for setting a lexical variable.