|
-
September 14th, 1999, 04:08 PM
#1
Characters
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
-
September 15th, 1999, 01:34 AM
#2
Re: Characters
you can assign a string to a byte array like this
Dim str1 as string * 10
str1 = "test"
Dim b() as Byte
b = str1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|