User Tools

Site Tools


bool_boolean_value_.htm
Navigation:  Clarion.Net (Clarion#) > Clarion# Language Extensions > Simple Data Types >====== BOOL (Boolean Value) ====== Previous pageReturn to chapter overviewNext page

NewCNet.jpg

BOOL

blk2blue.jpg

BOOL is used to declare variables to store Boolean values, TRUE(1) and FALSE(0).

Example:

MainForm.ProfitReport PROCEDURE(System.Object sender, System.EventArgs e)

Frm   &System.Windows.Forms.Form

FrmFound BOOL

CODE

 FrmFound = FALSE

 Frm &= NULL

 FOREACH Frm IN SELF.MdiChildren

  IF Frm IS Warehouse.ProfitReportForm THEN

   FrmFound = TRUE

   BREAK

  END

 END

 IF FrmFound THEN

  Frm.Activate()

 ELSE

  Frm &= NEW Warehouse.ProfitReportForm

  Frm.MdiParent &= SELF

  Frm.Show()

 END

BOOL can also be set through Boolean operators that connect string, numeric, or logical expressions together to determine true-false logic.

Example:

IsNext = (ERRORCODE() = 0)  !IF ERRORCODE() returns zero, the expression is

                           !true, and IsNext = TRUE

bool_boolean_value_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1