Variable Scope for Modification

A variable is only allowed to be modified within its scope of modification. The scope of modification is determined by 2 cases.

If the variable is defined in a simple declaration statement, then the variable can only be modified by the default assignment expression.
Example:
input var x = 1; // the input variable x cannot be modified after declaration

If the variable is defined in a complex declaration statement, then the variable can only be modified by the default assignment expression and the scope immediately after the variable declaration statement.
Example:
output var y = 1 // the variable y has a default value of 1
{
if( x = y )
y = -1; // the variable y can still be modified within this scope
}

// modifying variable y outside the scope of declaration will throw an error.