numeros romanos
hola tengo un que terminar un programa que ingrese un numero y lo devueva segun el usuario quiera, por ejemplo yo escribo " 4 " y le doy click en romano, el programa lo devuelbe asi: " IV "
, el caso es de que lo devuelva en donde lo escribe uno y si le preciono español, de esto : "IV" aparece esto :" cuatro " y asi sucecibamente, el problema es de que I , II , III y IV lo toma I nadamas, esto es parte del codigo:
do case
case (thisform.tipo.value)=1
*numero uno romano
if (thisform.numero.value)="1"
thisform.numero.value="I"
else
if (thisform.numero.value)="uno"
thisform.numero.value="I"
else
if (thisform.numero.value)="one"
thisform.numero.value="I"
else
if (thisform.numero.value)="I"
thisform.numero.value="I"
endif
endif
endif
endif
case(thisform.tipo.value)=2
* numero uno ingles
if (thisform.numero.value)="1"
thisform.numero.value="one"
else
if (thisform.numero.value)="uno"
thisform.numero.value="one"
else
if (thisform.numero.value)="one"
thisform.numero.value="one"
else
if (thisform.numero.value)="I"
thisform.numero.value="one"
endif
endif
endif
endif
case(thisform.tipo.value)=3
*numero uno español
if (thisform.numero.value)="1"
thisform.numero.value="uno"
else
if (thisform.numero.value)="uno"
thisform.numero.value="uno"
else
if (thisform.numero.value)="one"
thisform.numero.value="uno"
else
if (thisform.numero.value)="I"
thisform.numero.value="uno"
endif
endif
endif
endif
case(thisform.tipo.value)=4
*numero uno en numero
if (thisform.numero.value)="1"
thisform.numero.value="1"
else
if (thisform.numero.value)="uno"
thisform.numero.value="1"
else
if (thisform.numero.value)="one"
thisform.numero.value="1"
else
if (thisform.numero.value)="I"
thisform.numero.value="1"
endif
endif
endif
endif
endcase
*empiesa el numero 2
*numero dos en romano
do case
case (thisform.tipo.value)=1
if (thisform.numero.value)="2"
thisform.numero.value="ii"
else
if (thisform.numero.value)="dos"
thisform.numero.value="ii"
else
if (thisform.numero.value)="two"
thisform.numero.value="ii"
else
if (thisform.numero.value)="ii"
thisform.numero.value="ii"
else
endif
endif
endif
endif
*numero dos en ingles
case(thisform.tipo.value)=2
if (thisform.numero.value)="2"
thisform.numero.value="two"
else
if (thisform.numero.value)="dos"
thisform.numero.value="two"
else
if (thisform.numero.value)="two"
thisform.numero.value="two"
else
if (thisform.numero.value)="ii"
thisform.numero.value="two"
endif
endif
endif
endif
*numero dos en español
case(thisform.tipo.value)=3
if (thisform.numero.value)="2"
thisform.numero.value="dos"
else
if (thisform.numero.value)="dos"
thisform.numero.value="dos"
else
if (thisform.numero.value)="ii"
thisform.numero.value="dos"
else
if (thisform.numero.value)="two"
thisform.numero.value="dos"
endif
endif
endif
endif
* umero dos
case(thisform.tipo.value)=4
if (thisform.numero.value)="2"
thisform.numero.value="2"
else
if (thisform.numero.value)="dos"
thisform.numero.value="2"
else
if (thisform.numero.value)="two"
thisform.numero.value="2"
else
if (thisform.numero.value)="II"
thisform.numero.value="2"
endif
endif
endif
endif
endcase
do case
case (thisform.tipo.value)=1
empiesa el numero tres
if (thisform.numero.value)="3"
thisform.numero.value="III"
else
if (thisform.numero.value)="tres"
thisform.numero.value="III"
else
if (thisform.numero.value)="three"
thisform.numero.value="III"
else
if (thisform.numero.value)="III"
thisform.numero.value="III"
else
thisform.numero.value="fuera de rango"
endif
endif
endif
endif
*numero tres en ingles
case(thisform.tipo.value)=2
if (thisform.numero.value)="3"
thisform.numero.value="three"
else
if (thisform.numero.value)="tres"
thisform.numero.value="three"
else
if (thisform.numero.value)="three"
thisform.numero.value="three"
if (thisform.numero.value)="III"
thisform.numero.value="three"
endif
endif
endif
*empieza el 3 en español
case(thisform.tipo.value)=3
if(thisform.numero.value)="3"
thisform.numero.value="tres"
else
if (thisform.numero.value)="tres"
thisform.numero.value="tres"
else
if (thisform.numero.value)="three"
thisform.numero.value="tres"
else
if(thisform.numero.value)="III"
thisform.numero.value="tres"
endif
endif
endif
*empieza el 3 en numero
case(thisform.tipo.value)=4
if (thisform.numero.value)="3"
thisform.numero.value="3"
else
if (thisform.numero.value)="tres"
thisform.numero.value="3"
else
if (thisform.numero.value)="three"
thisform.numero.value="3"
else
if (thisform.numero.value)="III"
thisform.numero.value="3"
else
thisform.numero.value="fuera de rango"
endif
endif
endif
endcase
gracias por su ayuda
, el caso es de que lo devuelva en donde lo escribe uno y si le preciono español, de esto : "IV" aparece esto :" cuatro " y asi sucecibamente, el problema es de que I , II , III y IV lo toma I nadamas, esto es parte del codigo:
do case
case (thisform.tipo.value)=1
*numero uno romano
if (thisform.numero.value)="1"
thisform.numero.value="I"
else
if (thisform.numero.value)="uno"
thisform.numero.value="I"
else
if (thisform.numero.value)="one"
thisform.numero.value="I"
else
if (thisform.numero.value)="I"
thisform.numero.value="I"
endif
endif
endif
endif
case(thisform.tipo.value)=2
* numero uno ingles
if (thisform.numero.value)="1"
thisform.numero.value="one"
else
if (thisform.numero.value)="uno"
thisform.numero.value="one"
else
if (thisform.numero.value)="one"
thisform.numero.value="one"
else
if (thisform.numero.value)="I"
thisform.numero.value="one"
endif
endif
endif
endif
case(thisform.tipo.value)=3
*numero uno español
if (thisform.numero.value)="1"
thisform.numero.value="uno"
else
if (thisform.numero.value)="uno"
thisform.numero.value="uno"
else
if (thisform.numero.value)="one"
thisform.numero.value="uno"
else
if (thisform.numero.value)="I"
thisform.numero.value="uno"
endif
endif
endif
endif
case(thisform.tipo.value)=4
*numero uno en numero
if (thisform.numero.value)="1"
thisform.numero.value="1"
else
if (thisform.numero.value)="uno"
thisform.numero.value="1"
else
if (thisform.numero.value)="one"
thisform.numero.value="1"
else
if (thisform.numero.value)="I"
thisform.numero.value="1"
endif
endif
endif
endif
endcase
*empiesa el numero 2
*numero dos en romano
do case
case (thisform.tipo.value)=1
if (thisform.numero.value)="2"
thisform.numero.value="ii"
else
if (thisform.numero.value)="dos"
thisform.numero.value="ii"
else
if (thisform.numero.value)="two"
thisform.numero.value="ii"
else
if (thisform.numero.value)="ii"
thisform.numero.value="ii"
else
endif
endif
endif
endif
*numero dos en ingles
case(thisform.tipo.value)=2
if (thisform.numero.value)="2"
thisform.numero.value="two"
else
if (thisform.numero.value)="dos"
thisform.numero.value="two"
else
if (thisform.numero.value)="two"
thisform.numero.value="two"
else
if (thisform.numero.value)="ii"
thisform.numero.value="two"
endif
endif
endif
endif
*numero dos en español
case(thisform.tipo.value)=3
if (thisform.numero.value)="2"
thisform.numero.value="dos"
else
if (thisform.numero.value)="dos"
thisform.numero.value="dos"
else
if (thisform.numero.value)="ii"
thisform.numero.value="dos"
else
if (thisform.numero.value)="two"
thisform.numero.value="dos"
endif
endif
endif
endif
* umero dos
case(thisform.tipo.value)=4
if (thisform.numero.value)="2"
thisform.numero.value="2"
else
if (thisform.numero.value)="dos"
thisform.numero.value="2"
else
if (thisform.numero.value)="two"
thisform.numero.value="2"
else
if (thisform.numero.value)="II"
thisform.numero.value="2"
endif
endif
endif
endif
endcase
do case
case (thisform.tipo.value)=1
empiesa el numero tres
if (thisform.numero.value)="3"
thisform.numero.value="III"
else
if (thisform.numero.value)="tres"
thisform.numero.value="III"
else
if (thisform.numero.value)="three"
thisform.numero.value="III"
else
if (thisform.numero.value)="III"
thisform.numero.value="III"
else
thisform.numero.value="fuera de rango"
endif
endif
endif
endif
*numero tres en ingles
case(thisform.tipo.value)=2
if (thisform.numero.value)="3"
thisform.numero.value="three"
else
if (thisform.numero.value)="tres"
thisform.numero.value="three"
else
if (thisform.numero.value)="three"
thisform.numero.value="three"
if (thisform.numero.value)="III"
thisform.numero.value="three"
endif
endif
endif
*empieza el 3 en español
case(thisform.tipo.value)=3
if(thisform.numero.value)="3"
thisform.numero.value="tres"
else
if (thisform.numero.value)="tres"
thisform.numero.value="tres"
else
if (thisform.numero.value)="three"
thisform.numero.value="tres"
else
if(thisform.numero.value)="III"
thisform.numero.value="tres"
endif
endif
endif
*empieza el 3 en numero
case(thisform.tipo.value)=4
if (thisform.numero.value)="3"
thisform.numero.value="3"
else
if (thisform.numero.value)="tres"
thisform.numero.value="3"
else
if (thisform.numero.value)="three"
thisform.numero.value="3"
else
if (thisform.numero.value)="III"
thisform.numero.value="3"
else
thisform.numero.value="fuera de rango"
endif
endif
endif
endcase
gracias por su ayuda