soccer jersey forums.silverfrost.com :: View topic - Spockian illogicality
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 

Spockian illogicality

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



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

PostPosted: Fri Jun 16, 2023 4:06 pm    Post subject: Spockian illogicality Reply with quote

Here's a little demonstrator:
Code:

      PROGRAM TEST
      LOGICAL LABSON, LEGON
      LABSON = .TRUE.
      LEGON  = .TRUE.
      write(*,*) LABSON, LEGON
      write(*,*) LABSON .AND. LEGON
      END


As might be expected, the output is T T on one line, and T on the next.

But, in my 4000+ line program that I wrote over 30 years ago, two consecutive write statements give me T T and then F, with the F thereby failing an IF statement on the next line.

Now, I cannot recall what on earth possessed me to use LOGICAL variables in the first place, as I almost never do (and swear that I'll never do again). Instead I think I'll go back to testing for 0 and 1 in an INTEGER.

Just 32 bit mode, and doesn't need a fix, as I'll never use LOGICAL ever again!

Dan's devilry no doubt.

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



Joined: 13 Oct 2014
Posts: 1225
Location: Morrison, CO, USA

PostPosted: Fri Jun 16, 2023 11:30 pm    Post subject: Reply with quote

I have had irreproducible issues when logicals were in COMMON and EQUIVALENCED. Especially if the logicals defaulted to LOGICAL*2 in one context and LOGICAL*4 in another context.

It was long ago, and the fix escapes me.

I wish I had documented my situation and posted it here.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Sat Jun 17, 2023 6:28 am    Post subject: Reply with quote

Eddie

Thanks for the feedback. Some issues can be difficult to track down.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



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

PostPosted: Sun Jun 18, 2023 5:21 pm    Post subject: Reply with quote

Aye, and especially difficult as it works in one place, and not in another!
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