home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / games / mcad.zip / T053.MCD < prev    next >
Text File  |  1987-05-04  |  892b  |  51 lines

  1. 8,2
  2. .MCD 11000 0
  3. .TXT 1 0 1 17 
  4. 1,17
  5. DEFINING ARRAYS
  6. .TXT 2 4 1 52 
  7. 1,52
  8. You can also use range variables to define arrays.
  9. .TXT 2 0 1 13 
  10. 1,13
  11. Try it now:
  12. .TXT 0 14 1 38 
  13. 1,38
  14. 1. k is already defined at right -->
  15. .EQN 0 43 1 12 
  16. ! rd=d ct=10 im=i et=3 zt=15 pr=3 mass length time charge 
  17. k:1;4
  18. .TXT 1 -43 1 27 
  19. 1,27
  20. 2. Type the array name: x
  21. .TXT 1 0 1 50 
  22. 1,50
  23. 3. Type a left bracket ([) to create a subscript
  24. .TXT 1 0 1 36 
  25. 1,36
  26. 4. Type the range variable name: k
  27. .TXT 1 0 1 21 
  28. 1,21
  29. 5. Type a colon (:)
  30. .TXT 1 0 1 19 
  31. 1,19
  32. 6. Type this: k+5
  33. .TXT 1 0 1 18 
  34. 1,18
  35. 7. Press [Enter]
  36. .TXT 1 0 1 38 
  37. 1,38
  38. 8. To see the values of k, type x[k=
  39. .TXT 2 0 3 27 
  40. 3,27
  41. When you're done, the 
  42. equation and table should 
  43. look like this:
  44. .EQN 0 28 2 13 
  45. x[k:k+5
  46. .EQN 2 0 6 5 
  47. x[k=
  48. .TXT 6 -46 1 50 
  49. 1,50
  50. (Press [F6] to go back to the tutorial menu ...)
  51.