<div dir="auto"><div><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Martin Frb via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> schrieb am Di., 25. Nov. 2025, 15:55:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>

  
    
  
  <div>
    <div>On 25/11/2025 14:19, Sven Barth via
      fpc-devel wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="auto">
        <div>
          <div class="gmail_quote"><br>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Yes, because in fact they don't have the same
          name. The name of a generic with a single parameter is
          essentially "TFoo<>" while that of a generic with two
          parameters is "TFoo<,>". </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">The amount of generic parameters is part of the
          type or routine name.</div>
        <br>
      </div>
    </blockquote>
    <br>
    Thanks, which just for confirmation brings up a follow up question.
    (I haven't used generic function much yet, so maybe I miss
    something)<br>
    <br>
    <font face="monospace">          function  Foo   (aParam: Integer):
      integer;<br>
        generic function  Foo<T>(aParam: t)      : integer;</font><br>
    <br>
    <br>
    Those are 2 different function too? (not an overload? because "T"
    could be integer in same cases)<br>
    <br>
    Do you then always have to call the generic using <br>
      specialize Foo<integer>(1)<br>
    ?<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Correct. It doesn't matter what the generic might be specialized to, the generic is definitely a separate routine from the non-generic one and not an overload. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div></div>