home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix CD 2.0
/
Phoenix_CD.cdr
/
01e
/
let12.zip
/
DEMO-6.BAT
< prev
next >
Wrap
DOS Batch File
|
1987-09-17
|
809b
|
25 lines
echo Off
If `%Name%' == `' Demo
cls
echo ╔════════════════════════════════════════════════════════════════╗
echo ┌─╫────────────────────────────────────────────────────────────────╫─┐
echo │ ║ String Manipulation (part 3): Breaking strings into words ║ │
echo └─╫────────────────────────────────────────────────────────────────╫─┘
echo ╚════════════════════════════════════════════════════════════════╝
echo
echo Now I'm going to print the string, each word on a new line.
LET P=(pos Str " ")
:NextWord
if %P% == 0 goto EndWord
LET dummy=(do "Words")
echo "%Word%"
goto NextWord
:EndWord
if not `%Str%' == `' echo and "%Str%"
echo Is that Neat? If you're not truly amazed yet, we have to go on.
echo (the truth is that we'd go on anyway....)
set word=
set p=
pause
DEMO-7