iwm@doc.ic.ac.uk (Ian Moor) (04/09/88)
The pxp BSD Pascal prettyprinter inserts the word `null' in places where a null statement is legal : if B then P else; becomes if B then P else null;. Null is not a legal Pascal statement and causes non BSD Pascal processing tools to complain, (eg. ptc : Pascal to C converter). As pxp has an {\HUGE FLAME undocumented} switch -O for removing `others' in case statements it is used in compiling TeX -- and the Tangle preprocessor generates statements with null cases that get mangled as described above. Ian W Moor UUCP: seismo!mcvax!ukc!icdoc!iwm ARPA: iwm@doc.ic.ac.uk JANET: iwm@uk.ac.ic.doc Department of Computing Whereat a great and far-off voice was heard, saying, Imperial College. Poop-poop-poopy, and it was even so; and the days 180 Queensgate of Poopy Panda were long in the land. London SW7 Uk.
mike@turing.UNM.EDU (Michael I. Bushnell) (04/11/88)
In article <252@gould.doc.ic.ac.uk> iwm@doc.ic.ac.uk (Ian Moor) writes: >The pxp BSD Pascal prettyprinter inserts the word `null' in places >where a null statement is legal : if B then P else; becomes >if B then P else null;. Null is not a legal Pascal statement and >causes non BSD Pascal processing tools to complain, (eg. ptc : Pascal to >C converter). As pxp has an {\HUGE FLAME undocumented} switch -O for >removing `others' in case statements it is used in compiling TeX -- >and the Tangle preprocessor generates statements with null cases that >get mangled as described above. While null statements are ALWAYS legal...[take a look at the syntax], the procedure name "null" is required to be provided in every ISO comformant compiler. It is a procedure which does nothing. Berkeley pc just ignores it instead of generating a call. So, it IS standard pascal. Furthermore, in my opinion, the placement of an explicit call to null makes the structure much more readable. N u m q u a m G l o r i a D e o Michael I. Bushnell HASA - "A" division 14308 Skyline Rd NE Computer Science Dept. Albuquerque, NM 87123 OR Farris Engineering Ctr. OR University of New Mexico mike@turing.unm.edu Albuquerque, NM 87131 {ucbvax,gatech}!unmvax!turing.unm.edu!mike