realbasic-nug
[Top] [All Lists]

Re: bitwiseAnd ? Bug in 2008r4

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: bitwiseAnd ? Bug in 2008r4
From: Joe Huber <joehuber@talasoft.com>
Date: Sat, 27 Sep 2008 15:52:47 -0700
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <24EA8647-A8A2-4621-807F-6380E1513582@earthlink.net>
References: <24EA8647-A8A2-4621-807F-6380E1513582@earthlink.net>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
At 6:14 PM -0400 9/27/08, John McKernon wrote:
I've just run into a new bug in 2008r4, here's the line of code that triggers it:

if bitwiseAnd(val(msuitemask),&h1)>0 then

msuitemask is a string, this line is from the OSVersionInformation module that I believe came courtesy of Aaron Ballman.

I was wondering if anyone had suggestions for a workaround.

It seems a bit odd to be doing a bitwise operation on a double (Val returns a double)

I haven't tried these suggestions but...

- Try converting the double that val returns to an integer before doing the AND

- Try using the boolean overloaded AND operator instead of BitwiseAnd


if (CType(val(msuitemask),Integer) And &h1)>0 then

It might be better to just rewrite this code. Do you know the format of msuitemask and what this is testing for?

Regards,
Joe Huber

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>