Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

19


Type Introspection Functions

Type introspection is the ability of a function to determine the type or property of an object at runtime. The following table describes the type introspection functions that are available in SKILL.

Function Description

dtpr

Checks if an object is a non-empty list.

listp

Checks if an object is a list.

pairp

Checks if an object is a cons object, that is, a non-empty list.

arrayp

Checks if an object is an array.

defstructp

Checks if an object is an instance of a particular defstruct.

tablep

Checks if an object is an association table.

type, typep

Returns a symbol whose name denotes the type of a SKILL object. The functions type and typep are identical.

vectorp

Checks if an object is a vector. Behaves the same as arrayp.

integerp

Checks if an object is an integer. This function is the same as fixp.

otherp

Checks if an object is a user type object, such as an association table or a window.

symbolp

Checks if an object is a symbol.

symstrp

Checks if an object is either a symbol or a string.

outstringp

Checks whether the specified value is an outstring port.

pcreObjectp

Checks to see whether the given argument is a pcreObject or not.

stringp

Checks if an object is a string.

evenp

Checks if a number is an even integer.

oddp

Checks if an object is an odd integer.

floatp

Checks if an object is a floating-point number. Same as realp.

fixp

Checks if an object is an integer, that is, a fixed number.

minusp

Checks if a value is a negative number. Same as negativep.

plusp

Checks if the given object is equal to one.

onep

Checks if the given object is equal to one.

realp

Checks if a value is a real number. Same as floatp.

zerop

Checks if an object is equal to zero.

numberp

Checks if a data object is a number, that is, either an integer or floating-point number.

inportp

Checks if an object is an input port.

outportp

Checks if an object is an output port.

openportp

Checks if the given argument is a port object and it is open (for input or output), nil otherwise.

portp

Checks if an object is an input or output port.

bcdp

Checks if an object is a binary primitive function.

booleanp

Checks if an object is a boolean.

getFunType

Returns a symbol denoting the function type for a given function object.

isMacro

Checks if the given symbol denotes a macro.

isCallable

Checks if a function is defined or is autoloadable from a context.

boundp

Checks if the variable named by a symbol is bound, that is, has been assigned a value. The single argument form of boundp only works in SKILL mode.

fboundp

Checks if the given name has a function binding.

getFnWriteProtect

Checks if the given function is write-protected.

getVarWriteProtect

Checks if a variable is write-protected.

isVarImported

Checks if the specified variable was imported into SKILL++ or not.

fdoc

Returns the documentation string for the function bound to the symbol s_function. SKILL switch saveInlineDoc must be set to save and retrieve the doc string.

procedurep

Checks if an object is a procedure, or function, object.


Return to top
 ⠀
X