Am 28.11.2011 um 01:05 schrieb Jonas Maebe:
>
> On 28 Nov 2011, at 00:49, Michael Müller wrote:
>
>> Beside that what is than the difference between 'out' and 'var'?
>
> If you enable hints, the compiler will print a hint if it detects you passing
> a potentially uninitialized variable to a "var" parameter, while it won't
> print such a warning if you pass it to an "out" parameter.
But inside the routine with "out" parameter I had expected to get the same
warning ;-). But this was before I learnt that at least something of an "out"
parameter reaches the routine.
Why is this 'passing a potentially uninitialized variable to a "var" parameter'
('bla does not seem to be initialized') message a warning for arrays and a hint
for basic types?
> Additionally, if you use the -gt command line option then the compiler will
> overwrite the contents of (non-reference-counted) out-parameters in the
> function entry code. This switch will do nothing for open array parameters
> though, because it lacks support for using the hidden "high" parameter to
> determine the bounds of the array at run time.
I don't understand this restriction. In the code High() works for open arrays
at run time.
Regards
Michael_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel