[net.bugs.4bsd] problem in f77

trq@astrovax.UUCP (Thomas R. Quinn) (03/18/84)

I have sent the following bug report to berkely:

Subject: problem with parameters in f77
Index:	usr.bin/f77 4.2BSD

Description:
	Assigning an integer to the sum of an integer and "0" times "iparam"
	where the value of "iparam" is defined in a parameter statement results
	in the integer being assigned the value "0".
Repeat-By:
	Compile and run the following program under f77.


	parameter(IRED = 256)
	iwrblk = 10 + 0*IRED
	print *,iwrblk
	end

	The program will print "0" instead of the correct value "10".  Note 
	that the statement
		print *, 10 + 0*IRED
	will print the correct value.

woods@hao.UUCP (Greg Woods) (03/19/84)

  I don't know where you got your compiler from, but when I compile and
run this test program on our VAX 11/750 running 4.2BSD, it correctly prints
"10". 

      program testit
      parameter (ired=256)
      itst=10+0*ired
      write(6,*) itst
      stop
      end

	     Greg "FORTRAN hacker" Woods
-- 
{ucbvax!hplabs | allegra!nbires | decvax!stcvax | harpo!seismo | ihnp4!stcvax}
       		        !hao!woods