You can’t always use the character string in the input file to tell you what kind of variable it should be
read into with list-diected input. 666 is valid input to an integer or real variable, as well as to a character one if the file was opened with delim=‘none’, which is the default.
Of course if you have control over the contents of the input file you could require that its character strings contain a character that cannot be part of a number, that its real input contain at least one of
+-.deinftynaDEINFTYNA (because Infinity and NaN are possible inputs to a real variable), and that iinput containing only +-012345689 is to an integer.