<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 04.09.2013 09:13, schrieb Xiangrong
Fang:<br>
</div>
<blockquote
cite="mid:CAP93jB1SO0d5eVL=oODA3aWSHXj-TLwvE-WxU=w6oPJ6vawiYQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>Thanks. This is sort-of too verbose when use. I have
no comments about how to define it, but when use it, can we
just use:<br>
<br>
</div>
ProcessArray(someintarray); ?<br>
</div>
</div>
</blockquote>
No. Generics are specialized with "<SomeType>", so not using
it for procedures/functions/methods as well is inconsistent.<br>
<blockquote
cite="mid:CAP93jB1SO0d5eVL=oODA3aWSHXj-TLwvE-WxU=w6oPJ6vawiYQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
<br>
</div>
<div>The complier should be able to "specialize" it implicitly
because it knows someintarray is array of integer?<br>
<br>
</div>
<div>alternatively, how about this:<br>
<br>
</div>
<div><span style="font-family:courier new,monospace">var<br>
</span></div>
<div><span style="font-family:courier new,monospace">
proc_ints: specialize ProcessArray<LongInt>;<br>
</span></div>
<div><span style="font-family:courier new,monospace">begin<br>
</span></div>
<div><span style="font-family:courier new,monospace">
proc_ints(someintarray);<br>
</span></div>
<div><span style="font-family:courier new,monospace">end;</span><br>
</div>
<div><br>
</div>
<div>use it without explicit specialize is best, however.<br>
</div>
</div>
</blockquote>
No. In non-Delphi modes specializations require "specialize". This
is for consistency of the language and also for simplification of
the parser in those modes.<br>
<br>
And just in case: The syntax is not up to debate.<br>
<br>
Regards,<br>
Sven<br>
</body>
</html>