Set.definitionString Method

Returns a description of the type of the elements in the set.

Syntax

public str definitionString()

Run On

Called

Return Value

Type: str
A string that contains a definition of the set.

Remarks

To print a list of the values within the set, use Set.toString.

Examples

The following example creates a set of integers. The definitionString method is used to print a description of the set.

{ 
    // Declare a set of integers 
    Set is = new Set (Types::Integer);  
    ; 
  
    // Add some integers to the set 
    print is.add(1); 
    print is.add(2); 
    print is.add(1); 
    // Print a description of the set 
    print is.definitionString(); 
    // Print a description of the set elements 
    print is.toString(); 
    pause; 
}

See Also

Set Class

Set.toString Method