<div dir="ltr"><div><div><div><div><div><div><div><div><span style="font-family:courier new,monospace">Hi There,<br><br></span></div><span style="font-family:courier new,monospace">If you declare this:<br><br></span></div>
<span style="font-family:courier new,monospace">procedure proc(param: array of const);<br><br></span></div><span style="font-family:courier new,monospace">Then you can pass any type of varaible to param, however, only in an array, such as proc([1, 2]);<br>
<br></span></div><span style="font-family:courier new,monospace">Is it possible to achieve the effect of the code below (which is wrong):<br><br></span></div><span style="font-family:courier new,monospace">procedure proc(p1: const; p2: const)</span>;<br>
<br></div><span style="font-family:courier new,monospace">So that: 1) p1 and p2 is translated by the compiler to TVarRec inside the function; 2) I do not need to pass an array to the function, in another word, the number of params for the procedure is *fixed*, but the *type* of each param is not.<br>
<br></span></div><span style="font-family:courier new,monospace">Regards,<br></span></div><span style="font-family:courier new,monospace">Xiangrong</span><br><div><div><br><br></div></div></div>