Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: The Definitive Unit Conversion Script

by Aristotle (Chancellor)
on Dec 13, 2002 at 21:06 UTC ( #219751=note: print w/ replies, xml ) Need Help??


in reply to Re: Re^2: The Definitive Unit Conversion Script
in thread The Definitive Unit Conversion Script

Well, I'm definitely not going to go forward with the interface you described. :) That's entirely different from what I'm trying to achieve. Although I guess a ::Subs add-on module could handle that well enough. I don't see the point in a UK_2_METRIC routine if you still have to specify the units though.

Makeshifts last the longest.


Comment on Re^4: The Definitive Unit Conversion Script
Re: Re^4: The Definitive Unit Conversion Script
by BrowserUk (Pope) on Dec 13, 2002 at 21:11 UTC

    You don't have to specify the units on input. If you supply a number (or array of numbers), then they just get converted to numbers.

    The idea was that of you were reading stuff from another source with the units specified, then the direction of the conversion would be determined for you. Just a thought.

    Also, if you don't specify the units at declaration time, units are not even looked for. If they are supplied at runtime, its just results in a runtime "non-numeric" error. I'll look at your code now ;^).


    Examine what is said, not who speaks.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2014-08-31 04:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls