Ignore:
Timestamp:
Nov 9, 2009, 8:34:09 AM (15 years ago)
Author:
george
Message:
  • Přidáno: Podpora pro proměnné.
Location:
branches/Void
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/Void

    • Property svn:ignore
      •  

        old new  
        55Example.void.bdsproj
        66project1.exe
         7*.dsk
  • branches/Void/project1.lpr

    r3 r5  
    1010
    1111type
     12
     13  { TApplication }
     14
    1215  TApplication = class(TCustomApplication)
    1316  protected
    1417    procedure DoRun; override;
     18    procedure CompilatorError(Text: string; var Terminate: Boolean);
    1519  public
    1620    Compilator: TCompilator;
     
    3438
    3539  Compilator := TCompilator.Create;
    36   Compilator.Compile('Example.void');
    37   Compilator.Destroy;
    38   //ReadLn;
     40  with Compilator do begin
     41    OnError := CompilatorError;
     42    Compile('Example.void');
     43    Destroy;
     44  end;
     45  ReadLn;
    3946
    4047  // stop program loop
    4148  Terminate;
     49end;
     50
     51procedure TApplication.CompilatorError(Text: string; var Terminate: Boolean);
     52begin
     53  Terminate := False;
     54  WriteLn('Error: ' + Text);
    4255end;
    4356
     
    4659  inherited Create(TheOwner);
    4760  StopOnException := True;
    48 end;
     61
     62  end;
    4963
    5064destructor TApplication.Destroy;
Note: See TracChangeset for help on using the changeset viewer.