| View previous topic :: View next topic |
| Author |
Message |
SpiderGames
Joined: 09 Jun 2008 Posts: 284 Location: Canada
|
Posted: Sun Jul 06, 2008 2:41 am Post subject: Need help with hexadecimal converter |
|
|
Hey,
Im just making myself a calculator for practice.
I'm having problem with my hexadecimal converter because Hexadecimal is written in letters and numbers...
ex. A8 is 168, 2A is 42
(base 16 binary is base 2)
I just dont know how to make something like it.
If any one knows how plz post.
[ Moderator!: typos corrected ] _________________ http://www.spider-games77.piczo.com
Join the Elite few... |
|
| Back to top |
|
 |
vahju
Joined: 17 Feb 2008 Posts: 58
|
|
| Back to top |
|
 |
SpiderGames
Joined: 09 Jun 2008 Posts: 284 Location: Canada
|
Posted: Sun Jul 06, 2008 4:58 pm Post subject: |
|
|
i want my script to under stand hexidecimal...
i know how ot calculat it i just need to put that into my script _________________ http://www.spider-games77.piczo.com
Join the Elite few... |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 5887
|
Posted: Sun Jul 06, 2008 7:25 pm Post subject: |
|
|
The simplest way is to use SetFormat command:
| Code: | Number := 1024
SetFormat, Integer, Hex
Number += 0
SetFormat, Integer, Decimal
MsgBox, % Number ; 0x400
Number += 0
MsgBox, % Number ; 1024 |
 _________________ SKAN - Suresh Kumar A N |
|
| Back to top |
|
 |
|