473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

History of "True"

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 1123
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
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" <Ab******@discussions.microsoft.com> 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
* "=?Utf-8?B?QWJ1YmFrYXI=?=" <Ab******@discussions.microsoft.com> 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]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4
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
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
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
* "Cor Ligthert" <no**********@planet.nl> scripsit:
You should not use True as a numeric value.


Are you sure this is true?


That's what
<URL:http://msdn.microsoft.com/library/en-us/vblr7/html/vadatboolean.asp>
is saying...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bradley Plett | last post by:
I have what should be a trivial problem. I am using XMLSerializer to serialize an object. It serializes boolean values as "True" and "False". I then want to use an XSLT on this XML, and I want...
0
by: Bradley Plett | last post by:
I have what should be a trivial problem. I am using XMLSerializer to serialize an object. It serializes boolean values as "True" and "False". I then want to use an XSLT on this XML, and I want...
9
by: Jamey Bon | last post by:
As a newbie to C#, I am not sure what I can do about this. I would like to do something like an Enumeration to use "constants" like Yes to indicate true and No for false. But since there seems to...
1
by: mato81 | last post by:
Hi all! I am a newbie to WSDL. I have a questions which has been driving me crazy... If I would have a WSDL with a types element somewhat like below, what is the point of the third last row...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.