GetGlobalVarType

PowerBuilder Native Interface

IPB_Session interface:

GetGlobalVarType method

Description

Obtains the datatype of a global variable.

Syntax

GetGlobalVarType(pbfieldID fid)

Argument

Description

fid

The internal ID of the class instance variable

Return Values

pbuint. A simple datatype defined in the list of pbvalue_type enumerated types.

Examples

This code tests getting and setting a global integer variable using the field ID fid:

fid = session -> GetGlobalVarID("i_gvar");
if (session -> GetGlobalVarType(fid) == pbvalue_int)
   {
      i_val=session -> GetIntGlobalVar(fid,isNull);
      session -> SetIntGlobalVar(fid,i_val+1);
   }

See Also