<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Ross,<br>
      <br>
      On 12/05/13 02:38, Ross Levis wrote:<br>
    </div>
    <blockquote cite="mid:000f01ce4e55$3ed02c60$bc708520$@com"
      type="cite">
      <meta http-equiv="Context-Type" content="text/html;
        charset=us-ascii">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <div class="WordSection1">
        <p class="MsoNormal"><span>var</span></p>
        <p class="MsoNormal"><span>  a: pChar;</span></p>
        <p class="MsoNormal"><span>  b: pChar;</span></p>
        <p class="MsoNormal"><span>begin</span></p>
        <p class="MsoNormal"><span>  a := 'abcdefghi';</span></p>
        <p class="MsoNormal"><span>  b := 'jklmnopqr';</span></p>
        <p class="MsoNormal"><span>  StrCopy(a,b);</span></p>
        <p class="MsoNormal"><span>end;</span></p>
        <p class="MsoNormal"><span> </span></p>
        <p class="MsoNormal"><span>Question:  Why does this code crash?</span></p>
      </div>
    </blockquote>
    <br>
    A PChar is a pointer. You need to allocate memory to hold the data.<br>
    <br>
    cheers,<br>
    Jan<br>
    <br>
  </body>
</html>