Sujet : Re: basic BASIC question
De : davef (at) *nospam* tsoft-inc.com (Dave Froble)
Groupes : comp.os.vmsDate : 01. Feb 2025, 01:49:05
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vnjr3p$3oq2p$1@dont-email.me>
References : 1 2
User-Agent : Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 1/31/2025 1:28 PM, Simon Clubley wrote:
On 2025-01-31, Arne Vajhøj <arne@vajhoej.dk> wrote:
Is it common to use:
>
declare integer const
ant TRUE = -1
declare integer constant FALSE = 0
>
>
Oh goody. The "good" old days, when TRUE did not equal TRUE, are back. :-)
>
Simon.
>
Not sure what that means ...
In any case, consider testing for bit settings. Assume that the bit value "4", that's bit 2 set, and wanting to test for that particular bit.
If <variable/constant/whatever> AND 4 then print "True", else print "False"
If only -1 was "true", then that statement would not work. That would be rather sad. So, non-zero being true is a good implementation.
-- David Froble Tel: 724-529-0450Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.comDFE Ultralights, Inc.170 Grimplin RoadVanderbilt, PA 15486