Audit (Arraylist subroutine): Difference between revisions
m (1 revision) |
m (1 revision) |
||
Line 1: | Line 1: | ||
{{Template:Arraylist:Audit subtitle}} | {{Template:Arraylist:Audit subtitle}} | ||
[[Category:Arraylist methods|Audit subroutine]] | [[Category:Arraylist methods|Audit subroutine]] | ||
<!--DPL?? Category:Arraylist methods|<var>Audit</var> subroutine: <var>Audit</var> Arraylist--> | <!--DPL?? Category:<var>Arraylist</var> methods|<var>Audit</var> subroutine: <var>Audit</var> <var>Arraylist</var>--> | ||
<p> | <p> | ||
<var>Audit</var> is a member of the [[Arraylist class]]. | <var>Audit</var> is a member of the [[Arraylist class]]. | ||
Line 7: | Line 7: | ||
This subroutine displays the contents of | This subroutine displays the contents of | ||
an Arraylist in a readable form, useful for debugging, for | an <var>Arraylist</var> in a readable form, useful for debugging, for | ||
example. | example. | ||
<var>Audit</var> is identical to the [[Print (Arraylist subroutine)|Print]] subroutine, except the result is | <var>Audit</var> is identical to the [[Print (Arraylist subroutine)|Print]] subroutine, except the result is | ||
Line 16: | Line 16: | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>al</th> | <tr><th>al</th> | ||
<td>An Arraylist object. </td></tr> | <td>An <var>Arraylist</var> object. </td></tr> | ||
<tr><th><i>method</i></th> | <tr><th><i>method</i></th> | ||
<td>The method that is applied to <var class="term">al</var> items to produce the printed output. The method must take no parameters and produce an intrinsic (<var>Float</var>, <var>String</var>, <var>Fixed</var>, <var>Unicode</var>) value. It may be a system or user-written method, a class variable or property, a local method, or a [[Method variables|method variable]]. | <td>The method that is applied to <var class="term">al</var> items to produce the printed output. The method must take no parameters and produce an intrinsic (<var>Float</var>, <var>String</var>, <var>Fixed</var>, <var>Unicode</var>) value. It may be a system or user-written method, a class variable or property, a local method, or a [[Method variables|method variable]]. |
Revision as of 02:28, 20 January 2011
Audit Arraylist (Arraylist class)
Audit is a member of the Arraylist class.
This subroutine displays the contents of an Arraylist in a readable form, useful for debugging, for example. Audit is identical to the Print subroutine, except the result is sent to the Model 204 audit trail (like the User Language Audit statement).
Syntax
al:Audit[( [itemFunction], [NumWidth= number], [Separator= string], - [Start= number], [MaxItems= number], [Label= string])]
Syntax terms
al | An Arraylist object. |
---|---|
method | The method that is applied to al items to produce the printed output. The method must take no parameters and produce an intrinsic (Float, String, Fixed, Unicode) value. It may be a system or user-written method, a class variable or property, a local method, or a method variable. The default value of method is ToString. |
numWidth | The number of bytes in the display of each item to use for the item number. This is an optional parameter; if you specify a value, the parameter name NumWidth is required.
Item numbers are right-justified within the indicated number of bytes, and they are truncated on the left if the length of the item number exceeds the space allocated for it. The width must be a number between -1 and 10 inclusive. If you specify a value of 0, the item number is not displayed. If numWidth is -1, the default, the method uses the minimum number of bytes required to show the item number. For example, one byte is required for item number 5, while five bytes are required for item number 98764. |
separator | A string, 15 characters or less, to be used to separate the item number from the item value.
This is an optional argument whose default is a colon (: ). A blank always follows the separator string. If you specify a value, the parameter name Separator is required. |
start | The item number of the initial item in the output display. This is an optional argument, and it defaults to 1. If you specify a value, the parameter name Start is required. |
maxItems | The maximum number of items to display. A zero or negative value means to display all the items. This is an optional argument, and it defaults to zero. If you specify a value, the parameter name MaxItems is required. |
label | A literal string that gets output before each line. This is useful for "tagging" lines to make them more identifiable. This is an optional argument whose default is a null string. If you specify a value, the parameter name Label is required. |
Usage notes
- All errors in Audit result in request cancellation.
- Print and Trace are the same as Audit except they send their output to the standard output destination and trace destination, respectively.
- For examples of Print method calls, see Printing a collection.