Reading invalid integer values

Official Description

6.9.1 On reading an integer from a text file, after skipping preceding spaces and end-of-lines, it is an error if the rest of the sequence does not form a signed-integer.

Simplified Description

In other words, it is an error if the program attempts to read an integer from a text file but the next characters to be read from the text file can not form an integer. For example if a text file contains the following


and you try to read in an integer value from this file it is an error.

Error Handling

This error is reported if I/O checking is enabled.