Re: Larkin, Power BASIC cannot be THAT good:
- From: AZ Nomad <aznomad.3@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 11 Jun 2009 14:08:35 -0500
On Thu, 11 Jun 2009 11:18:43 -0700 (PDT), Michael <mrdarrett@xxxxxxxxx> wrote:
On Jun 11, 10:48?am, Rich Grise <richgr...@xxxxxxxxxxx> wrote:
On Thu, 11 Jun 2009 08:56:10 -0700, Michael wrote:
On Jun 10, 8:07?pm, AZ Nomad <aznoma...@xxxxxxxxxxxxxxxxxxx> wrote:
I also never use constants like 25480. ?24*60*60 is far more readable
and less prone to error. ?It doesn't take a pico second more to
execute as the calculation is done at compile time, not run time.
Even with an interpreted language, it is only parsed once; ?if the
language system isn't shit, the calculated value will be saved in the
saved tokenized code.
Funny. ?I would use the 25480, and put the 24*60*60 in a comment.
Then again, I don't need to write high-performance code.
I hope not! I define the constant, then use the label. That way,
if it changes, you don't have to track down every instance to
change the hard numbers.
Cheers!
Rich
Like in a #define?
Funny thing is, 24x60x60 = 86,400, actually...
Not likely that 60 seconds in a minute, or 60 minutes in an hour,
would change... unless... the client moves from a 24-hour-workday to,
say, an 8-hour work day?
No, the point is to remove an opportunity for programmer error.
Let the compiler do the math.
.
- References:
- Re: Larkin, Power BASIC cannot be THAT good:
- From: AZ Nomad
- Re: Larkin, Power BASIC cannot be THAT good:
- From: AZ Nomad
- Re: Larkin, Power BASIC cannot be THAT good:
- From: John Larkin
- Re: Larkin, Power BASIC cannot be THAT good:
- From: John Larkin
- Re: Larkin, Power BASIC cannot be THAT good:
- From: Martin Brown
- Re: Larkin, Power BASIC cannot be THAT good:
- From: John Larkin
- Re: Larkin, Power BASIC cannot be THAT good:
- From: Martin Brown
- Re: Larkin, Power BASIC cannot be THAT good:
- From: Phil Hobbs
- Re: Larkin, Power BASIC cannot be THAT good:
- From: krw
- Re: Larkin, Power BASIC cannot be THAT good:
- From: Phil Hobbs
- Re: Larkin, Power BASIC cannot be THAT good:
- From: Joel Koltner
- Re: Larkin, Power BASIC cannot be THAT good:
- From: AZ Nomad
- Re: Larkin, Power BASIC cannot be THAT good:
- From: Joel Koltner
- Re: Larkin, Power BASIC cannot be THAT good:
- From: AZ Nomad
- Re: Larkin, Power BASIC cannot be THAT good:
- From: Michael
- Re: Larkin, Power BASIC cannot be THAT good:
- From: Rich Grise
- Re: Larkin, Power BASIC cannot be THAT good:
- From: Michael
- Re: Larkin, Power BASIC cannot be THAT good:
- Prev by Date: Re: Battery
- Next by Date: Re: Overview Of New Intel Core i7(Nehalem) Processor
- Previous by thread: Re: Larkin, Power BASIC cannot be THAT good:
- Next by thread: Re: Larkin, Power BASIC cannot be THAT good:
- Index(es):
Relevant Pages
|