Hi guys,
I'm trying to write a function that checks to see if a character is somewhere within the ASCII table.
Can you help me understand what is the compiler barking at?
I would appreciate any help!
R
I'm trying to write a function that checks to see if a character is somewhere within the ASCII table.
B4X:
Sub IsCharacter (Character As Char) As Boolean
If Conv.CharsToBytes(Character) > 0x20 AND Conv.CharsToBytes(Character) < 0x7E Then
Return True
Else
Return False
End If
End Sub
Can you help me understand what is the compiler barking at?
B4X:
Parsing code. 0.01
Compiling code. Error
Error compiling program.
Error description: Cannot cast type: {Type=Char,Rank=0} to: {Type=Char,Rank=1}
Occurred on line: 410
If Conv.CharsToBytes(Character) > 0x20 AND Conv.CharsToBytes(Character) < 0x7E Then
Word: character
I would appreciate any help!
R