Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!rutgers!news.cs.indiana.edu!uceng!minerva!dmocsny From: dmocsny@minerva.che.uc.edu (Daniel Mocsny) Newsgroups: comp.lang.fortran Subject: The "struct" program Message-ID: <6861@uceng.UC.EDU> Date: 4 Dec 90 06:00:54 GMT Sender: news@uceng.UC.EDU Organization: University of Cincinnati, Cin'ti., OH Lines: 24 I stumbled across a quite useful program called "struct" in the distribution of the VAX Ultrix version of UNIX. "struct" converts spaghetti-code FORTRAN-66 or FORTRAN-77 into nice, clean "ratfor". It does a very good job of replacing GOTO constructs into equivalent IF-THEN-ELSE, FOR, WHILE, and SWITCH-CASE-DEFAULTs. I'm impressed, anyway. Having de-spaghetti-fied "ratfor" makes hand-translation to C pretty straightforward in many cases, since "ratfor" looks a lot like C. It's also a lot easier to read than spaghetti FORTRAN... Anyway, my question for the NET is: why don't I see this program anywhere in the FORTRAN stuff on HP-UX and SunOS? Both of those systems have the "ratfor" preprocessor, but no "struct" that I can see. Who wrote "struct", and why I haven't I found it talked about in the Ultrix-32 Supplementary Documents, Volume 2, where "f77" and "ratfor" have their entries? -- Dan Mocsny Snail: Internet: dmocsny@minerva.che.uc.edu Dept. of Chemical Engng. M.L. 171 dmocsny@uceng.uc.edu University of Cincinnati 513/751-6824 (home) 513/556-2007 (lab) Cincinnati, Ohio 45221-0171 Brought to you by Super Global Mega Corp .com