home *** CD-ROM | disk | FTP | other *** search
- **
- ** PROGRAM TITLE : HBOOLEAN
- **
- ** WRITTEN BY : Paul Long
- **
- ** WRITTEN FOR : Copyright (C) 1992 All rights reserved. XL Systems, Inc.
- **
- ** PROGRAM INTENT: Boolean (true/false) class
- **
- ** NOTE: This file uses a hybrid approach It uses "traditional,"
- ** non-OOP programming, but organizing the code along OOP
- ** lines, e.g., one source file per "class."
- **
- #include "oclip.ch"
-
-
- CLASS Boolean
- VAR lWhether
- METHOD New = BooleanNew
- METHOD Destruct = BooleanDestruct
- METHOD Value = BooleanValue
- ENDCLASS
-
-
- *******************************************************
- *
- * BooleanNew
- *
- *******************************************************
- * Construct Boolean object
- *
- METHOD FUNCTION BooleanNew(lInitialValue)
-
- ::Value(if(lInitialValue == nil, .f., lInitialValue))
-
- return Self
-
-
- *******************************************************
- *
- * BooleanDestruct
- *
- *******************************************************
- * Destruct Boolean object
- *
- METHOD FUNCTION BooleanDestruct
-
- return nil
-
-
- *******************************************************
- *
- * BooleanValue
- *
- *******************************************************
- * Return whether last search succeeded.
- *
- METHOD FUNCTION BooleanValue(lWhether)
-
- if lWhether != nil
- ::lWhether := lWhether
- endif
-
- return ::lWhether
-