This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fwd: (j3.2006) Fortran 2003 compiler features]


Steve Kargl wrote:
On Sun, Feb 04, 2007 at 10:39:11PM +0100, Tobias Burnus wrote:
is the following correct? Suggestions?

Looks about right.


"Binary, octal and hex constants"
NO.
(REAL BOZ are not supported, PR29471, PR18026)

I'm assuming that this means REAL(BOZ). PR18026 has nothing to do with this feature. It involves the common misconception that a BOZ in a data statement involving a REAL is a bitwise copy.

Recursive input/output

No. But it does sometimes work on some targets.


The following mess works, I think we should call it a partial and if that is not a valid answer, then say no. My interpretation of the standard says this is about it. What platforms does it not work on? Might help to find out.

(aside: It is not hard to call yourself infinitely with something like this. I did it and the output keeps coming as expected until the segfault. If you are curious, put a call to io1 in the print statement in io2. It compiles fine. :) )

program recurse

real, dimension (5,5) :: array1

array1 = 3.0
print *, "In the main: ", io1(4.7), io2(23.6), io1(99.9)

contains
function io1(input)
  real, intent (in) :: input
  real              :: io1
  io1 = input + 1.0 + io2(input)
  print *, "Inside io1: ", input, io2(input), input+7.0,io2(333.3)
end function io1

function io2(input)
  real, intent (in) :: input
  real              :: io2
  io2 = input + 3
  print *, "inside io2: ", input
end function io2

end program recurse

[jerry@quasar test]$ ./a.out
 In the main:  inside io2:    4.700000
 Inside io1:    4.700000     inside io2:    4.700000
   7.700000       11.70000     inside io2:    333.3000
   336.3000
   13.40000     inside io2:    23.60000
   26.60000     inside io2:    99.90000
 Inside io1:    99.90000     inside io2:    99.90000
   102.9000       106.9000     inside io2:    333.3000
   336.3000
   203.8000


Jerry



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]