bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] FormatMoves


From: Christian Anthon
Subject: Re: [Bug-gnubg] FormatMoves
Date: Wed, 9 Jun 2010 11:38:43 +0200

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]