Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!lanl!rbw From: rbw@lanl.gov (Bob Walker) Newsgroups: comp.sys.amiga.programmer Subject: Re: Question about AC/FORTRAN and a visit from the GURU Summary: answers Message-ID: <17429@lanl.gov> Date: 11 Mar 91 18:23:59 GMT References: <47189@nigel.ee.udel.edu> Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 57 I'm posting an answer to Mark Stucky's AC/FORTRAN question, since my machine can't find his by email: In an earlier message, Mark Stucky (mark%ardnt1@utrcgw.utc.com) asks: > I have a question for anyone out there that uses (or has used) the > Absoft Fortran compiler. [ ... details deleted ...] After about 30 > seconds, I said hello to the GURU (GURU #00000003.00C12130). Mark, there are several problems with the source code. The compiler shouldn't toss its cookies over them, and the fact that it crashes when you try to compile your code is a bug with the compiler. This is the first example I've seen of the compiler crashing like that in several years of using V2.3 (that's to make you feel better (?)). I made several changes to your code. First you cannot initialize data into common blocks, and so the data statements in the include file have to go. Put them into a block data subroutine, and make sure the data statements follow the variable and common declarations, or else you'll get compiler errors there too. There are two possible places where the compiler may have crashed -- (1) I am always nervous about using too many colons (you use colons to indicate continuation cards). I have had the compiler get things wrong with colons (although only inside character strings) so I avoid them. I know you shouldn't have to, and I don't really think that's the problem. I changed them anyway. The more likely problem is that you use a construct like this to initialize character data: Parameter ( TAB = CHAR( 9 ) ) Parameter ( QMARK = CHAR( 63 ) ) I don't think you can use the CHAR function inside the parameter statement. For printing variables, you can do the following: Parameter ( QMARK = '?' ) and for non-printing ones you can initialize to integers, as in: Parameter ( TAB = 9 ) A final observation: you mix character data types with others (integers) in the common block declaration. That's OK on many machines (including the Amiga), and not on others (like CRAYs). I would suggest for portability you break up any commons that have both character data and anything else. If you can find a mail path from you to me, I will be happy to email you the sources that I managed to get to execute OK. Bob Walker rbw@t12.lanl.gov