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

Re: Decimal Array range

by sundialsvc4 (Abbot)
on Dec 21, 2010 at 16:09 UTC ( #878295=note: print w/replies, xml ) Need Help??

in reply to Decimal Array range

When you have a reasonably-sized range of real-numbered values, it is actually cleanest to simply define a list (or an array) of the actual values you want to use.

If the values represent known multiples of some base value, you can use an integer range and, within that range, do the necessary calculation.   Or, you might use a while loop, initializing the variable outside the loop and adding to its value at the end of the loop.

There are many ways to do it.   Pick one that is both abundantly-clear and easily maintainable.   Remember, “requirements change,” and you will not be (nor will you want to be...) in your present job forever.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://878295]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2018-06-18 15:36 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (110 votes). Check out past polls.