Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: calculate distance between atoms and a target atom

by educated_foo (Vicar)
on Dec 02, 2013 at 22:34 UTC ( [id://1065334]=note: print w/replies, xml ) Need Help??


in reply to calculate distance between atoms and a target atom

Your code does something like
if (X) { $Znx = ...; } elsif (Y) { $Znx = ...; }
If neither X nor Y is true, $Znx does not get assigned a value, so it remains undefined. Perl treats that as zero, which may or may not be what you want.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2024-04-18 07:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found