[Lazarus] Astronomy App

Terry A. Haimann terry at HaimannOnline.com
Sun Sep 13 18:53:52 CEST 2009


Florian Klaempfl wrote:
> Paul Ishenin schrieb:
>   
>> {$WARN identifier ON} / {$WARN identifier OFF} where identifier can be:
>> SYMBOL_PLATFORM, SYMBOL_DEPRECATED, UNIT_DEPRECATED, UNIT_PLATFORM,
>> UNSAFE_CODE OFF, UNSAFE_TYPE OFF, UNSAFE_CAST OFF, IMPLICIT_STRING_CAST,
>> ...
>>
>> I suggest to allow also ON/OFF by warning message ID. For example
>> {$WARN 5033 OFF} will turn off message "Function result does not seem to
>> be set".
>>
>> Same to do with hints {$HINT message_id ON}/{$HINT message_id OFF}
>> although delphi does not support this.
>>
>> Why it is easy:
>> 1. fpc understand {$WARN} syntax while it currently do nothing
>> 2. fpc allow to turn off warnings and messages by ID
>>     
>
> Why it's not easy (else it would have been implemented):
> - it requires a memory efficient tracking of the state of these switches
> for every location in the source. Due to the modularized and decoupled
> compilation process of FPC this is not as simple as it might look.
>   
Well, fpc already track {$WARNINGS OFF}/{$WARNINGS ON}, {$HINTS 
OFF}/{$HINTS ON} switches for every location in the source. I suppose 
tracking paticular warning/hint can be done in a similar way.

Best regards,
Paul Ishenin.




More information about the Lazarus mailing list