History of "True"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I want to know when was the True and False first included in Basic llanguage? Was it the work of Microsoft or some other company? And who decided the value of true to be -1?

Regards,

Abubakar.
 
AFAIK, it has been there since VB3. And True has always been -1. The supposed logic was False had all bits 0 and True had all bits 1, which gives it an value -1.

Rgds,
Anand
VB.NET MVP
http:/www.dotnetindia.com
 
Hi Abubakar

There was a long (very long) thread on this subject not so long ago, which
you may wish to look up, but to summarise:

The definition of True arises from the definition of False. False is defined
as 0 (zero); no bits set. True is logically defined as Not False, i.e. the
direct opposite: all bits set. In signed arithmetic this is always -1.

HTH

Charles


Abubakar said:
Hi,
I want to know when was the True and False first included in Basic
llanguage? Was it the work of Microsoft or some other company? And who
decided the value of true to be -1?
 
* "=?Utf-8?B?QWJ1YmFrYXI=?= said:
I want to know when was the True and False first included in Basic
llanguage?

I don't know, but 'True' and 'False' can be seen as simple constants, so
it was not hard to add them to BASIC dialects that did not include them
and provided the possibility to define constants.
Was it the work of Microsoft or some other company? And who decided the
value of true to be -1?

'False' = 000...000 (16 bits set to 0), 'True' is, for example, the
binary complement (111...111) (16 bits set to 1). If you interpret the
111...111 with 'Int16' semantics (signed 16-bit integer), then its
value would be -1.
 
Hi Abukar,

As far as I remember me where Basic programmers not the same as programming
language we know now. It was a kind of scripting which was forever
interpreted.

There was no need to compile, however a lot of companies have made compilers
for it, so I think it will be difficult to say where it started to use this
as it is now.

Cor
 
Hi,
I want to know when was the True and False first included in Basic llanguage? Was it the work of Microsoft or some other company? And who decided the value of true to be -1?

Regards,

Abubakar.

I know that in VB, True has evaluated to -1, but IMHO, True has only one
value: True

You should not use True as a numeric value.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
Back
Top