|
Pulir codigo
tengo uma aplicacion en la que hay unos if anidados que miran los valores de una tabla y asignan otro en funcion del resultado
if agentsquadrant.Value='e1' then plantorn.Value:=escamotse1.value
else
if agentsquadrant.Value='e2' then plantorn.Value:=escamotse2.value
else
if agentsquadrant.Value='e3' then plantorn.Value:=escamotse3.value
else
if agentsquadrant.Value='e4' then plantorn.Value:=escamotse4.value
else
if agentsquadrant.Value='e5' then plantorn.Value:=escamotse5.value
else
if agentsquadrant.Value='e6' then plantorn.Value:=escamotse6.value
else
if agentsquadrant.Value='e7' then plantorn.Value:=escamotse7.value
else
if agentsquadrant.Value='e8' then plantorn.Value:=escamotse8.value
else
if agentsquadrant.Value='e7' then plantorn.Value:=escamotse9.value
else
if agentsquadrant.Value='e10' then plantorn.Value:=escamotse10.value;
pues bien quisiera hacer lo mismo pero con un bucle de forma que pudiera tener n valores i no solo 10
|