Digg this topic Add to my del.icio.us Submit to SlashDot  
Reply to this topicStart new topic
> 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,185
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. (IMG:http://www.boot-land.net/forums/style_emoticons/default/smile.gif)

jaclaz
Attached File(s)
Attached File  dec2hex2dec.zip ( 2.17K ) Number of downloads: 8
 
Go to the top of the page
 
+Quote Post
jaclaz
post Oct 5 2007, 10:42 AM
Post #2


Finder
***

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


Italy


Another pretty much useless batch (IMG:http://www.boot-land.net/forums/style_emoticons/default/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
1048576


jaclaz

EDIT: A new version of multiply command uploaded, see two posts below
Attached File(s)
Attached File  multiply.zip ( 1.31K ) Number of downloads: 5
 
Go to the top of the page
 
+Quote Post
psc
post Oct 12 2007, 04:10 PM
Post #3


Guru
***

Group: .script developer
Posts: 3,190
Joined: 14-July 06
From: Korschenbroich, Germany
Member No.: 3


Germany


QUOTE (jaclaz @ Oct 5 2007, 12:42 PM) *
Another pretty much useless batch (IMG:http://www.boot-land.net/forums/style_emoticons/default/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:


The first non numeric character found (exception made for "*") is interpreted as the thousands separator:


jaclaz

Jaclaz,
You are great (IMG:http://www.boot-land.net/forums/style_emoticons/default/thumbup.gif)

Until now I did not even have had the opinion, that somethig like this is possible by simple *.cmd!

Peter
Go to the top of the page
 
+Quote Post
jaclaz
post Oct 14 2007, 10:55 AM
Post #4


Finder
***

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


Italy


QUOTE (psc @ Oct 12 2007, 06:10 PM) *
Jaclaz,
You are great (IMG:http://www.boot-land.net/forums/style_emoticons/default/thumbup.gif)

Until now I did not even have had the opinion, that somethig like this is possible by simple *.cmd!

Peter


Happy you liked it (IMG:http://www.boot-land.net/forums/style_emoticons/default/smile.gif) , as always, somebody told me the magic words "you can't do that" thus giving me the needed drive to experiment a bit!" (IMG:http://www.boot-land.net/forums/style_emoticons/default/wink.gif)

Please find attached:
- a revised version of multiply.cmd (with a small bug correction for multiple separators)
- a new batch, divide.cmd to perform divisions between "big" integers

(IMG:http://www.boot-land.net/forums/style_emoticons/default/cheers.gif)

jaclaz
Attached File(s)
Attached File  divide.zip ( 927bytes ) Number of downloads: 6
Attached File  multiply.zip ( 1.34K ) Number of downloads: 6
 
Go to the top of the page
 
+Quote Post
« Next Oldest · Submit your program · Next Newest »
 

Fast ReplyReply to this topicStart new topic

Members Who Viewed Topic Today ()

 

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

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

RSS Lo-Fi Version Time is now: 2nd November 2007 - 10:39 PM

MKPortal ©2003-2006 mkportal.it