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

 
Output of file : REVERSE.BAT contained in archive : VOL11N13.ZIP
@ECHO OFF
IF '%1'=='' GOTO Syntax
IF NOT '%2'=='' GOTO Syntax
SET WString=%1
SET rev=
:loop
SET OldVal=%WString%
FOR %%v IN (/%WString%) DO SET WString=%%v
FOR %%v IN (/%OldVal%) DO IF '%%v%WString%'=='%OldVal%' SET first=%%v
IF NOT '%OldVal%'=='%WString%' GOTO NotLast
SET rev=%OldVal%%rev%
GOTO Done
:NotLast
SET rev=%first%%rev%
GOTO loop
:Syntax
ECHO Syntax: REVERSE string
ECHO where string is a character string with no spaces.
GOTO End
:Done
ECHO "%1" reversed is "%rev%"
SET WString=
SET OldVal=
SET first=
:END


  3 Responses to “Category : Files from Magazines
Archive   : VOL11N13.ZIP
Filename : REVERSE.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/