Note: All stuff posted here, is for the educational purpose only. If anyone misuses the info, the management of the OFF Club can not be held responsible and shall stand withdrawn from any damages which may arise as a result of mishandling of the info; hence it is advised to use them at your own risks and cost. Thanks for your patience and cooperation.

Sunday, October 28, 2007

Is your windows' calculator not working? Use your command prompt.

The command processor CMD.EXE comes with a mini-calculator that can perform simple arithmetic on 32-bit signed integers:

C:\>set /a 2+2
4
C:\>set /a 2*(9/2)
8
C:\>set /a (2*9)/2
9
C:\>set /a "31>>2"
7

Note that we had to quote the shift operator since it would otherwise be misinterpreted as a "redirect stdout and append" operator.

For more information, type set /? at the command prompt.



If you enjoyed this post, make sure you subscribe to my regular Email Updates!

0 Feed Back:

Add to Technorati Favorites Best Free Domains ll About Orkut. Orkut JavaScripts,Tips & Tricks, Tricks Related To Computers, News, Entertainment And Plenty More. Loads of stuff would be sufficient to fill your appetite

Thanks For Visiting The Site | ۩ Orkut Fun n' Fan Club™ Owned By Orkut Offcial Community