39 char *endptr =
nullptr;
41 const intmax_t parsed = ::strtoimax(buf, &endptr, 10);
43 const int val = int(parsed);
47 (parsed < INT_MIN || parsed > INT_MAX)
65 char *endptr =
nullptr;
67 const intmax_t parsed = ::strtoimax(buf, &endptr, 10);
73 (parsed < INT_MIN || parsed > INT_MAX)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
errorType
Enumeration for possible parsing error.
@ NONE
No error encountered.
const Foam::Enum< errorType > errorNames
Strings corresponding to the errorType.
errorType checkConversion(const char *buf, char *endptr)
Sanity check after strtof, strtod, etc.
int readInt(Istream &is)
Read int from stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
errorManipArg< error, int > exit(error &err, const int errNo=1)