4.7.8 The ValuePrinter structure

maximumRefDepth

ValuePrinter option

Structure

Shell.Options.ValuePrinter

Type

val maximumRefDepth: int option

Description

The maximumRefDepth option is an integer determining the maximum number of self-references a function makes to print. The value printer could be sent into an infinite loop trying to print all the self-references without this upper limit. The default value is 3. The maximumDepth will override maximumRefDepth if it is set to a smaller value.

The value of this option appears, and can be set, in the Maximum ref depth text box in a GUI listener, compilation manager, or inspector tool's View > Value Printer dialog.

Example

The following example illustrates the effect of maximumRefDepth:

MLWorks> ref(ref(ref 3));
val it : int ref ref ref = ref(ref(ref(3)))
MLWorks> set (maximumrefDepth, 1);
val it : unit = ()
MLWorks> ref(ref(ref 3));
val it : int ref ref ref = ref(_)
MLWorks>


MLWorks Reference Manual (version 1.0) - 3 DEC 1996

Generated with Harlequin WebMaker