home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / new / dev / misc / p2c / examples / readme < prev    next >
Text File  |  1993-12-21  |  1KB  |  48 lines

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