Re: const int value changing....
- From: "Mabden" <mabden@xxxxxxxxxxxxxx>
- Date: Mon, 29 Aug 2005 02:47:08 GMT
"Keith Thompson" <kst-u@xxxxxxx> wrote in message
news:lnll2t3rpj.fsf@xxxxxxxxxxxxxxxxxx
> "Mabden" <mabden@xxxxxxxxxxxxxx> writes:
> > "Keith Thompson" <kst-u@xxxxxxx> wrote in message
> > news:lnll2u71e6.fsf@xxxxxxxxxxxxxxxxxx
> >> "shyju_kambi" <n.shyju@xxxxxxxxx> writes:
> >> > when a 'const int ' is declared, where is it been created(in
RAM?)
> >> >
> >
> >> If you want to modify an object, don't declare it const. If you
> >> declare an object const, don't try to modify it.
> >>
> >
> > Nice, but for extra points, could you make it more Zen-like?
> >
> > I'm thinking something like:
> >
> > Solid meets fluid. Definition enhances knowledge.
>
> Let us know when you have something useful to add to the discussion.
>
Solid meets fluid: A constant (solid) should not be changed (fluid).
Definition enhances knowledge: The declaration (definition) of the
object lets one know (enhances knowledge) about how the object should be
used.
Since it was merely a restatement of your own words, I thought you of
all people could find it "useful to the discussion". And others, those
with a sense of humor or familiarity with other cultures, might be
slightly amused.
For more extra points, you could also try using Haiku:
Modify object
But not if it is constant
That would be so wrong
Let us know when you have taken your Midol.
--
Mabden
.
- References:
- const int value changing....
- From: shyju_kambi
- Re: const int value changing....
- From: Keith Thompson
- Re: const int value changing....
- From: Mabden
- Re: const int value changing....
- From: Keith Thompson
- const int value changing....
- Prev by Date: Re: while (1) vs. for ( ;; )
- Next by Date: Re: where the Turboc C c function?
- Previous by thread: Re: const int value changing....
- Next by thread: Re: const int value changing....
- Index(es):
Relevant Pages
|