-
Re: 2-byte Boolean?
> Although True is defined in VB as -1, in
> reality ANY non zero value is TRUE.
I wouldn't explain it that way. False is definitely zero. VB's If-Then
evaluation seems to be
If (SomeExpression IS NOT FALSE) Then
Because of this, any non-zero value for the expression will trigger the THEN
code block. A small distinction perhaps, but it is wrong to think of TRUE as
any non-zero value. One way to see that is by means of logical expression
math. Consider
X = 4
Print (X = 4)
which will print True BUT
X = 4
Print (X)
doesn't -- which, of course, is good <g>.
Rick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks