The C compiler isn't very good at consts, the typedef ConstTanBoard should be
used if it isn't changed.

Jon

On 09/06/2010 12:56, Thomas A. Moulton wrote:
> 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 
>> 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
>>> [email protected]
>>> http://lists.gnu.org/mailman/listinfo/bug-gnubg
>>>
>>>     
>>
>>
>>   
> 
> _______________________________________________
> Bug-gnubg mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/bug-gnubg
> 
> 



                                          
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
Do you have a story that started on Hotmail? Tell us now
_______________________________________________
Bug-gnubg mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnubg

Reply via email to