(1) It does not translate "Advance = No". Is there a fix in the
works? The current version has a message saying it won't
try to do it.
(2) It seems to fail with recursive subroutines. There's no message
that says it ran into the keyword 'recursive' and is not
going to work, but later raises an objection to the recursive
call. Is it supposed to be able to handle recursive subroutines?
--
_________________________________________________________________________
Levent Kitis lk...@esmeralda.mech.virginia.edu
University of Virginia Department of Mechanical and Aerospace Engineering
_________________________________________________________________________
> Two VastF90 questions:
>
> (1) It does not translate "Advance = No". Is there a fix in the
> works? The current version has a message saying it won't
> try to do it.
>
> (2) It seems to fail with recursive subroutines. There's no message
> that says it ran into the keyword 'recursive' and is not
> going to work, but later raises an objection to the recursive
> call. Is it supposed to be able to handle recursive subroutines?
There have been a lot of post mentioning this `compiler' recently. In
all fairness, IIRC it TRANSLATES the code to Fortran 77. So if it can't
be emulated by FORTRAN77, or rather FORTRAN77 + extensions of the
compiler you are using, VAST can't do it. You can look at the source
code it generates. If long names are supported, then more than 6
characters as in Fortran90 is no problem, optional arguments can be
emulated by using additional logical arguments etc. However, RECURSIVE
and ADVANCE=NO look like something which not every Fortran77 compiler
can handle.
--
Phillip Helbig Email ......... p.he...@jb.man.ac.uk
Nuffield Radio Astronomy Laboratories Tel. ... +44 1477 571 321 (ext. 2635)
Jodrell Bank Fax ................ +44 1477 571 618
Macclesfield Telex ................ 36149 JODREL G
UK-Cheshire SK11 9DL Web ... http://www.jb.man.ac.uk/~pjh/
************************ currently working at *******************************
Kapteyn Instituut Email (above preferred) hel...@astro.rug.nl
Rijksuniversiteit Groningen Tel. ...................... +31 50 363 4067
Postbus 800 Fax ....................... +31 50 363 6100
9700 AV Groningen
The Netherlands Web ... http://gladia.astro.rug.nl/~helbig/
(1) It does not translate "Advance = No". Is there a fix in the
works? The current version has a message saying it won't
try to do it.
(2) It seems to fail with recursive subroutines. There's no message
that says it ran into the keyword 'recursive' and is not
going to work, but later raises an objection to the recursive
call. Is it supposed to be able to handle recursive subroutines?
My GNU c++ compiler doesn't seem to be provide the valarray
facility, which is mentioned by several sources to be
'standard'. Is valarray in the form described by Bjarne S.,
Third Edition, c++ programming language, available in the
public domain?
>Two VastF90 questions:
> (1) It does not translate "Advance = No". Is there a fix in the
> works? The current version has a message saying it won't
> try to do it.
Dear Count Dracula,
Do you have another "current version" in Transylvania than we have?
Version V3.4N4 (on Linux) correctly handles the following:
write(unit=*,fmt="(a)",advance="no") "Hello "
write(unit=*,fmt=*) "world"
It's translated to the "$" format, which is accepted by g77.
> (2) It seems to fail with recursive subroutines. There's no message
Again, V3.4N4 has no problem with:
recursive function fac(i) result(r)
integer, intent(in) :: i
integer :: r
if (i<2) then
r = 1
else
r = i*fac(i-1)
end if
end function fac
Greetings,
Jos
> lk...@esmeralda.mech.Virginia.EDU (Count Dracula) writes:
> >Two VastF90 questions:
> > (1) It does not translate "Advance = No". Is there a fix in the
> > works? The current version has a message saying it won't
> > try to do it.
> Dear Count Dracula,
> Do you have another "current version" in Transylvania than we have?
He seems to have relocated to Virginia. No doubt in search of more
pristine blood.
> Version V3.4N4 (on Linux) correctly handles the following:
> write(unit=*,fmt="(a)",advance="no") "Hello "
> write(unit=*,fmt=*) "world"
> It's translated to the "$" format, which is accepted by g77.
How about READ (..., ADVANCE='NO') ? If the underlying Fortran 77
runtime library won't cooperate, the compiler would have to introduce
a buffer of its own to hold the entire record. How would it go about
choosing the right size for that buffer?
In the case of g77, perhaps it would be a good idea for someone to
add full ADVANCE='NO' support to libg2c (or however it's now called)
and (for those who care about VAST/f90; I don't) tell Dave McNamara to
please build on that.
> > (2) It seems to fail with recursive subroutines. There's no message
>
> Again, V3.4N4 has no problem with:
> recursive function fac(i) result(r)
Is that a recursive SUBROUTINE?
>berg...@iaehv.IAEhv.nl (Jos Bergervoet) writes:
>> lk...@esmeralda.mech.Virginia.EDU (Count Dracula) writes:
>> >Two VastF90 questions:
>> write(unit=*,fmt="(a)",advance="no") "Hello "
>> write(unit=*,fmt=*) "world"
>> It's translated to the "$" format, which is accepted by g77.
>How about READ (..., ADVANCE='NO') ? If the underlying Fortran 77
Good point. That one isn't translated (but what would be it's use?)
>In the case of g77, perhaps it would be a good idea for someone to
>add full ADVANCE='NO' support to libg2c (or however it's now called)
I would very much prefer the qualified craftspersons to postpone that,
and FIRST include allocatable arrays (pointers may be postponed also,
of course.)
>> recursive function fac(i) result(r)
>Is that a recursive SUBROUTINE?
A very fancy one, with implicit result variable, isn't it? But as far as
the thread's subject is concerned, the default size of the recursion
stack in vf90 is rather small (100) for both subroutines and functions.
-- Jos
Dave hasn't made a vf90 specifically adapted to g77; if he did it could solve
some problems, such as the bugs in automatic arrays with more than 2 subcripts
and maybe some of the slowness of allocation. Certainly, it would be an
improvement for g77/libg2c to do this in accordance with the standard.
>> > (2) It seems to fail with recursive subroutines. There's no message
>>
>> Again, V3.4N4 has no problem with:
>> recursive function fac(i) result(r)
>
>Is that a recursive SUBROUTINE?
>
Since vf90 is an interface to generic f77, support of recursion may be
difficult, and there may not be adequate diagnostics, such as reminding you not
to use SAVE or global storage.
Tim Prince
tpr...@computer.org
> >How about READ (..., ADVANCE='NO') ? If the underlying Fortran 77
>
> Good point. That one isn't translated (but what would be it's use?)
How about finding out the actual size of an input record (via the
SIZE= keyword)? Or handling arbitrarily long lines of input by
looping with READ(...,ADVANCE='NO',IOSTAT=ios,SIZE=isize) until
(ios<0) ?
> >In the case of g77, perhaps it would be a good idea for someone to
> >add full ADVANCE='NO' support to libg2c (or however it's now called)
> I would very much prefer the qualified craftspersons to postpone that,
> and FIRST include allocatable arrays (pointers may be postponed also,
> of course.)
You are assuming that the qualified craftmen are the same for both
enhancements. This need not be so, as most of the work for
non-advancing I/O is in modifying the I/O library while ALLOCATABLE
support has far deeper implications for the compiler itself.