That code was all from the head and not tested, so yes the Record Structure should be array[0..3] of char, that would remove need for the loop