[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.266 StdErr

Synopsis

 
var
  StdErr: Text;

Description

The `StdErr' variable is connected to the standard error file handle. To report errors, you should prefer `WriteLn (StdErr, 'everything wrong')' over `WriteLn ('everything wrong')'.

Conforming to

`StdErr' is a GNU Pascal extension.

Example

 
program StdErrDemo;
var
  Denominator: Integer;
begin
  ReadLn (Denominator);
  if Denominator = 0 then
    WriteLn (StdErr, ParamStr (0), ': division by zero')
  else
    WriteLn ('1 / ', Denominator, ' = ', 1 / Denominator)
end.

See also

section 9.262 StandardError, section 9.185 Output, section 9.122 Input.



This document was generated by Frank Heckenbach on May, 10 2002 using texi2html