Graeme Geldenhuys schrieb: > Florian Klaempfl wrote: >>> I see many use-cases for out parameters >> You mean for VAROUT parameters :)? > > > I search the latest FP Language Reference document, and there is no > mention of 'varout'. I also tried to use varout in a procedure as > follows - which gave a compiler error with FPC 2.4.0-rc1
It is not implemented, but it would be the solution to the fillchar problem. > > procedure dcpFillChar(varout x; count: SizeInt; Value: Byte); overload; > > vs > > procedure dcpFillChar(out x; count: SizeInt; Value: Byte); overload; > > > First one is not compilable, but the second one is. So no, I don't > understand your comment about 'varout'? Please explain more. A VAROUT parameter could have the same semantics as VAR except that the compiler does not expect that it is needed that it is initialized. But be warned: with such a parameter type you can easily create memory leaks with automated types like ansistrings. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel