Previous Document Next Document

What are the available query methods?

For performing queries, each supported object type (see the section “What can be queried?”) provides a set of query methods. Some of these methods are common to most or all of the supported object types, while others are unique.

What common query methods are supported?

Most of the supported object types provide the following default query methods:

Default method
Description
object.ToBool()
Converts the current object to a Boolean value (True or False)
object.ToInt()
Converts the value of the object to an integer
object.ToDouble()
Converts the value of the object to a double object
object.ToString()
Converts the value of the object to a string
object.TypeName()
Gets the type name of the object (as a string)
object.This()
Returns a copy of the object
object.IsNumeric()
Returns True if the object can be converted to a numeric value (integer or double object)
object.IsNull()
Returns True if the object is a null object

In addition, a special help method lists all available methods and properties for an object. For example, to list the methods available for the int object, the following expression can be evaluated:

int.help 

The result would be a string containing the list of methods supported by this object:

int.Abs() 
int.ToRadians() 
int.ToDegrees() 
int.ToBool() 
int.ToInt() 
int.ToDouble() 
int.ToString() 
int.TypeName() 
int.This() 
int.IsNumeric() 
int.IsNull() 

For specific details on the query methods provided for individual object types, please see any of the following sections:

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.