From: Bill Kelly Date: 2002-10-26T07:35:34+09:00 Subject: Re: How come true, false don't support <=> (comparison) operator? From: "Rudolf Polzer" > | bwBASIC: PRINT 1 = 0 > | 0 > | bwBASIC: PRINT 1 = 1 > | -1 > | bwBASIC: SYSTEM > > The same holds for QBasic and Omikron BASIC. In these false is defined > as 0 (all bits are 0 bits) and true as -1 (since all bits are 1 bits). > The reason is - IMHO - that NOT can only be used for logical negation if > true == NOT false, and if one defines false as being 0, true must be -1. > Since BASIC does neither distinguish between logical values and integers > nor have different operators for these, so this hack has to be done. Ah, yes.... TRUE is defined as all-bits-on in a lot of Forth systems, as well. Same rationale.... Regards, Bill