<p>Am 08.01.2017 04:43 schrieb "Dmitry Boyarintsev" <<a href="mailto:skalogryz.lists@gmail.com">skalogryz.lists@gmail.com</a>>:<br>
><br>
> On Sat, Jan 7, 2017 at 6:02 PM, Lars <<a href="mailto:noreply@z505.com">noreply@z505.com</a>> wrote:<br>
>><br>
>> Some brave soldiers once tried to reinvent generics using these tricks..<br>
><br>
><br>
> Well, Pascal run-time has been using "hidden" generics forever.<br>
><br>
> As an example:<br>
> <a href="http://www.freepascal.org/docs-html/rtl/system/val.html">http://www.freepascal.org/docs-html/rtl/system/val.html</a><br>
><br>
> Val() declares the second parameter as untyped var parameter.<br>
> Unfortunately, it's not quite so. Compiler recognizes  the run-time function and requires the parameter to be either an Integer or Float-point type (or an enumerated type since 2.3.1).<br>
><br>
> So it's more a generic-like behavior (with integer and float types specialized)</p>
<p>Val() is a compiler intrinsic so there doesn't exist a declaration for it anyway, so it's quite a bit outside of the scope of var parameters.</p>
<p>Regards,<br>
Sven</p>