gec@cscraz.ncsu.edu (Errol Casey) (06/08/90)
I'm interested in finding a C or Pascal program that formats a Pascal program in to a "pretty" format. This program would be used by students to help keep code listings readable. Please email any information to gec@cscosl.ncsu.edu. I will collect the responses and post a summary if there is enough interest. Thanks. Errol Casey gec@cscosl.ncsu.edu NCSU Computer Science Department
rog@hpcilzb.HP.COM (Roger Haaheim) (06/12/90)
Why don't they "pretty" their code as they write it? Just give 'em a model and have 'em follow it...
ts@uwasa.fi (Timo Salmi LASK) (06/13/90)
In article <1990Jun8.005218.1157@ncsuvx.ncsu.edu> gec@cscraz.ncsu.edu (Errol Casey) writes: >I'm interested in finding a C or Pascal program that formats a Pascal >program in to a "pretty" >format. This program would be used by students to help keep code >listings readable. You can find at least one such utility (prinprn.zip) in the /pc/pd2 directory at chyde.uwasa.fi by anonymous ftp. There are also commercial formatters, but I gather that you are looking for PD. ................................................................... Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun
davidr@hplsla.HP.COM (David M. Reed) (06/16/90)
I have a shareware "pretty printer" (Pascal source formatter) written several years ago for Turbo Pascal version 3. I have used it many times, and like it for what it does. Primarily I use it so that all Pascal reserved words are in CAPS, Turbo Pascal enhancements are in UpperLower format, and any other words are in lowercase. (Of course, it ignores anything within quotes or comments.) This text formatting can be changed (such as my commands in all CAPS and Standard Pascal in UpperLower format, with Turbo Pascal extensions in lowercase. It also adds spaces to make the text more readable: writeln(str(x*sin(25+something)-first)); becomes WRITELN (x * SIN (25 + something) - first); which makes things far more readable for most people. The only thing I wish it had (and one day I will take the time to put it in) is something to fix up indentation.