home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 December / simtel1292_SIMTEL_1292_Walnut_Creek.iso / msdos / turbopas / conv_p18.arc / CONV_P.DOC < prev    next >
Text File  |  1989-11-21  |  6KB  |  118 lines

  1. The file included, UPCONV.EXE, is a program published in 'Turbo Pascal
  2. Library' published by Sybex books.  It is a modification of the program
  3. UPCASE.PAS.  This program will convert all the reserved words in a Turbo
  4. Pascal program to uppercase, leaving strings and comments unchanged.  This
  5. version was modified (so the include file was not necessary) by Derron Simon
  6. (GEnie Mail: D.SIMON).  If you find it interesting, I would recommend you
  7. purchase 'Turbo Pascal Library'.  It is full of useful routines.  Have fun!!
  8.  
  9. v1.8, Toad Hall, 20 Nov 89
  10.   - Renamed to CONV_P (to accompany the CONV_A assembly language
  11.     conversion utility).
  12.   - Now permits command-line entry of desired reserved word data files
  13.     (via a new '/Idatafile.typ' command line entry).
  14.   - Including a file of reserved words from TechnoJocks TTT5 package.
  15.   - Using STRINGS.TPU.  (See STRINGS.DOC for credits.)
  16.   - Slightly tweaked the POS() replacement function POSBM (now POSBM2.ASM,
  17.     POSBM2.OBJ).
  18.   - Completely rewrote TOK_STR (now TOKSTR18.PAS) to produce one output
  19.     reserved word string data file (CONV_P.DAT) from one (or more)
  20.     target reserved word text files.  (Now we can use libraries of
  21.     reserved words, right?)
  22.  
  23. v1.6, Toad Hall, 20 Oct 89
  24.   - Moved the reserved word strings to an external file (UPCONV.DAT),
  25.     created by the TOK_STR utility.
  26.   - Now uses linked lists of string pointers to dynamic reserved
  27.     word strings (rather than the previous "hard-coded" typed constant
  28.     array of reserved word strings).
  29.   - Add a couple more missing reserved words (ParamCnt, ParamStr),
  30.     changed 'Assign' to "ASSIGN".
  31.   - Executable is now smaller, loads faster, runs faster.
  32.  
  33. v1.5, Toad Hall, 13 Oct 89
  34.   - Adding some missing reserved words (LongInt, Word)
  35.   - Added a modicum of file write error-trapping.
  36.  
  37. v1.4, Toad Hall, 15 Jun 89
  38.   - Added some missing reserved words (FillChar, FOR, FUNCTION).
  39.   - Adding faster replacement for the POS() function (POSBM).
  40.   - Made Args array dynamic (e.g., via pointers)
  41.   - Buffering string reads, writes into two dynamic buffers to reduce
  42.     disk thrashing, slightly speed up program (maybe 10%).
  43.     (Not doing any memory testing right now .. hope your system
  44.     has enough memory!)
  45.   - Writing a terminating ^Z to our output file
  46.     (just to be neat, keep same file size, etc.).
  47.   - Still no file read/write error-trapping.
  48.  
  49. v1.3, Toad Hall, 14 Apr 89
  50.   - Rewrote for Turbo Pascal v5.0
  51.   - Added a bunch of Turbo Pascal v4.0/v5.0 reserved words.
  52.   - Tightened code a lot.
  53.   - Adding multiple or wildcard capability.
  54.     You can now:
  55.     UPCONV FOO1 FOO2    converts FOO1.PAS and FOO2.PAS
  56.                 to FOO1.FMT and FOO2.FMT respectively
  57.     or    UPCONV *.PAS        converts all .PAS files to .FMT
  58.     or    UPCONV FOO*        converts all FOO*.PAS files to FOO*.FMT
  59.     or  UPCONV *.*        converts ALL files to .FMT (careful!)
  60.     Target files can be anywhere (e.g., you can include a path),
  61.     but the .FMT output will be to current drive:\directory.
  62.     UPCONV will NOT overwrite existing .FMT files (unless you change an IFDEF
  63.     in the source code and recompile).
  64.   - Added an "/L" (or "-l") switch to convert ordinary Pascal (e.g.,
  65.     non-Borland) reserved words to lower case.
  66.     The "/U" (or ("-u") switch still converts ALL reserved words
  67.     to uppercase.
  68.   - Run UPCONV13 with no parameters for help.
  69.   - Adding separate utility (TOK_STR.PAS and TOKEN.INC)
  70.     to produce nicely formatted strings of reserved words
  71.     (so we can easily update this sucker!).
  72.   - Distributing separately from earlier versions
  73.     (e.g., no more Turbo v3.0 or CP/M versions in this archive).
  74.  
  75. v1.2, 12 Oct 88
  76.   - Fixed bugs that (1) would (1) just quit processing and write out as-is,
  77.     and (2) would not leave quoted strings alone.
  78.     (Dumb .. sorry, guys, just didn't test enough.)
  79.  
  80. v1.1, 23 Sep 88
  81.   - Table of reserved words now includes Turbo Pascal MS-DOS v3.0.
  82.   - Tweaked for speed, tightness.
  83.   - Now provides reserve word uppercasing (standard Pascal words)
  84.     and "Borland format" for Turbo Pascal words.
  85.   - No more prompted filename input.  Gives help if incorrect command line.
  86.     Usage:  UPCONV [-[uh?]] file1[.PAS] file2[.FMT] [-[uh?]]
  87.     where:
  88.     input file file1 has default .PAS type
  89.     output file file2 has default .FMT type (program will use input
  90.     file name if no output name provided)
  91.     Switches '-' or '/' are accepted before or after file names:
  92.       U    - force uppercasing of ALL Pascal words (no Borland format).
  93.       ?, h    - display help, quit
  94.  
  95.  
  96.   Note:  I tweaked this program to replace PFORMAT, another Pascal reformatting
  97.   program.  It has a few more functions than UPCONV does, but its basic
  98.   algorithm for finding and replacing reserved words is a slug (despite my
  99.   most fervent tweaking!).
  100.  
  101.   One ESSENTIAL Note:
  102.   PFORMAT has a funny way of handling comments (the {} and (* *) tokens).
  103.   It will NOT reformat any code or text within {} tokens.
  104.   It WILL reformat any code (or text!) within (* *) tokens.
  105.  
  106.   So .. if you're in the habit of commenting out a bunch of text
  107.   with the (* *) tokens .. you're gonna get some strange text!
  108.  
  109.   Get in the habit of (1)  Excluding text with {} tokens,
  110.    and                (2)  Temporarily commenting out code with (* *) tokens.
  111.  
  112.   This is NOT a bug, but a feature!  You can temporarily comment out code,
  113.   yet still have it properly reformatted.
  114.  
  115.   David Kirschbaum
  116.   Toad Hall
  117.   kirsch@arsocomvax.socom.mil
  118.