Initializing String Class Member at Creation

bor...@ix.netcom.com (David and Ann Borger ) wrote:

Quote
>I'm trying to construct what I thought was a very simple class but am
>getting a GP Fault at run time.  The class (still under development)
>looks like:
>interface
>type
>  TSupervisor = class
>  private
>    location : String;
>  public
>    constructor Create(path : String);
>    destructor Destroy;
>end;
>implementation
>constructor TSupervisor.Create(path : String);
>begin
>  location:=path;  {****Fault here****}
>end;
>..
>end.
>In my main program I have
>..
>var
>  ms : TSupervisor;
>begin
>  ms.Create('c:\test');

use:
   ms := TSupervisor.Create('c:\test');

Quote
>..
>end;

--Keith
"Computer: (n) A device designed to speed and automate errors."