home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 01e / let12.zip / DEMO-6.BAT < prev    next >
DOS Batch File  |  1987-09-17  |  809b  |  25 lines

  1. echo Off
  2. If `%Name%' == `' Demo
  3. cls
  4. echo   ╔════════════════════════════════════════════════════════════════╗
  5. echo ┌─╫────────────────────────────────────────────────────────────────╫─┐
  6. echo │ ║   String Manipulation (part 3): Breaking strings into words    ║ │
  7. echo └─╫────────────────────────────────────────────────────────────────╫─┘
  8. echo   ╚════════════════════════════════════════════════════════════════╝
  9. echo  
  10. echo Now I'm going to print the string, each word on a new line.
  11. LET P=(pos Str " ")
  12. :NextWord
  13. if %P% == 0 goto EndWord
  14. LET dummy=(do "Words")
  15. echo "%Word%"
  16. goto NextWord
  17. :EndWord
  18. if not `%Str%' == `' echo and "%Str%"
  19. echo Is that Neat?  If you're not truly amazed yet, we have to go on.
  20. echo (the truth is that we'd go on anyway....)
  21. set word=
  22. set p=
  23. pause
  24. DEMO-7
  25.