◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────Run-Time Library─────────────────────────────────────────────────────── The perror function prints an error message to stderr. The <string> argument is printed first, followed by a colon, the system error message for the last library call that produced the error, and a newline character. If <string> is a null pointer or a pointer to a null string, perror prints only the system error message. The actual error number is stored in the variable errno (defined in ERRNO.H). The system error messages are accessed through the variable _sys_errlist, which is an array of messages ordered by error number. The perror function prints the appropriate error message by using the errno value as an index to _sys_errlist. The value of the variable _sys_nerr is defined as the maximum number of elements in the _sys_errlist array. To produce accurate results, perror should be called immediately after a library routine returns with an error. Otherwise, the errno value may be overwritten by subsequent calls. Under DOS, some of the errno values listed in ERRNO.H are not used. The perror function prints an empty string for any errno value not used under the operating system. Return Value None. -♦-