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 

Bitwise xor

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



Joined: 25 Feb 2016
Posts: 78

PostPosted: Sun Sep 01, 2019 11:18 am    Post subject: Bitwise xor Reply with quote

I'm looking to xor two integers together in Fortran, is there a function in FTN95 to do this?
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2141
Location: Sydney

PostPosted: Sun Sep 01, 2019 11:53 am    Post subject: Reply with quote

IEOR (i,j)
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Sun Sep 01, 2019 12:18 pm    Post subject: Reply with quote

There's a whole slew of such functions introduced in Fortran 90 and referenced in FTN95.chm. In addition, FTN77 had a few functions for setting and reading individual bits - see the FTN77 Library Reference Manual in the support section of the website.

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



Joined: 25 Feb 2016
Posts: 78

PostPosted: Sun Sep 01, 2019 7:04 pm    Post subject: Reply with quote

Thanks both, I did check the docs by searching for XOR couldn't find it.
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Sun Sep 01, 2019 8:29 pm    Post subject: Reply with quote

Ryan,

I couldn't find it either, as FTN95.CHM doesn't have the sort of language guide that you used to get with printed documentation. I found a whole lot of information on bit operations here:

https://rosettacode.org/wiki/Bitwise_operations#Fortran

which gives the Fortran 90 routines as well as IEOR for all the related operations.

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sun Sep 01, 2019 9:40 pm    Post subject: Reply with quote

https://www.silverfrost.com/ftn95-help/intrin/bitwise_operations.aspx
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1226
Location: Aerospace Valley

PostPosted: Fri Sep 13, 2019 7:47 pm    Post subject: Reply with quote

I've had this problem before when trying to follow posts including reference to 'XOR' and being unableto find it by searching the online documentation.

Any raw newbie would be flumoxed (a word not nearly enough used in this modern world - too many letters to be easily texted I guess !) ... anyway, they'd be flumoxed on this post because Paul's posted link makes no reference to XOR !

Because ... it's equivalent in ftn95 appears to be IEOR!!!

... and if you can't find it that doesn't mean your a donkey Smile or does it Wink

I Claudius ? IEOR ? Smile


What's the point of IEOR (XOR) anyway, what practical applications does it have / is it used for ?

There doesn't seem to be (that I can find anyway) much documentation anywhere about it's useful uses, not just in the ftn95 documentation.

After all, the best way to get people to use new features is to 'sell' them (them being Joe Blogs's) via expounding their PRACTICAL uses.
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
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 -> General 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