[fpc-pascal] How to solve "variable does not seem to be initialized" compiler hint.

Flávio Etrusco flavio.etrusco at gmail.com
Wed Nov 18 14:19:40 CET 2009


On Tue, Nov 17, 2009 at 7:19 PM, JoshyFun <joshyfun at gmail.com> wrote:
> Hello FPC-Pascal,
>
> Tuesday, November 17, 2009, 8:47:03 PM, you wrote:
>
> c> Can the Fill... functions be changed to have the first parameter "out"
> c> instead of "var" ? Surely they don't use it as an input parameter.
>
> Write your own "fillchar" like function and inline it, something like:
>
> procedure MyFillChar(out x; count: SizeInt; Value: char); inline;
> begin
> {$PUSH}
> {$HINTS OFF}
>  FillChar(x,count,Value);
> {$POP}
> end;
>
> --
> Best regards,
>  JoshyFun

Shouldn't this code too raise a warning?

-Flávio



More information about the fpc-pascal mailing list