[MI-L] MapBasic Bitwise Operators

2006-03-08 Thread Ian Tidy
Title: MapBasic Bitwise Operators






Hi All,


I am wanting to use bitwise operators in MapBasic, but I can't find any information on them.


Does anyone know if the exist and how to use them, or do I need to write my own functions?


Cheers Ian


Ian Tidy

GIS Administrator

Works Asset Department

Napier City Council

Hastings St, Private Bag 6010, Napier, New Zealand

Phone +64-6-835-7579 Ext. 8115

Fax +64-6-835-7574

mailto:[EMAIL PROTECTED]

http://www.napier.govt.nz

 

 





___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic Bitwise Operators

2006-03-08 Thread Bill Thoen
On Thu, Mar 09, 2006 at 12:06:26PM +1300, Ian Tidy wrote:
 I am wanting to use bitwise operators in MapBasic, but I can't find any 
 information on them.
 
 Does anyone know if the exist and how to use them, or do I need to write my 
 own functions?

You have to write your own, but it's pretty easy. For example, to test the
5th bit from the right in an integer use integer divide and mod like so:

n = 5
if nBitflags \ 2^(n-1) mod 2 then
  ' bit is set

- Bill Thoen

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic Bitwise Operators

2006-03-08 Thread Trey Pattillo
MB does not do true bit operations
I have a dll with a whole lot of delphi functions built in it
you can get it here http://www.wap3.com/download/ultramsg.zip

does string math like s=(5+2)*3 and gets back the answer
does HTLM output  better than that dumb message window
and a lot more

On Wednesday 08 March 2006 17:06, Ian Tidy wrote:
 Hi All,

 I am wanting to use bitwise operators in MapBasic, but I can't find any
 information on them.

 Does anyone know if the exist and how to use them, or do I need to write my
 own functions?

 Cheers Ian

 Ian Tidy
 GIS Administrator
 Works Asset Department
 Napier City Council
 Hastings St, Private Bag 6010, Napier, New Zealand
 Phone +64-6-835-7579 Ext. 8115
 Fax +64-6-835-7574
 mailto:[EMAIL PROTECTED]
 http://www.napier.govt.nz http://www.napier.govt.nz/




 ##
 Attention:
 This e-mail message and accompanying data may contain information that
 is confidential and subject to legal privilege. Any information
 provided is given in good faith. However unless specifically stated to
 the contrary, Napier City Council accepts no liability for the
 content of this e-mail or for the consequences of any action taken on
 the basis of the information provided, unless that information is
 subsequently confirmed in writing. If you are not the intended recipient,
 you are notified that any use, dissemination, distribution or copying
 of this message or data is prohibited. If you received this e-mail
 message in error, please notify us immediately and erase all copies
 of this message and attachments. Thank you.

-- 
Trey Pattillo

Failure is not an option
It comes standard with all Microsoft products.
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l