Category : Files from Magazines
Archive   : VOL11N13.ZIP
Filename : MUL.BAT

 
Output of file : MUL.BAT contained in archive : VOL11N13.ZIP
echo off
cls
if %1!==! goto instr
echo Calculations are in PROGRESS!
:calc
strings /p~ decpos1 = find ~~%1~.
if not %decpos1%==0 goto havedec1
set num1=%1
goto two
:havedec1
strings decpos1 = sub %decpos1%,1
strings num1 = left %1,%decpos1%
strings decpos1 = add %decpos1%,2
strings dec1 = mid %1,%decpos1%,128
strings decpl1 = length %dec1%
set num1=%num1%%dec1%
:two
strings /p~ decpos2 = find ~~%2~.
if not %decpos2%==0 goto havedec2
set num2=%2
goto doprod
:havedec2
strings decpos2 = sub %decpos2%,1
strings num2 = left %2,%decpos2%
strings decpos2 = add %decpos2%,2
strings dec2 = mid %2,%decpos2%,128
strings decpl2 = length %dec2%
set num2=%num2%%dec2%
:doprod
strings prod = mul %num1%,%num2%
strings #decpl = add %decpl1%,%decpl2%
strings decprt = right %prod%,%#decpl%
strings prodlen = length %prod%
strings intgrlen = sub %prodlen%,%#decpl%
strings intgrprt = left %prod%,%intgrlen%
set answer=%intgrprt%.%decprt%
echo %1 X %2 = %answer%
set decpos1=
set dec1=
set decpl1=
set num1=
set decpos2=
set dec2=
set decpl2=
set num2=
set prod=
set #decpl=
set decprt=
set prodlen=
set intgrlen=
set intgrprt=
set answer=
goto end
:instr
echo X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X
echo.
echo Enter the numbers you wish multiplied after %0.
echo.
echo such as: MUL 125.75 5.65
echo.
echo The product will display as many decimal places as were entered.
echo.
echo X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X
:end
echo.
echo.


  3 Responses to “Category : Files from Magazines
Archive   : VOL11N13.ZIP
Filename : MUL.BAT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/