bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] FormatMoves


From: Thomas A. Moulton
Subject: Re: [Bug-gnubg] FormatMoves
Date: Wed, 09 Jun 2010 07:56:13 -0400
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

I'll dig deeper.

I hate needless warnings...

Maybe I am a purist, but I like things better when they compile without warnings

Tom -Wall --strict

Christian Anthon wrote:
const in C is an aid to help the programmer to keep track of data that
shouldn't be modified by a function. If you can add a const without
the compiler complaining, fine, if you can't don't, unless you are
ready to track down exactly where the data may and may not be
modified. The compiled program won't change, regardless of the const.

Christian.

On Tue, Jun 8, 2010 at 12:37 PM, Thomas A. Moulton <address@hidden> wrote:
Code question

extern char *FormatMove( char *pch, const TanBoard anBoard, int anMove[ 8 ]
);
extern char *FormatMovePlain( char *pch, TanBoard anBoard, int anMove[ 8 ]
);

They appear to be interchangable.

should they both have "const TanBoard anBoard" ?
(or neither?)

tom


_______________________________________________
Bug-gnubg mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-gnubg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]