> YACBFC - dec2hex.cmd and hex2dec.cmd, Yet another couple batch files to convert numbers
jaclaz
post Sep 4 2007, 09:20 PM
Post #1


Finder
***

Group: Advanced user
Posts: 1,118
Joined: 14-July 06
Member No.: 2


Italy


There are quite a number of converting programs between dec and hex and viceversa, and also a number of batch files to do the same.

Since none I could find worked the way I wanted them to, I decided to write my own version, with input an output as I like them to be.

They work under 2K/XP (no Dos/Win9x/Me sorry).

Enjoy. smile.gif

jaclaz






Attached File(s)
Attached File  dec2hex2dec.zip ( 2.17k ) Number of downloads: 4
 
Go to the top of the page
 
+Quote Post
Digg this topic Add to my del.icio.us  
Start new topic
Replies
jaclaz
post Oct 5 2007, 10:42 AM
Post #2


Finder
***

Group: Advanced user
Posts: 1,118
Joined: 14-July 06
Member No.: 2


Italy


Another pretty much useless batch wink.gif, multiply.cmd.

The batch language can do Integer Math quite well, though all operations have a limit fixed to hex 7FFFFFF i.e. 2147483647 decimal.

Multiply.cmd takes two numbers and multiplies them, with precision up to 15 digits:
QUOTE
W:\OFS\TOOLS>multiply 1024*1024
1048576


The first non numeric character found (exception made for "*") is interpreted as the thousands separator:
QUOTE
W:\OFS\TOOLS>multiply 1,024*1024
1,048,576

W:\OFS\TOOLS>multiply 1.024*1024
1.048.576

W:\OFS\TOOLS>multiply 1.024*1048576
1.073.741.824

W:\OFS\TOOLS>multiply 1.024*1.073.741.824
1.099.511.627.776

W:\OFS\TOOLS>multiply 1024*1024�
1�048�576


jaclaz
Attached File(s)
Attached File  multiply.zip ( 1.31k ) Number of downloads: 1
 
Go to the top of the page
 
+Quote Post

Posts in this topic
jaclaz   YACBFC - dec2hex.cmd and hex2dec.cmd   Sep 4 2007, 09:20 PM
jaclaz   Another pretty much useless batch ;), multiply.cmd...   Oct 5 2007, 10:42 AM

« Next Oldest · Submit your program · Next Newest »
 

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 

Display Mode: Switch to: Standard · Switch to: Linear+ · Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

- Lo-Fi Version Time is now: 12th October 2007 - 08:33 AM

MKPortal ©2003-2006 mkportal.it