PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

convert logical to integer

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
chamna



Joined: 05 Jun 2011
Posts: 3

PostPosted: Mon Aug 22, 2011 3:26 pm    Post subject: convert logical to integer Reply with quote

Consider the following example,

integer:: b(2,2),c(2,2)
data b /1,2,3,4/
c = 1*(b==1)+3*(b==3)

For intel fortran, with "fpscomp:logicals" command, it worked.
However, this doesn't work with pgi-fortran. Any suggestions?

Thanks
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6734
Location: The Portland Group Inc.

PostPosted: Tue Aug 23, 2011 9:52 am    Post subject: Reply with quote

Hi Chamna,

PGI's equivalent flag would be "-Munixlogical".

- Mat
Back to top
View user's profile
chamna



Joined: 05 Jun 2011
Posts: 3

PostPosted: Wed Aug 24, 2011 2:21 pm    Post subject: Reply with quote

Thanks a lot!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
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 © phpBB Group