RSS Forums RSS
Please support our Pascal and Delphi advertiser: Programming Forums

Converting Dec to Hex without using IntToHex...

Join Date: Dec 2004
Posts: 1
Reputation: dirtyk is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
dirtyk dirtyk is offline Offline
Newbie Poster

Help Converting Dec to Hex without using IntToHex...

  #1  
Dec 1st, 2004
Hi I am quite a new programmer and I was just wondering if there's anyone out there who could help me...

I need to write a procedure to input a decimal number via a suitable const parameter and output the hexadecimal equivalent to the console window...

Now, I can do the maths and figure I need to use a loop of some type, but can anyone help me on how i can store the cumbers separately to put together at the end of the procedure...?
you need to mod the number by 16 to get the remainder and then div by 16 and repeat with new num... how do you store the remainders and convert them into the hex equivalent without having lines and lines of code?
AddThis Social Bookmark Button
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 9:18 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC