Blitz (260/459)

From:Rob Hutchinson
Date:17 Jan 2000 at 10:31:48
Subject:Re: odd string length

Hello Tony

>>>>> I need to determine if a given string is an odd length.
>>>>
>
> To test for divisibility by 2^n do
> if value & 2^n - 1 = 0 then divisible else not divisible

No no no, my division was bad,.. But you really shouldn`t ever use the
blitz ^ (power) operator. It sucks beyond belief, and it`ll cause more
problems than it solves, on other machines..

Try something like,

NPrint 10^2

And see what it gives you.
The power operator seems to give some very weird results on other
machines and I`ll never use it again..

Anyone know why this is?

> e.g.
> If Value & 7 = 0 ; test for divisibility by 8
> Much the quickest way, methinks.
> Cheers
>



Rob,



MAILTO:rob@satanicdreams.com | #ICQ:# 27181384 | #FAX:# 0870 0888470
#SDS FOUNDER:# URL: http://www.satanicdreams.com/
#PROJECT INFO:# Minimum Safe Distance [55%] http://msd.satanicdreams.com/
[ And introducing Anatomically Correct LOG! ]

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie