Top
PowerCOBOL V11.0 Reference
FUJITSU Software

Appendix D Constants for VT_BOOL

PowerCOBOL provides the following constants that you can use to set the values of properties having the OLE data type "VT_BOOL":

POW-TRUE : True (-1)

POW-FALSE: False (0)

Although PowerCOBOL follows the convention that -1 is used for True, the general definition of the VT_BOOL quantity simply states that zero is False and non-zero is True.

When you set a property, it is recommended that you use POW-TRUE for true and POW-FALSE for False. However, when you test a VT_BOOL item only use POW-FALSE (because POW-TRUE is equivalent to using the numeric literal -1).

For example, if you want to test whether a property is True, code:

	IF "Visible" OF StaticText1 NOT = POW-FALSE THEN
	  MOVE "Visible" TO "Caption" OF StaticText1
	END-IF