home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 16 / 16.iso / t / t272 / 1.img / TMESDEMO.EXE / TMESDEM2.BAT < prev    next >
Encoding:
DOS Batch File  |  1993-11-01  |  1.6 KB  |  50 lines

  1. echo off
  2. cls
  3. Echo TMES DEMO #2 
  4. Echo ....for the still curious - remember this is a batch file!
  5. Echo ....and also remember there's no errorlevel checking here!
  6. Echo.
  7. ::   start a counter=1, for it to iterate to 6 before quitting
  8. ::   
  9. TMES COUNT 1
  10. ::
  11. Echo You will be entering 5 items...
  12. ::------------------------------------------------------
  13. :TOP_OF_LOOP
  14. Echo Please Enter Item #%COUNT% now and press ENTER
  15. ::
  16. ::   allows input for A(%COUNT%)
  17. TMES A(%COUNT%) /input
  18. ::
  19. ::   increments the COUNT by +1
  20. TMES COUNT /inc
  21. ::
  22. ::   asks if the count is 6 yet?
  23. TMES COUNT /eq 6 ANSWER
  24. ::
  25. if '%ANSWER%' == '0' goto TOP_OF_LOOP
  26. ::
  27. :: ----bottom of loop-----------------------------------
  28. ::
  29. Echo Please ENTER a number in your "big" range of 1 to 5 (ie like maybe 2 ?)
  30. TMES X /input
  31. Echo.
  32. if 'A(1)'=='A(%X%)' echo What you input for #%X% was "%A(1)%"
  33. if 'A(2)'=='A(%X%)' echo What you input for #%X% was "%A(2)%"
  34. if 'A(3)'=='A(%X%)' echo What you input for #%X% was "%A(3)%"
  35. if 'A(4)'=='A(%X%)' echo What you input for #%X% was "%A(4)%"
  36. if 'A(5)'=='A(%X%)' echo What you input for #%X% was "%A(5)%"
  37. Echo.
  38. Echo Enjoy TMES.  If you make any neat BATCH file send them to me for
  39. Echo inclusion in the next version of TMES.  If I use your example, I will
  40. Echo send you the next version free and write you a postcard to let you
  41. Echo know that you qualified.  Thanks.  Remember, it's got to be good!
  42. Echo.
  43. Echo P.S.
  44. Echo I will erase the environment variables for you.  If you want to look
  45. Echo at them however, just CONTROL-C now and do a SET for a peek at them.
  46. pause
  47. TMES /del X COUNT ANSWER A(1) A(2) A(3) A(4) A(5)
  48.  
  49.  
  50.