PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
Converter Binário para Decimal (Convert Binary to Decimal)
Converter Binário para Decimal (Convert Binary to Decimal)
Started by JOSE ELIELSON SILVA, Jul., 23 2015 1:12 PM - No answer
Connect yourself…
JOSE ELIELSON SILVA
#1
Registered member
14 messages
Popularité : +5 (7 votes)
Posted on July, 23 2015 - 1:12 PM
// José Elielson
// Binario -> Decimal
// observacao
// colocar o inputmask no Exit do Edit
// edit_binario..InputMask = "regexp:[0-1]{0,16}"
b is
string
=
edit_binario
i is
int
=
0
k is
int
=
0
y is
int
=
0
x is
int
=
0
j is
int
=
Length
(
NoSpace
(b)
)
FOR i
=
j TO
1
STEP
-
1
y
=
Val
(
Middle
(b,i,
1
)
)
IF
y
=
1
THEN
x
=
x
+ (
2
^
(k)
)
END
k
+
+
END
Info
(x)
Report
1
0
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text