Navigation: Clarion.Net (Clarion#) > Clarion# Language Extensions > Simple Data Types >====== BOOL (Boolean Value) ====== | |
BOOL
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