GetMemberType (open)

Returns the type of a member of an object

Syntax

// Core function, no LOADLIB necessary

STRING FUNCTION GetMemberType(OBJECT obj, STRING membername)

Parameters

OBJECT obj

Object to check

STRING membername

Name of the member to get the type of

Return value

STRING

A string describing the type of the member

Description

GetMemberType returns the type of a member of an object. Possible returns values are: VARIABLE - for variable members FUNCTION - for function members PROPERTY - for properties NONE - if the member does not exist or the object does not exist PRIVATE - if the member does exist, but is not accessible through this object variable. Note, this function treats @a this just as any other object variable.

Examples

// Get the type of an object member
OBJECTTYPE MyObjectType
  < INTEGER avar
  >;
PRINT(GetMemberType(NEW MyObjectType, "AVAR"));