Deutsch English Français Italiano |
<vnjn4d$3o3v8$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "Craig A. Berry" <craigberry@nospam.mac.com> Newsgroups: comp.os.vms Subject: Re: basic BASIC question Date: Fri, 31 Jan 2025 17:42:04 -0600 Organization: A noiseless patient Spider Lines: 17 Message-ID: <vnjn4d$3o3v8$1@dont-email.me> References: <vnipj8$3i2i9$1@dont-email.me> <679d001e$0$713$14726298@news.sunsite.dk> <vnj81l$ga7$4@reader2.panix.com> <679d26bd$0$713$14726298@news.sunsite.dk> <vnjhfb$gk1$1@reader2.panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 01 Feb 2025 00:42:06 +0100 (CET) Injection-Info: dont-email.me; posting-host="c75320bb4bab4bf28ba101b02e71763d"; logging-data="3936232"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+mHpFWaRbv2izzuFKom2z6H08g+yguro=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:7mnX83XNuxPzIbavUJzTRg0MZ+k= Content-Language: en-US In-Reply-To: <vnjhfb$gk1$1@reader2.panix.com> Bytes: 1895 On 1/31/25 4:05 PM, Dan Cross wrote: > Treating -1 as true in BASIC seems rather common, from the quick > survey I did; I speculate that this is almost certainly due to > the bit representation of -1 having all bits set, while in BASIC > the integer type is (usually?) signed, thus -1 on a two's > complement machine. I wonder what the original DTSS BASIC did? I had a quick look at: https://ia601901.us.archive.org/34/items/bitsavers_dartmouthB_3679804/BASIC_4th_Edition_Jan68_text.pdf and didn't see an obvious answer, though I didn't read the whole thing and could've missed something. The exact values of true and false might well have been considered an implementation detail that should not be relied on.