On 1/7/17, Dmitry Boyarintsev <skalogryz.li...@gmail.com> wrote: >> But if you know that at forehand (and you know, since you cast it), >> why then use an untyped var parameter at all? >> > > http://www.freepascal.org/docs-html/rtl/system/fillchar.html ?
That does not realy answer my question. It was suggested to do something like this: procedure X(var Y); begin PInteger(Y)^ := 3; //syntax may be wrong, too lazy to test end; To me this completely defies the purpose of an untyped var parameter, since in this exmaple you do know, @design time, the type of Y, so why not write then procedure X(var Y: Integer); begin Y := 3; end; FillChar OTOH _is_ a good example of why you would use an untype var parameter. Bart _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal