Product Documentation
Cadence SKILL++ Object System Reference
Product Version IC23.1, June 2023

classp

classp( 
g_object 
su_class 
) 
=> t / nil

Description

Checks if the given object is an instance of the given class or is an instance of one of its subclasses.

Arguments

g_object

Any SKILL object

su_class

A class object or a symbol denoting a class.

Value Returned

t

If the given object is an instance of the class or a subclass of the class.

nil

The given object is not an instance of the class or a subclass of the class.

Examples

classp( 5 classOf( 5 ))  => t
classp( 5 'fixnum ) => t
classp( 5 'string ) => nil
classp( 5 'noClass )
*Error* classp: second argument must be a class - nil

Related Topics

Classes and Instances

classOf

findClass


Return to top
 ⠀
X