QTIPS - Using @Upper.Case and @Lower.Case with Foreign Languages
@ATTACK - @Lower.Case
@ATTACK - @Upper.Case
Sorting out Collation Sequences by Mike Pope
QTIPS - Testing For Boolean False
File Variables
Argument passing - Subroutines and Functions - Mike Pope
RevTech Replies - Mike Pope (RevTech UK Ltd)
Symbol Table Structure
@ATTACK - @Return.Value
Utility Diskette # 4
Redefining Keys
Referential Integrity
@ATTACK - @Edit.Keys
@ATTACK - @Environ.Keys
@ATTACK - @Int.Const
@ATTACK - @Move.Keys
@ATTACK - @Priority.Int
@ATTACK - @Macro.Keys
@ATTACK - @Macro.Mode
Playing with Scan Codes
Uncommon Knowledge - WC_Unkeys%
Uncommon Knowledge - WC_Except_Keys%
Uncommon Knowledge - WC_Soft_Keys%
VERBatim - V126
Esc.To.Exit
Uncommon Knowledge - WC_WST_CHAR%
QTIPS - Btree.Extract
Comp
Reader's Clinic - Removing "Searching Cross References" Message
@ATTACK - @List.Active
IConvs / OConvs
Reader's Clinic - Stop Lists
REVMEDIA Revisited
REVMEDIA Revisited
Argument passing - Subroutines and Functions - Mike Pope
Caching in on the Frames Array - Mike Pope
QTIPS - Fast Dynamic Array Building
Popups
Catalyst Tips
VERBatim - V47
RTP Series - RTP25
RTP Series - RTP27
QTIPS - Printing Large Variables from the Debugger
VERBatim - V87
@ATTACK - @TCL.Stack
Reader's Clinic - Page Marks in Windows

RevMedia FKB

DocumentV3I10A1
TitleQTIPS - Testing For Boolean False
KeywordsBOOLEAN
FALSE
LEN
TextIt is frequently the case that simple Boolean logic is used to detect
whether a variable contains a value e g IF X THEN However this has the
disadvantage that if the variable ever contains 0 and 0 is a valid response
then the Boolean test would fail This is of particular significance when
processing keys unknown data etc

To get around this it has become traditional to test USING Len() i e IF
LEN(X) THEN Whilst this approach is twice as slow you are unlikely to
notice the difference between 0 00005 and 0 0001 of a second unless you are
processing hundreds of thousands of records However this approach should
only be used when the end result is not going to be used to extract FROM a
dynamic array This is because a Len() will return true for a 0 and will
thus result in an ARRAY<0> being used As an EXAMPLE of this use F2 at TCL
to get the TCL Popup and enter 0 the entire TCL stack returns to the TCL
window WITH interesting results!


(Volume 3 Issue 10 Page 4)
[revmedia/copyrigh.htm]

Page last modified: 08/02/03