PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
Converter Decimal em Binário (Convert Decimal to binary)
Converter Decimal em Binário (Convert Decimal to binary)
Started by JOSE ELIELSON SILVA, Jul., 23 2015 11:31 AM - No answer
Connect yourself…
JOSE ELIELSON SILVA
#1
Registered member
14 messages
Popularité : +5 (7 votes)
Posted on July, 23 2015 - 11:31 AM
// by Jose Elielson
// converter dec -> bin
x is
int
=
edit_decimal
r is
int
=
0
y is
int
=
0
b is
string
=
""
IF
x
>
1
LOOP
y
=
IntegerPart
(x/
2
)
r
=
x
- (y*
2
)
b
=
NumToString
(r) +
b
IF
y
=
1
THEN
b
=
"1"
+
b
BREAK
END
x
=
y
END
ELSE
b
=
NumToString
(x)
END
Info
(b)
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