public static IndexedVar AssignVarExt(VarCollection collection, ScopeGroup scope, string name, bool isGlobal, Node node) { int index = collection.NextFreeExtended(isGlobal); IndexedVar var = CreateVar( collection.WorkshopArrayBuilder, scope, name, isGlobal, collection.UseVariable(isGlobal), new Element[] { new V_Number(index) }, node ); collection.AllVars.Add(var); collection.UseExtendedCollection(isGlobal)[index] = var; return(var); }