public void asignarValor(String id, Valor valor) { if (valores.ContainsKey(id)) { valores[id] = valor; } else { valores.Add(id, valor); } }
public void asignar(string mem, Valor val) { if (miembros.ContainsKey(mem)) { //if (miembros[mem].Tipo.esEquivalente(val.Tipo)) //{ miembros[mem] = val; //} //else throw new Exception("Tipos incompatibles."); } else throw new Exception("No existe ese miembro."); }
public void set(ArrayList indices, Valor valor) { int pos = MultipleToLineal(indices); Elementos[pos] = valor; //elementos.set(pos, valor); }