View previous topic :: View next topic |
Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1897
|
Posted: Wed Oct 10, 2018 2:29 pm Post subject: What is intrinsic function/subroutine RR ? |
|
|
I cannot find an intrinsic procedure (function or subroutine) with the name RR in the FTN95 documentation. Does it exist? If so, what is its purpose? Thanks.
Here is a small test source to show what the compiler says:
Code: | subroutine wr(tstar,tt,iflag, yy)
implicit none
real rr, tin, tstar, ff, yy, tt
integer iflag
intrinsic abs,max,sign
iflag = 1
tin = sign(1.0,tstar)
tt = tin
ff = 0.0
if (abs(ff).le.50.0d0) then
rr = 0.95
yy = yy + rr*2.0*tt
endif
return
end subroutine wr |
With either the current or some earlier versions of FTN95, I see:
Code: | S:\MATH\Sleign2\Zettl>ftn95 /64 xrr.f90
[FTN95/x64 Ver. 8.30.279 Copyright (c) Silverfrost Ltd 1993-2018]
0003) real rr, tin, tstar, ff, yy, tt
COMMENT - This declaration of RR has caused the intrinsic of the same name to be inaccessible
NO ERRORS, 1 COMMENT [<WR> FTN95 v8.30.279] |
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8037 Location: Salford, UK
|
Posted: Wed Oct 10, 2018 7:51 pm Post subject: |
|
|
RR (right rotate) and LR (left rotate) are FTN77 intrinsics that provide a bitwise circular shift like ISHFTC.
Code: | integer i,j
i = 1
j = RR(i, 1)
print*, j
|
|
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1897
|
Posted: Wed Oct 10, 2018 9:06 pm Post subject: |
|
|
Thanks. I cannot find mention of RR and RL in the FTN77 help file, either. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Thu Oct 11, 2018 11:23 am Post subject: |
|
|
Hi Mecej4,
I have a copy of the 2 volume manual for FTN77/386 (Revision D). The routine RR is described on page 10-10 in volume 1, along with LS, RS, LR, (RR), SHFT, LT, RT. Section 10.8 describes the calling sequence. Would you like me to scan and send?
Eddie |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1897
|
Posted: Thu Oct 11, 2018 1:05 pm Post subject: |
|
|
Thanks, I did find them later on page 152 of https://www.silverfrost.com/manuals/77userguide.pdf . These may have been provided in FTN77 prior to the "Military" extensions to Fortran 77 that were made in 1983. |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 450 Location: Manchester
|
Posted: Fri Oct 12, 2018 10:35 am Post subject: |
|
|
"Military extensions"? |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 450 Location: Manchester
|
Posted: Fri Oct 12, 2018 10:55 am Post subject: |
|
|
That is half of the Fortran 77 syntax I use! |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Fri Oct 12, 2018 2:17 pm Post subject: |
|
|
Robert, That makes you part of the Military-Industrial Complex. And it's a big chunk of the Fortran 77 syntax I didn't even know existed, and hence have never used!
Eddie |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 450 Location: Manchester
|
Posted: Fri Oct 12, 2018 2:39 pm Post subject: |
|
|
They were certainly useful when making changes to the internals of DBOS - most of which was written in Fortran 77. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Fri Oct 12, 2018 5:16 pm Post subject: |
|
|
Ah! DBOS. That was when FTNxx was the speed demon, knocking just about everything else into the dust! Fond memories. |
|
Back to top |
|
|
|