_dump (JavaScript)

Prints a string representation of an object to the log file.

Defined in

Top-level functions (JavaScript)

Syntax

_dump(object)
Parameter Description
object A string containing a information about and if possible a string representation of the object.

Usage

The log is console.log on the server (for example, C:\Notes\Data\IBM_TECHNICAL_SUPPORT\console.log).

Examples

The following example demonstrates dumping some built-in objects.
n = new Number(-1);
b = new Boolean(true);
s = new String("foobar");
print("<<<dump follows>>>");
_dump(n); // Number=-1
_dump(b); // Boolean=true
_dump(s); // String=foobar
print("<<<dump ends>>>");

This example demonstrates dumping a user object.

function mytype() {
	this.mytype = "foobar";
}

myobj = new mytype();
print("<<<dump follows>>>");
_dump(myobj); // mytype: string=foobar
print("<<<dump ends>>>");