Silverfrost Forums

Welcome to our forums

What is intrinsic function/subroutine RR ?

10 Oct 2018 1:29 #22642

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:

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:

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]
10 Oct 2018 6:51 #22644

RR (right rotate) and LR (left rotate) are FTN77 intrinsics that provide a bitwise circular shift like ISHFTC.

integer i,j
i = 1
j = RR(i, 1)
print*, j
10 Oct 2018 8:06 #22645

Thanks. I cannot find mention of RR and RL in the FTN77 help file, either.

11 Oct 2018 10:23 #22648

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

11 Oct 2018 12:05 #22650

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.

12 Oct 2018 9:35 #22652

'Military extensions'?

12 Oct 2018 9:49 #22653

Possibly MIL-STD-1753, see here: http://www.fortran.com/mil_std_1753.html

Eddie

12 Oct 2018 9:55 #22654

That is half of the Fortran 77 syntax I use!

12 Oct 2018 1:17 #22655

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

12 Oct 2018 1:39 #22656

They were certainly useful when making changes to the internals of DBOS - most of which was written in Fortran 77.

12 Oct 2018 4:16 #22659

Ah! DBOS. That was when FTNxx was the speed demon, knocking just about everything else into the dust! Fond memories.

Please login to reply.