Algosim documentation: ClassData

ClassData

Returns the characteristics of a particular class.

Syntax

Description

If X is any object, then ClassData(X) returns a structure describing the characteristics of the class of X, class(X). Hence, if X and Y are two objects with class(X) = class(Y), then ClassData(X) = ClassData(Y).

The members of the structure give the results of the separate functions

when applied to X.

Examples

ClassData(i)
name: complex number
ClassFlags: 16
IsObjectContainer: false
IsValueContainer: false
IsPlanarContainer: false
IsOrderedContainer: false
IsComplexType: true
ClassData(IdentityMatrix(10))
name: real matrix
ClassFlags: 14
IsObjectContainer: false
IsValueContainer: true
IsPlanarContainer: true
IsOrderedContainer: true
IsComplexType: false
ClassData({1, 2, 3})
name: set
ClassFlags: 1
IsObjectContainer: true
IsValueContainer: false
IsPlanarContainer: false
IsOrderedContainer: false
IsComplexType: false
window(ReplaceAll(ReplaceAll(
  ToTable('(StructKeys(ClassData(0))) ~ DebugObject("prototypes") @ ClassData @ ToList),
  "true", "✓"), "false", ""))

Image 1

See also