IsExtendedStructure - Check a value for being a structure

Top  Previous  Next

Syntax

<lValue> := IsExtendedStructure(<testvalue>)

Parameters

<testvalue>

 

The value to test for being a structure.

Return value

If <testvalue> is a structure, the return value is .T., otherwise it is .F.

Description

IsExtendedStructure first checks if <testvalue> is an object. If not, it immediately returns .F. . If <testvalue> inherits from the IdentifyAsExtendedStructure class, it returns .T. .

Classification

Core

Category

Type check

Quick Info

Library: cckptcor.lib /cckptcor.dll

See also

IdentifyAsExtendedStructure

Example

 

* Auto-link the Cockpit Core libraries

#INCLUDE "CockpitCoreLibs.ch"

 

* Declare a class that inherits from IdentifyAsExtendedStructure

CLASS MyStructure FROM IdentifyAsExtendedStructure

ENDCLASS

 

 

FUNCTION Main

 

LOCAL s := MyStructure():New()

 

* Check the object for being a structure

IF IsExtendedStructure(s)

  ? "s is a structure."

ENDIF

 

RETURN NIL