Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!helios!bioch.tamu.edu!antek From: antek@bioch.tamu.edu Newsgroups: comp.lang.fortran Subject: Non-VMS like behaviour of "f77 -vms ..." Message-ID: <9811@helios.TAMU.EDU> Date: 3 Nov 90 20:15:04 GMT Sender: usenet@helios.TAMU.EDU Reply-To: antek@bioch.tamu.edu Distribution: usa Organization: Texas A&M University Lines: 32 Hi! I'm trying to port a Fortran program written for a VAX to a MIPS UNIX BSD4.3 environment. There is quite pure F77 code inside, no VAX system calls etc., but two things are strange: 1) During the execution of such a code: CHARACTER*10 ANSWER WRITE (6,'(''$Enter your answer: '')') ! The "$" to suppress READ (5,'(A10)') ANSWER a user have to hit the key TWICE, regardless of the length of the string s/he enters. I tried 3 different positions of the $ sign and several options (-vms, -systype bsd43, etc.) but the problem remains unchanged or the "$" is not interpreted at all. NUMERICAL input is ok, only the "A" format is giving troubles. 2) Ordinary divisions by zero and SQRT of a negative doesn't produce any run- time errors, instead they set the NaN value to a number, or a zero: Pseudocode: r = 0.0; i = 0; rneg = -1.0; r = 1.0/r; i = 1/i; rneg = SQRT(rneg); write (6,*) r, i, rneg Answer: NaN 0 0.00000 (1.0 / NaN gives 0.0 again) Great, errors don't break the program (what I wanted anyway), but I would rather like them to create an interrupt which I can catch in a handler. And in the debuging phase I believe I AM writing parts of the code wrong, so nonsense values should be reported, I can't write out *everything* or go step-by-step with a debuger through 10000 lines of the program. Any suggestions ? Antek @ Bioch.Tamu.Edu