[fpc-pascal] Result: string

José Mejuto joshyfun at gmail.com
Wed Mar 6 13:59:30 CET 2013


El 06/03/2013 13:47, Jonas Maebe escribió:

>> 2.6.0, 2.6.2 and 2.7.1 trunk produces a warning with that code, but
>> with this one 2.6.0, and 2.7.1 trunk does not generate it (I do not
>> have 2.6.2 to test):
>
> That's because you are passing an uninitialized value to a
> var-parameter. That only generates a hint, because a lot of code uses
> var-parameters also for parameters that do not yet have to be
> initialized (because the code predates the existence of the "out"
> keyword, or simply out of habit).
>
> This is unrelated to string results specifically.

OK, I see now. I had changed the code to perform the same with integers 
and yes, it also does not report a warning only a hint which is enought 
to me.

I'm quite sure that the library that starts this thread does not show a 
hint, so maybe in some situations it could fail. I'll try to reproduce 
it in a small code (if there is a problem, of course), meanwhile 
everything seems to work as expected.

Thank you for your help.


-- 




More information about the fpc-pascal mailing list