That's pretty cool.

My only comment would be that it took me a few goes at stepping through the 
code before I worked out how the blazes it worked, so perhaps less readable 
than the exponent version.

But hey - I'm no rocket scientist :-)
 
> From: [email protected]
> 
> 
> 
> function bin2dec(sBin) as long
> dim r as long
> r=0
> for i= 1 to len(sBin)
> r = r*2 + Val(Mid(sBin, i, 1)) 
> next
> return r
> end
> 

_________________________________________________________________
Need a new place to rent, share or buy? Let ninemsn property search for you.
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Edomain%2Ecom%2Eau%2F%3Fs%5Fcid%3DFDMedia%3ANineMSN%5FHotmail%5FTagline&_t=774152450&_r=Domain_tagline&_m=EXT
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to