home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / compiler / fpc / tutor / l1p100 < prev    next >
Encoding:
Text File  |  1990-05-16  |  3.9 KB  |  90 lines

  1.     ╔═══════════════════════════════════════════════════════════╗
  2.     ║    Lesson 1 Part 10.0   F-PC 3.5 Tutorial by Jack Brown   ║
  3.     ╚═══════════════════════════════════════════════════════════╝
  4.                       ┌─────────────────┐
  5.                       │  Loading  Files │
  6.                       └─────────────────┘
  7.  
  8. Here is yet another way to load the entire file, and it works even if
  9. the file is not currently open is to use the FLOAD command that we used
  10. before.
  11.  
  12. FLOAD BANNER <enter>    <--- This one requires the file name.
  13.  
  14. Note:  If the currently open file is not BANNER.SEQ but some other
  15.        file say XXX.SEQ , then when the FLOADing above is finished
  16.        the file XXX.SEQ will be restored as the currently open file.
  17.  
  18.                  ┌────────────────────────┐
  19.                  │   **** Handy TIP ****  │
  20.                  └────────────────────────┘
  21.  
  22. A common mistake made by the novice is to repeatedly LOAD the same file
  23. several times while testing different load techniques as above or while
  24. reloading a corrected or modified version of a program under
  25. development.  If you are getting a lot of ... " isn't unique " messages
  26. it is probably because you are loading multiple copies of the same file
  27. on top of one another.  To empty the dictionary of the words previously
  28. loaded take one of the following approaches.
  29.  
  30. To remove all of the words so you are back to the state when F-PC was
  31. started you should type:
  32.  
  33. EMPTY <enter>     <---  remove all words added since starting F-PC
  34.  
  35. To remove all of the words in the BANNER program only you must FORGET
  36. the first word defined in the BANNER program. The first word in the
  37. BANNER program is CHAR-MATRIX , thus typing:
  38.  
  39. FORGET CHAR-MATRIX <enter>  <--- will remove CHAR-MATRIX and all the
  40.                                  following words from the dictionary.
  41. This would be the best approach if you had added other words earlier
  42. that you still want to retain.
  43.  
  44.                ┌───────────────────────────┐
  45.                │   Make Your Own Banner!   │
  46.                └───────────────────────────┘
  47.  
  48. Enter the EDitor and open a new file  MYBANNER.SEQ.
  49.  
  50. Use the <ALT> N   entry....  its the fastest.
  51.  
  52. Type in the following definition, using the <enter> key to add new lines
  53. to the file as needed.  The arrow keys can be used to move around, but
  54. you will not be allowed to move below the line containing the little up
  55. pointing triangle at the left edge of the screen, as this represents the
  56. end of the current file.  YOURNAME must be no longer than 11 characters!
  57.  
  58. : GREETING      ( --- )
  59.      DARK CR    " HELLO"    BANNER  " FROM" BANNER
  60.      2 SECONDS  " YOURNAME" BANNER ;
  61.  
  62. Now that you have typed in or edited the above definition into the file
  63. MYBANNER.SEQ, leave the editor saving the text you have entered, by
  64. pressing SHIFT F10 to save the program. If you already have the file
  65. BANNER loaded/compiled you are ready to compile the file MYBANNER with
  66. your GREETING . Type:
  67.  
  68. FLOAD MYBANNER <enter>     <--- to compile your banner greeting
  69. GREETING       <enter>     <--- to execute your banner greeting
  70.  
  71. ( *****  DID you load BANNER.SEQ first???  )
  72.  
  73. ╓────────────────╖
  74. ║  Problem 1.6   ║
  75. ╙────────────────╜
  76. The banner program uses the # character to form the block letters. Study
  77. the banner program and find where the change(s) must be made so that the
  78. block letters come out using the 177 character that was used to make the
  79. word WHITE in our checker board program. While your at it find out what
  80. you must do to stop the demo from running when the program is compiled.
  81. First one to report back here with exactly what must be changed wins a
  82. prize! Also,  What will the following do if typed at the dos prompt?
  83.  
  84. C:\FPC> F BANNER OK FLOAD MYBANNER GREETING BYE  <enter>  <--- Whatsitdo?
  85. Sorry, that's the wrong answer.  It doesn't do what I thought either!
  86.  
  87. ┌────────────────────────────────────┐
  88. │ Please move to Lesson 1 Part 11.0  │
  89. └────────────────────────────────────┘
  90.