Bitand

Andy Powell Andy.Powell at catalina-software.co.uk
Thu Jul 18 13:04:29 EDT 2013


Thanks Rob!

I did that and both machines return the same result for sys(205) which is 0 little-endian apparently. However, below shows new developments...

I think it's something to do with the variable types now. We were using a comms object provided by a credit card processing company that returns this value as a number in the object so we were doing

If bitand(lv_oObject.$supports,4)=4

Now, I've changed it to use a row which is populated from a webservice. The variable type in this row is a Long number just as the comms object stated it was. 

On my PC (the i7 blah blah) it works however on the server the same number returned a 1 (where it should have been a 4). 

Anyone with any experience with all of this bit stuff, do I need to do any conversions to binary types of anything like that? I wouldn't had thought it would make a difference but apparently it does? 

Thanks again everyone.

-----Original Message-----
From: omnisdev-en-bounces at lists.omnis-dev.com [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Robert Mostyn
Sent: 18 July 2013 17:46
To: OmnisDev List - English
Subject: Re: Bitand

I would have thought if you are running in Omnis, Omnis will be working with 32 bit throughout - so should be the same.

;  sys(110)     ;; CPU type
;  sys(205)     ;; byte ordering of hardware

test sys(205) on each machine and see if you get the same result.

Failing that 32/64 bit *might* have something to do with it - but I really don't think so.

Rob

On Thu18 Jul 2013, at 17:21, Andy Powell <Andy.Powell at catalina-software.co.uk> wrote:

> Hi Rob,
> 
> One is an Intel i7-2600 running Windows 7 Professional 64 bit. 
> 
> The other is an Intel Xeon running Windows Server 2003 R2 32 bit. 
> 
> This is a bit above me to be honest. I just need to get reliable results whatever hardware/OS is running. Is there any way of doing that? 
> 
> Kind regards,
> 
> Andy
> 
> 
> -----Original Message-----
> From: omnisdev-en-bounces at lists.omnis-dev.com 
> [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Robert 
> Mostyn
> Sent: 18 July 2013 17:06
> To: OmnisDev List - English
> Subject: Re: Bitand
> 
> Andy,
> are both machines same endian?  Is one a PowerPC mac and the other an Intel?
> Byte ordering is different between Motorola and Intel which might explain a different result.
> Rob
> 
> On Thu18 Jul 2013, at 16:32, Andy Powell <Andy.Powell at catalina-software.co.uk> wrote:
> 
>> Hi All,
>> 
>> This is probably going to sound ridiculous but...
>> 
>> Doing...
>> 
>> Calculate #1 as bitand(2685829,4)
>> 
>> Returns 4 on one machine and 1 on another?
>> 
>> Does anyone have any idea why this may happen?
>> 
>> It's driving me nuts as I am relying on the result of this calculating rather a lot.
>> 
>> Thanks all.
>> 
>> Kind regards,
>> 
>> Andy
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com

_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com



More information about the omnisdev-en mailing list