Problema al leer currency
Publicado por Raul C (6 intervenciones) el 03/07/2007 19:55:51
Hola a todos:
Tengo el siguiente problema, el codigo dice:
Private Sub Command1_Click()
Open "I:\PROGRAMACION VB\070611-prueba\MADRE.taq" For Input As #10
Open "I:\PROGRAMACION VB\070611-prueba\res.taq" For Output As #20
Dim i As Integer
Dim puntomadre(10) As Long, xmadre(10) As Currency, ymadre(10) As Currency
Dim zmadre(10) As Currency
i = 1
Do While Not EOF(10)
Input #10, puntomadre(i), xmadre(puntomadre(i)), ymadre(puntomadre(i)),
zmadre(puntomadre(i))
Write #20, puntomadre(i), xmadre(puntomadre(i)), ymadre(puntomadre(i)), zmadre(puntomadre(i))
i = i + 1
Loop
Close #10
Close #20
End Sub
El archivo de datos dice:
1,234.3,656.5,678.4
2,376.3,598.5,321.3
Y el de resultados, inexplicablemente dice:
1,0,0,0
2,0,0,0
ALGUIEN ME LO PUEDE EXPLICAR. GRACIAS. AH, EN CONFIGURACION REGIONAL TENGO EL PUNTO DECIMAL Y LA COMA PARA SEPARACION DE MILES.
Tengo el siguiente problema, el codigo dice:
Private Sub Command1_Click()
Open "I:\PROGRAMACION VB\070611-prueba\MADRE.taq" For Input As #10
Open "I:\PROGRAMACION VB\070611-prueba\res.taq" For Output As #20
Dim i As Integer
Dim puntomadre(10) As Long, xmadre(10) As Currency, ymadre(10) As Currency
Dim zmadre(10) As Currency
i = 1
Do While Not EOF(10)
Input #10, puntomadre(i), xmadre(puntomadre(i)), ymadre(puntomadre(i)),
zmadre(puntomadre(i))
Write #20, puntomadre(i), xmadre(puntomadre(i)), ymadre(puntomadre(i)), zmadre(puntomadre(i))
i = i + 1
Loop
Close #10
Close #20
End Sub
El archivo de datos dice:
1,234.3,656.5,678.4
2,376.3,598.5,321.3
Y el de resultados, inexplicablemente dice:
1,0,0,0
2,0,0,0
ALGUIEN ME LO PUEDE EXPLICAR. GRACIAS. AH, EN CONFIGURACION REGIONAL TENGO EL PUNTO DECIMAL Y LA COMA PARA SEPARACION DE MILES.
Valora esta pregunta


0