[Lazarus] Request for student project ideas
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Sun Sep 13 10:31:28 CEST 2009
Paul Ishenin schrieb:
> One thing to implement which is needed and easy at the same time is
> support for turning paticular warnings and hints on/off in the code:
>
> {$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
>
> Therefore your student will just need to complete already existed code.
Why not replace all the compiler directives, which are unknown to the
Delphi compiler, by a common different format, like {#PRAGMA WARN...},
and implement a general Pragma subsystem, where the FPC people could add
the functionality later, if this part is too time consuming for a
student project?
DoDi
More information about the Lazarus
mailing list