chr = ReadChr(id[, encoding])
idand returns its code point value. Note that depending on the character encoding, this might read up to 4 bytes from the file since in UTF-8, characters can use up to 4 bytes. The file cursor position is incremented by the number of bytes read.
encoding parameter can be used to set the character encoding
to use. This defaults to the default string encoding set using SetDefaultEncoding().
See Character encodings for details.
If you want to read a single byte from a file, use ReadByte() instead. See ReadByte for details.
OpenFile(1, "test", #MODE_READWRITE) WriteLine(1, "Hello People! How are you?") Seek(1, 0) test = ReadChr(1) CloseFile(1) test$ = Chr(test) Print(test$)The above code will print "H" to the screen.