446,285 Members | 1,647 Online
Need help? Post your question and get tips & solutions from a community of 446,285 IT Pros & Developers. It's quick & easy.

# History of "True"

 P: n/a 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. Nov 20 '05 #1
7 Replies

 P: n/a 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 "Abubakar" wrote: 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. Nov 20 '05 #2

 P: n/a 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" wrote in message news:70**********************************@microsof t.com... 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. Nov 20 '05 #3

 P: n/a * "=?Utf-8?B?QWJ1YmFrYXI=?=" scripsit: 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. -- Herfried K. Wagner [MVP] Nov 20 '05 #4

 P: n/a 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 Nov 20 '05 #5

 P: n/a On Thu, 15 Jul 2004 00:51:01 -0700, Abubakar wrote: 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. Nov 20 '05 #6

 P: n/a Hi Chris, You should not use True as a numeric value. Are you sure this is true? Could not resist do not take it serious? :-) Cor Nov 20 '05 #7

 P: n/a * "Cor Ligthert" scripsit: You should not use True as a numeric value. Are you sure this is true? That's what is saying... -- Herfried K. Wagner [MVP] Nov 20 '05 #8

### This discussion thread is closed

Replies have been disabled for this discussion.