home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff341.lzh / P2C / p2c.lzh / p2c1_13a / examples / README < prev    next >
Text File  |  1990-03-09  |  1KB  |  46 lines

  1.  
  2. This directory contains examples for "p2c", a Pascal to C translator.
  3.  
  4. "p2c"  Copyright 1989  Dave Gillespie
  5.                        256-80 Caltech
  6.                        Pasadena CA 91125
  7.                        daveg@csvax.caltech.edu, cit-vax!daveg
  8.  
  9.  
  10.  
  11.  
  12. Here are some sample programs you can run through p2c.  The Makefile
  13. for this directory knows how to translate and compile all programs.
  14. The "c" subdirectory contains pre-translated files you can compare
  15. with your p2c output.  (The "c" subdirectory is present in the ftp
  16. distribution only, not in the shar distribution.)
  17.  
  18. To translate only:          make trans   or just   make
  19. To translate and compile:   make comp
  20.  
  21. These programs have been culled from various places around the Caltech
  22. C.S. educational lab.  All programs are by Dave Gillespie except as
  23. noted, and are in the HP Pascal dialect.
  24.  
  25.  
  26. fact.p       The obligatory recursive factorial program.  Try this
  27.         one first: "make fact.c" to translate, or "make fact"
  28.         to translate and compile.
  29.  
  30.  
  31. e.p           Program for computing "e" to high precision.
  32.         (Courtesy of Scott Hemphill.)
  33.  
  34.  
  35. self.p       A self-printing program in Pascal.  Try translating,
  36.         running, and diff'ing the output with self.p.
  37.  
  38.  
  39. cref.p       A cross-referencer for Pascal programs.  Enter source
  40.         file name(s), then a blank line, then output file name.
  41.  
  42.  
  43. basic.p       An interpreter for the Basic language, just for kicks!
  44.         See "basic.doc" for documentation.
  45.  
  46.