Path: ...!weretis.net!feeder9.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail From: cross@spitfire.i.gajendra.net (Dan Cross) Newsgroups: comp.os.vms Subject: Re: basic BASIC question Date: Fri, 31 Jan 2025 19:24:37 -0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: References: <679d001e$0$713$14726298@news.sunsite.dk> Injection-Date: Fri, 31 Jan 2025 19:24:37 -0000 (UTC) Injection-Info: reader2.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80"; logging-data="16711"; mail-complaints-to="abuse@panix.com" X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: cross@spitfire.i.gajendra.net (Dan Cross) Bytes: 1542 Lines: 25 In article <679d001e$0$713$14726298@news.sunsite.dk>, Arne Vajhøj wrote: >On 1/31/2025 11:39 AM, Dave Froble wrote: >> On 1/31/2025 10:18 AM, Arne Vajhøj wrote: >>> Is it common to use: >>> >>> declare integer constant TRUE = -1 >>> declare integer constant FALSE = 0 >>> >>> >>> ? >> >> It works.  Doesn't really matter if declared a constant.  Zero is false, >> anything else is true.  Using 1 vs -1 has been more my experience. > >I got the impression that the manual/compiler prefer -1 over 1. > >print not 0% > >does print -1. This sort of makes some sense when one considers the bit representation of `-1` on a 2s complement machine (all bits 1). - Dan C.