Converting from binary to decimal

Blitz3D Forums/Blitz3D Beginners Area/Converting from binary to decimal

Hi Folks,

v$ = "1001"
Print dec(v$)
Print Bin$(9)
Stop

Function Dec(b$)
v=0
While Len(b$)>0
	v = (v Shl 1) + Int(Left(B$,1))
	b$ = Right(b$,Len(b$)-1)
Wend
Return v
End Function


Later,

Jes