<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 11/02/2014 03:54 PM, Xiangrong Fang
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAP93jB31qPOWk6wg0bgSAukLStzQ8JTzL+mM4Q7HGY6wgNg3DQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_default" style="font-family:'courier
          new',monospace">Hi All,</div>
        <div class="gmail_default" style="font-family:'courier
          new',monospace"><br>
        </div>
        ...
        <div class="gmail_default" style="font-family:'courier
          new',monospace">
          <div class="gmail_default">
            <div class="gmail_default"><br>
            </div>
            <div class="gmail_default">Also, I usually use pointer to
              pass block of memory to functions.  How do I implement a
              function with the following signature:</div>
            <div class="gmail_default"><br>
            </div>
            <div class="gmail_default">procedure MyProc(var Buf; Len:
              Integer):</div>
            <div class="gmail_default"><br>
            </div>
            <div class="gmail_default">I mean, how to handle "var Buf"
              inside the procedure body?</div>
          </div>
        </div>
      </div>
    </blockquote>
    You can take the address of the Buf variable by using @Buf. For
    example:<br>
    <br>
    procedure MyProc(var Buf; Len: Integer);<br>
    var<br>
      I: Integer;<br>
      P: PByte;<br>
    begin<br>
      P := @Buf;<br>
      for I := 0 to Len - 1 do<br>
        (P+I)^ := 0;<br>
    end;<br>
    <br>
    Nikolay<br>
  </body>
</html>