Veluru
September 14th, 1999, 04:08 PM
Hi,
i have a problem with characters in Visual basic. somehow i need a character array and VB has something called Byte which is similar to that. i have the following code.
Dim hfiles as String * 80
Dim i As Integer
Dim temp(80) As Byte
Dim midchar As String
hfiles = "C:\Refprop\FLUIDS\R32.fld"
For i = 1 To 80
midchar = Mid(hfiles, i, 1)
temp(i) = CByte(midchar)
Next i
it is supposed to convert the character to byte but it is still giving a type mismatch error. Could anyone please tell me why this is happenning and how i could correct it.
Thanks,
Veluru
i have a problem with characters in Visual basic. somehow i need a character array and VB has something called Byte which is similar to that. i have the following code.
Dim hfiles as String * 80
Dim i As Integer
Dim temp(80) As Byte
Dim midchar As String
hfiles = "C:\Refprop\FLUIDS\R32.fld"
For i = 1 To 80
midchar = Mid(hfiles, i, 1)
temp(i) = CByte(midchar)
Next i
it is supposed to convert the character to byte but it is still giving a type mismatch error. Could anyone please tell me why this is happenning and how i could correct it.
Thanks,
Veluru