Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Hints Towards Writing a Module with New Operators

by swampyankee (Parson)
on Dec 20, 2009 at 23:14 UTC ( #813654=note: print w/ replies, xml ) Need Help??


in reply to Re: Hints Towards Writing a Module with New Operators
in thread Hints Towards Writing a Module with New Operators

Considering .EQV. as == for booleans is more or less correct: a .eqv. b is true if a and b are either both true or both false, and it would result in false otherwise. Most modern Fortran compilers will squawk if either a or b isn't a boolean (Fortran logical), so a fragment like

logical boole integer int int = 42 boole = .TRUE. write(*,*) 'is int .eqv. boole true?', int .eqv. boole
will cause a compile-time error, which is, on the whole, probably a good thing. As I said in my original post, I've been programming Fortran for quite a few years and never found a use for .eqv. or .neqv.. As an aside, Fortran is insensitive to case; I tend to use uppercase for Fortran keywords and lowercase for everything else.


Information about American English usage here and here. Floating point issues? Please read this before posting. — emc


Comment on Re^2: Hints Towards Writing a Module with New Operators
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://813654]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2015-07-07 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (90 votes), past polls