OutputDocument.Exists

Prototypes

boolean Exists()

static boolean Exists( OutputDocument doc )

Return Value

If the OutputDocument exists and is valid, the return value is true. If the OutputDocument does not exist or is not valid, the return value is false.

Parameters

OutputDocument doc
The OutputDocument you want to validate.

Remarks

This method determines whether a given OutputDocument exists and is valid. An example of an OutputDocument that exists but is not valid is an OutputDocument that has been closed with the Close method.

The static version of the method Exists is useful if the object reference might be null.

Example
declare OutputDocument doc = OutputDocument.GetDefault();

print "Hello";

pause "Click Resume to continue";

if OutputDocument.Exists( doc ) then
    print "The original LISTING output document still exists.";
else
    print "The original LISTING output document was closed.";

pause "Close the LISTING output document and then click Resume to continue";

if OutputDocument.Exists( doc ) then
    print "The original LISTING output document still exists.";
else
    print "The original LISTING output document was closed.";