I'm trying obtain the decimal value of a character.
The function is to receive a single character, convert it to an interger and then do the remainder of it's processing.
However, no matter what I've tried, I always get an error message.
Error messages include:
The beginning of the function is as follows:
I can successfully convert from an interger to a character, I just cannot go the other way. I'm originally from a C++ background, so I feel this should be an easy item.
I have tried also tried CByte and CLng and I get the same error messages.
The function is to receive a single character, convert it to an interger and then do the remainder of it's processing.
However, no matter what I've tried, I always get an error message.
Error messages include:
Code:
Type mismatch: 'CInt' [n = CInt(a)]
Type mismatch: '[string: "a"]' [n = Int("a")]
The beginning of the function is as follows:
Code:
Sub Break (a, b, c)
Dim t,x
x = CInt(a)
If (x >= 128) Then
t = t + 8
x = x - 128
End If
I can successfully convert from an interger to a character, I just cannot go the other way. I'm originally from a C++ background, so I feel this should be an easy item.
I have tried also tried CByte and CLng and I get the same error messages.