In RealBasic, is there a way to convert 开发者_运维技巧a byte to a string?
If you mean turn a Byte into a string representation of the byte in Binary (or hex or Octal), then:
Dim x As Byte = 24 //For example
Dim z, y, w As String
y = Bin(x) //Binary = "11000"
z = Hex(x) //Hexadecimal = "18"
w = Oct(x) //Octal = "30"
You could use MemoryBlock:
Dim m As MemoryBlock
m = NewMemoryBlock(1)
m.Byte(0) = 65
MsgBox(m.StringValue(0, 1)) // Displays "A"
Of course, Chr(65) does the same thing...
精彩评论