home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / TNH_PC.ZIP / CORTESI.NL < prev    next >
Encoding:
Text File  |  1987-01-14  |  2.8 KB  |  95 lines

  1. Organizing Pascal Diskettes
  2.  
  3.              Dave Cortesi
  4.     Silicon Valley Computer Society
  5.  
  6. While I have been using IBM Pascal
  7. for a month now, others just starting
  8. might be interested in a method I use
  9. to organize diskettes for easy
  10. compiling.
  11.  
  12. I've always split diskettes into two
  13. categories: "project" and "work". A
  14. project diskette is a repository for
  15. files and only that; it has no
  16. commands and no system files. Project
  17. diskettes are normally loaded into
  18. the B drive. For Pascal work, a
  19. project diskette contains only Pascal
  20. source and object files and maybe
  21. some test data (the EXE files are too
  22. big, usually; they go on disks where
  23. they will be used). Pascal programs
  24. get a .PAS extension; modules are
  25. .MOD, interfaces are .INF; and
  26. implementations are .IMP. You might
  27. have several project diskettes, each
  28. with files related to one "project".
  29.  
  30. You probably would have only one
  31. Pascal "work" diskette.  A work
  32. diskette contains the system files,
  33. plus command files that you use in
  34. your work: Mode, Chkdsk, Edlin, etc.
  35. It also contains the batch files you
  36. use (there is lots of opportunity to
  37. use .BAT files when working in IBM
  38. Pascal). The Pascal work diskette has
  39. to contain one file from the compiler
  40. distribution: PASKEY. And finally,
  41. the work diskette gets all scratch
  42. files and the working copies of all
  43. source programs while they are being
  44. worked on. A work diskette is never
  45. backed up; the policy is that there
  46. is nothing on it that can't be
  47. recreated or retrieved from somewhere
  48. else.
  49.  
  50. The third diskette in the system is
  51. the compiler disk. The following
  52. files just fit on one double-sided
  53. diskette:
  54.  
  55. PAS1.EXE    PAS2.EXE
  56. PASCAL.LIB    LINK.EXE
  57.  
  58. This diskette can have a
  59. write-protect sticker on it. Here's
  60. how it works. The work diskette stays
  61. in the A drive all the time. Insert
  62. the relevant project diskette in the
  63. B drive and copy the program to be
  64. modified from B to A. Edit it on A.
  65. Put the compiler diskette in the B
  66. drive and run a batch file like this
  67. one:
  68.  
  69. B:PAS1 %1,,CON
  70. PAUSE hit enter if
  71. "No Errors Found"
  72.    else Break
  73. B:PAS2
  74. PAUSE hit enter if
  75. "No Errors Found"
  76.    else Break
  77. B:LINK %1,,NUL,B:PASCAL
  78.  
  79. When the new program works, put the
  80. project diskette back in B and copy
  81. the final version of the source and
  82. object (but not EXE) from A to B. If
  83. you have only single-sided drives,
  84. you will have to use three compiler
  85. disks; your .BAT file can prompt you
  86. when to change them. Frankly, I don't
  87. see how users of single-sided drives
  88. can compile at all; the temporary
  89. files (PASIBF.*) are terribly big. At
  90. the very least, you will have to
  91. erase every possible file from the
  92. work diskette before starting the
  93. compile; a batch file can help can
  94. help there, too.
  95.