OpenDX - Documentation
Full Contents QuickStart Guide User's Guide User's Reference
Previous Page Next Page Table of Contents Partial Table of Contents Index Search

Print

Category

Debugging

Function

Prints an object.

Syntax

Print(object, options, component);

Inputs
Name Type Default Description
object object none object to print
options string "o" printing options
component string or string list all components component or components to print

Functional Details

This module prints object according to the specifications in options. Each character in the options string specifies printing a particular portion of the information about the object:

r

recursively traverse the object

o

print only the top level of the object

d

print first and last 25 items in arrays, as well as headers

D

print all the items in arrays as well as headers

x

for debugging, print in expanded form (lists the object address, the object tab,  and the reference counts of the object)

n

print object to n levels.

The component parameter controls which components of object are printed. By default, all components are printed. All values are printed in decimal format except for byte array data, which are printed in hexadecimal.

In the user interface, the output of the Print module appears in the Message window.

Script Language Example

In the following example, the first call to Print does not recurse through the structure but simply reports (prints) that both is a group with two members. The second call recurses through the group and reports that each member of the group has six components, what those components are, and how many items there are in each. The third call provides this information and, in addition, the first and last 25 items in the "data" component of each field. The final call prints out all of the items in both the "positions" and "box" components.

electrondensity = Import("/usr/local/dx/samples/data/watermolecule");
electrondensity = Partition(electrondensity);
iso1 = Isosurface(electrondensity,0.1);
iso2 = Isosurface(electrondensity,0.3);
both = Collect(iso1,iso2);
Print(both);
Print(both,"r");
Print(both,"d", "data");
Print(both,"D", {"positions", "box"});

See Also

 Echo,  Describe


Full Contents QuickStart Guide User's Guide User's Reference

[ OpenDX Home at IBM | OpenDX.org ]