January 19, 2021, 05:58:43 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
Algorithms
»
[bb] Binary string to integer by Snarkbait [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bb] Binary string to integer by Snarkbait [ 1+ years ago ] (Read 668 times)
BlitzBot
Jr. Member
Posts: 1
[bb] Binary string to integer by Snarkbait [ 1+ years ago ]
«
on:
June 29, 2017, 12:28:43 AM »
Title :
Binary string to integer
Author :
Snarkbait
Posted :
1+ years ago
Description :
Converts a string created with bin$ back to an integer.
Code :
Code: BlitzBasic
Function
bin2int
(
this$
)
thisint =
0
blen =
Len
(
this$
)
For
a =
1
To
blen
ibit =
Int
(
Mid
$
(
this$,a,
1
)
)
If
ibit thisint = thisint +
(
ibit *
(
2
^
(
blen - a
)
)
)
Next
Return
thisint
End Function
Comments :
none...
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
Algorithms
»
[bb] Binary string to integer by Snarkbait [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal