[net.lang.f77] Problems with "implicit"

bjorn@alibaba.UUCP (Bj|rn Ekelund) (03/27/85)

During my work of transferring a rather large program written for
VAX/VMS fortran to UNIX f77 i have encountered one specific problem. 
When using 'implicitly' defined formal parameters in functions and
subroutines, the compiler seem to fail in the syntax check. 
For instance, the small program below is accepted without any 
complaints, even though it contains a logical operation between
two integers, not permitted elsewhere by f77.

	program foo
	integer stupid
	   write(*,*) stupid(3)
	end

	function stupid(ptr)
	   implicit integer(a-z)
	   blkptr = ptr.and.7        
	   offset = and(ptr,70)
	   stupid = offset + blkptr
	end

If I change the 'implicit' definition to 'integer ptr,blkptr...'
then f77 tells me about the error. Maybe this is a topic that
has been on the net before, but since I am quite new on the net,
I have not read about it before. I would very much like an
explanation if anyone knows what the problem is.

Bjorn Ekelund
Lund Institute of Technology
Dep. of Applied Electronics.
Sweden