Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^8: How to write testable command line script?

by thechartist (Monk)
on Nov 26, 2018 at 16:57 UTC ( #1226367=note: print w/replies, xml ) Need Help??


in reply to Re^7: How to write testable command line script? (updated)
in thread How to write testable command line script?

So far, the reduce sub is consistent with all of the examples in his text. User input would accept negative in the minute and second fields (unlike some other calculators), it just won't provide output with negatives in those fields, which are appropriately carried to the next highest term, as is done in this calculator http://www.mathopenref.com/dmscalculator.html

  • Comment on Re^8: How to write testable command line script?

Replies are listed 'Best First'.
Re^9: How to write testable command line script?
by AnomalousMonk (Bishop) on Nov 26, 2018 at 17:54 UTC

    But with the http://www.mathopenref.com/dmscalculator.html calculator, if I enter 0° 0' 59" and then add -0° 1' 0", I get -0° 0' 1". Surely the only way that can happen is if -0° 1' 0" represents a negative angle of 0° 1' 0", i.e., an angle of -1'. (Understandably, the calculator won't let you enter angles like 0° -1' 0" or 0° 0' 60".)


    Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2020-10-28 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (259 votes). Check out past polls.

    Notices?