Changeset 5 for branches/Void/project1.lpr
- Timestamp:
- Nov 9, 2009, 8:34:09 AM (15 years ago)
- Location:
- branches/Void
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Void
- Property svn:ignore
-
old new 5 5 Example.void.bdsproj 6 6 project1.exe 7 *.dsk
-
- Property svn:ignore
-
branches/Void/project1.lpr
r3 r5 10 10 11 11 type 12 13 { TApplication } 14 12 15 TApplication = class(TCustomApplication) 13 16 protected 14 17 procedure DoRun; override; 18 procedure CompilatorError(Text: string; var Terminate: Boolean); 15 19 public 16 20 Compilator: TCompilator; … … 34 38 35 39 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; 39 46 40 47 // stop program loop 41 48 Terminate; 49 end; 50 51 procedure TApplication.CompilatorError(Text: string; var Terminate: Boolean); 52 begin 53 Terminate := False; 54 WriteLn('Error: ' + Text); 42 55 end; 43 56 … … 46 59 inherited Create(TheOwner); 47 60 StopOnException := True; 48 end; 61 62 end; 49 63 50 64 destructor TApplication.Destroy;
Note:
See TracChangeset
for help on using the changeset viewer.