Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Decimal Array range

by sundialsvc4 (Abbot)
on Dec 21, 2010 at 16:09 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-03-19 11:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found