Ignore:
Timestamp:
Apr 9, 2009, 11:04:41 AM (16 years ago)
Author:
george
Message:
  • Opraveno: Chyby v uvolňování paměti.
  • Opraveno: Program po rozdělení do více souborů opět funguje jako dříve.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DelphiToC/UMainForm.pas

    r12 r14  
    55uses
    66  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    7   Dialogs, StdCtrls, UPascalSource;
     7  Dialogs, StdCtrls, UPascalSource, UPascalCompiler, UAssemblerSource;
    88
    99type
     
    3838  I: Integer;
    3939begin
    40   Compiler.Compile(Memo1.Lines);
     40  MainForm.Memo3.Clear;
     41  Compiler.SourceCode.Assign(Memo1.Lines);
     42  Compiler.Compile;
    4143  Memo2.Clear;
    42   for I := 0 to Compiler.AssemblyCode.Count - 1 do
    43     Memo2.Lines.Add(TAssemblerLine(Compiler.AssemblyCode[I]).AsString);
     44  with TAssemblerProducer(Compiler.Producer) do
     45  for I := 0 to AssemblyCode.Count - 1 do
     46    Memo2.Lines.Add(TAssemblerLine(AssemblyCode[I]).AsString);
    4447end;
    4548
     
    6669
    6770procedure TMainForm.FormShow(Sender: TObject);
    68 var
    69   I: Integer;
    7071begin
    7172  Memo1.Lines.LoadFromFile('Example.pas');
    72   MainForm.Memo3.Clear;
    73   Compiler.Compile(Memo1.Lines);
    74   Memo2.Clear;
    75   for I := 0 to Compiler.AssemblyCode.Count - 1 do
    76     Memo2.Lines.Add(TAssemblerLine(Compiler.AssemblyCode[I]).AsString);
     73  Button1Click(Self);
    7774end;
    7875
Note: See TracChangeset for help on using the changeset viewer.