forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What is intrinsic function/subroutine RR ?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Wed Oct 10, 2018 2:29 pm    Post subject: What is intrinsic function/subroutine RR ? Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Oct 10, 2018 7:51 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Wed Oct 10, 2018 9:06 pm    Post subject: Reply with quote

Thanks. I cannot find mention of RR and RL in the FTN77 help file, either.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Oct 11, 2018 11:23 am    Post subject: Reply with quote

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
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Thu Oct 11, 2018 1:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 444
Location: Manchester

PostPosted: Fri Oct 12, 2018 10:35 am    Post subject: Reply with quote

"Military extensions"?
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Oct 12, 2018 10:49 am    Post subject: Reply with quote

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

Eddie
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 444
Location: Manchester

PostPosted: Fri Oct 12, 2018 10:55 am    Post subject: Reply with quote

That is half of the Fortran 77 syntax I use!
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Oct 12, 2018 2:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 444
Location: Manchester

PostPosted: Fri Oct 12, 2018 2:39 pm    Post subject: Reply with quote

They were certainly useful when making changes to the internals of DBOS - most of which was written in Fortran 77.
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Oct 12, 2018 5:16 pm    Post subject: Reply with quote

Ah! DBOS. That was when FTNxx was the speed demon, knocking just about everything else into the dust! Fond memories.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group