Changeset 18 for trunk


Ignore:
Timestamp:
Feb 11, 2012, 9:32:25 PM (12 years ago)
Author:
chronos
Message:
  • Modified: Optimalized execution of BrainFuck commands using array of methods instead of case statement. This can scale better for future additional commands.
  • Added: Interpretter form show speed in steps per second.
Location:
trunk
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Languages/LazFuckIDE.cs.po

    r16 r18  
    1111
    1212#: tinterpreterform.caption
    13 #, fuzzy
    1413#| msgid "Runtime"
    1514msgctxt "tinterpreterform.caption"
    1615msgid "Interpretter"
    17 msgstr "Běh"
     16msgstr "Interpreter"
    1817
    1918#: tinterpreterform.label1.caption
     
    4140msgstr "Paměť"
    4241
     42#: tinterpreterform.label7.caption
     43msgid "Speed:"
     44msgstr "Rychlost:"
     45
    4346#: tinterpreterform.labelmemorypointer.caption
    4447msgctxt "tinterpreterform.labelmemorypointer.caption"
    4548msgid "   "
    46 msgstr ""
     49msgstr "   "
    4750
    4851#: tinterpreterform.labelprogrampointer.caption
    4952msgctxt "tinterpreterform.labelprogrampointer.caption"
    5053msgid "   "
    51 msgstr ""
     54msgstr "   "
    5255
    5356#: tinterpreterform.labelstepcounter.caption
    5457msgctxt "tinterpreterform.labelstepcounter.caption"
    5558msgid "   "
    56 msgstr ""
     59msgstr "   "
     60
     61#: tinterpreterform.labelstepspeed.caption
     62msgctxt "tinterpreterform.labelstepspeed.caption"
     63msgid "   "
     64msgstr "   "
    5765
    5866#: tinterpreterform.listviewmemory.columns[0].caption
     
    6472msgstr "Data"
    6573
    66 #: tinterpreterform.toolbar1.caption
    67 msgid "ToolBar1"
    68 msgstr ""
    69 
    7074#: tmainform.aabout.caption
    7175msgid "About"
     
    7478#: tmainform.abreakpointtoggle.caption
    7579msgid "Toggle breakpoint"
    76 msgstr ""
     80msgstr "Přepnout bod zastavení"
    7781
    7882#: tmainform.acompile.caption
     
    8690#: tmainform.aformatsource.caption
    8791msgid "Format source"
    88 msgstr ""
     92msgstr "Formátovat zdroj"
    8993
    9094#: tmainform.ahelp.caption
     
    183187#: tmainform.menuitem24.caption
    184188msgid "Tools"
    185 msgstr ""
     189msgstr "Nástroje"
    186190
    187191#: tmainform.menuitem40.caption
     
    251255msgstr "Chyba čtení vstupu"
    252256
     257#: uinterpreterform.sstepspersecond
     258msgid " steps/s"
     259msgstr " kroků/s"
     260
  • trunk/Languages/LazFuckIDE.po

    r16 r18  
    3131msgstr ""
    3232
     33#: tinterpreterform.label7.caption
     34msgid "Speed:"
     35msgstr ""
     36
    3337#: tinterpreterform.labelmemorypointer.caption
    3438msgctxt "TINTERPRETERFORM.LABELMEMORYPOINTER.CAPTION"
     
    4650msgstr ""
    4751
     52#: tinterpreterform.labelstepspeed.caption
     53msgctxt "TINTERPRETERFORM.LABELSTEPSPEED.CAPTION"
     54msgid "   "
     55msgstr ""
     56
    4857#: tinterpreterform.listviewmemory.columns[0].caption
    4958msgid "Address"
     
    5261#: tinterpreterform.listviewmemory.columns[1].caption
    5362msgid "Data"
    54 msgstr ""
    55 
    56 #: tinterpreterform.toolbar1.caption
    57 msgid "ToolBar1"
    5863msgstr ""
    5964
     
    241246msgstr ""
    242247
     248#: uinterpreterform.sstepspersecond
     249msgid " steps/s"
     250msgstr ""
     251
  • trunk/LazFuckIDE.lpi

    r15 r18  
    1919      <StringTable ProductVersion=""/>
    2020    </VersionInfo>
    21     <BuildModes Count="1">
    22       <Item1 Name="Default" Default="True"/>
     21    <BuildModes Count="2">
     22      <Item1 Name="Debug" Default="True"/>
     23      <Item2 Name="Release">
     24        <CompilerOptions>
     25          <Version Value="11"/>
     26          <PathDelim Value="\"/>
     27          <Target>
     28            <Filename Value="LazFuckIDE"/>
     29          </Target>
     30          <SearchPaths>
     31            <IncludeFiles Value="$(ProjOutDir)"/>
     32            <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
     33          </SearchPaths>
     34          <CodeGeneration>
     35            <SmartLinkUnit Value="True"/>
     36            <Optimizations>
     37              <OptimizationLevel Value="3"/>
     38            </Optimizations>
     39          </CodeGeneration>
     40          <Linking>
     41            <Debugging>
     42              <GenerateDebugInfo Value="False"/>
     43            </Debugging>
     44            <Options>
     45              <Win32>
     46                <GraphicApplication Value="True"/>
     47              </Win32>
     48            </Options>
     49          </Linking>
     50          <Other>
     51            <CompilerMessages>
     52              <MsgFileName Value=""/>
     53            </CompilerMessages>
     54            <CompilerPath Value="$(CompPath)"/>
     55          </Other>
     56        </CompilerOptions>
     57      </Item2>
    2358    </BuildModes>
    2459    <PublishOptions>
     
    113148        <StackChecks Value="True"/>
    114149      </Checks>
     150      <VerifyObjMethodCallValidity Value="True"/>
    115151    </CodeGeneration>
    116152    <Linking>
  • trunk/UBrainFuck.pas

    r17 r18  
    3939  end;
    4040
     41  TBrainFuckCommand = (cmNone, cmInc, cmDec, cmPointerInc, cmPointerDec,
     42    cmOutput, cmInput, cmLoopStart, cmLoopEnd);
     43
     44  TCommandHandler = procedure of object;
     45
    4146  { TBrainFuckInterpretter }
    4247
     
    4954    FThread: TBrainFuckInterpretterThread;
    5055    FStepCount: Integer;
     56    FCommandTable: array[TBrainFuckCommand] of TCommandHandler;
    5157    function GetMemorySize: Integer;
    52     function GetSource: string;
    5358    procedure SetMemorySize(AValue: Integer);
    5459    procedure SetSource(AValue: string);
    5560    procedure SetState(AValue: TRunState);
    56     procedure Write(Value: Byte);
    57     function Read: Byte;
    5861    procedure SetThread(State: Boolean);
    5962    procedure PrepareJumpTable;
    60     procedure RemoveBlankCharacters;
     63    procedure CommandInc;
     64    procedure CommandDec;
     65    procedure CommandPointerInc;
     66    procedure CommandPointerDec;
     67    procedure CommandInput;
     68    procedure CommandOutput;
     69    procedure CommandLoopStart;
     70    procedure CommandLoopEnd;
    6171  public
    62     FSource: array of Char;
     72    FSource: array of TBrainFuckCommand;
    6373    SourceJump: array of Integer;
    6474    SourcePosition: Integer;
     
    8090    property OnChangeState: TNotifyEvent read FOnChangeState write FOnChangeState;
    8191    property StepCount: Integer read FStepCount;
    82     property Source: string read GetSource write SetSource;
     92    property Source: string write SetSource;
    8393    property MemorySize: Integer read GetMemorySize write SetMemorySize;
    8494    property CellSize: Integer read FCellSize write FCellSize;
     
    113123{ TBrainFuckInterpretter }
    114124
    115 procedure TBrainFuckInterpretter.Write(Value: Byte);
    116 begin
    117   if OutputPosition > Length(Output) then
    118     SetLength(Output, Length(Output) + 1 + Length(Output) div 4);
    119   Output[OutputPosition] := Char(Value);
    120   Inc(OutputPosition);
    121 end;
    122 
    123125procedure TBrainFuckInterpretter.SetState(AValue: TRunState);
    124126begin
     
    128130end;
    129131
    130 function TBrainFuckInterpretter.GetSource: string;
    131 var
    132   I: Integer;
    133 begin
    134   SetLength(Result, Length(FSource));
    135   //Move(Pointer(Result)^, Pointer(FSource)^, Length(Result));
    136   for I := 0 to Length(FSource) - 1 do
    137     Result[I + 1] := FSource[I];
    138 end;
    139 
    140132function TBrainFuckInterpretter.GetMemorySize: Integer;
    141133begin
     
    151143var
    152144  I: Integer;
     145  Pos: Integer;
    153146begin
    154147  SetLength(FSource, Length(AValue));
    155   //Move(Pointer(AValue)^, Pointer(FSource)^, Length(AValue));
    156   for I := 0 to Length(FSource) - 1 do
    157     FSource[I] := AValue[I + 1];
    158 end;
    159 
    160 function TBrainFuckInterpretter.Read: Byte;
    161 begin
    162   while (InputPosition > Length(Input)) and (FState <> rsStopped) do begin
    163     Sleep(1);
    164   end;
    165   if InputPosition <= Length(Input) then begin
    166     Result := Ord(Input[InputPosition]);
    167     Inc(InputPosition);
    168   end else Result := 0;
     148  Pos := 0;
     149  for I := 1 to Length(AValue) do begin
     150    case AValue[I] of
     151      '+': FSource[Pos] := cmInc;
     152      '-': FSource[Pos] := cmDec;
     153      '>': FSource[Pos] := cmPointerInc;
     154      '<': FSource[Pos] := cmPointerDec;
     155      ',': FSource[Pos] := cmInput;
     156      '.': FSource[Pos] := cmOutput;
     157      '[': FSource[Pos] := cmLoopStart;
     158      ']': FSource[Pos] := cmLoopEnd;
     159      else Dec(Pos);
     160    end;
     161    Inc(Pos);
     162  end;
     163  SetLength(FSource, Pos);
    169164end;
    170165
     
    186181var
    187182  Loop: array of Integer;
    188   LoopCurrent: Integer;
    189183  I: Integer;
    190184begin
     
    196190  for I := 0 to Length(FSource) - 1 do begin
    197191    case FSource[I] of
    198       '[': begin
     192      cmLoopStart: begin
    199193        SetLength(Loop, Length(Loop) + 1);
    200194        Loop[High(Loop)] := I;
    201195      end;
    202       ']': begin
     196      cmLoopEnd: begin
    203197        if SourceJump[I] > 0 then raise Exception.Create(SJumpTableColision);
    204198        SourceJump[I] := Loop[High(Loop)];
     
    212206end;
    213207
    214 procedure TBrainFuckInterpretter.RemoveBlankCharacters;
    215 var
    216   I: Integer;
    217   LastChar: Integer;
    218 begin
    219   LastChar := 0;
    220   for I := 0 to Length(FSource) - 1 do
    221     if FSource[I] in ['+','-','>','<','.',',','[',']'] then begin
    222       FSource[LastChar] := FSource[I];
    223       Inc(LastChar);
    224     end;
    225   SetLength(FSource, LastChar);
     208procedure TBrainFuckInterpretter.CommandInc;
     209begin
     210  Memory[MemoryPosition] := ((Memory[MemoryPosition] + 1) mod CellSize);
     211end;
     212
     213procedure TBrainFuckInterpretter.CommandDec;
     214begin
     215  Memory[MemoryPosition] := ((Memory[MemoryPosition] - 1) mod CellSize);
     216end;
     217
     218procedure TBrainFuckInterpretter.CommandPointerInc;
     219begin
     220  if MemoryPosition < MemorySize then Inc(MemoryPosition)
     221    else raise Exception.Create(SProgramUpperLimit);
     222end;
     223
     224procedure TBrainFuckInterpretter.CommandPointerDec;
     225begin
     226  if MemoryPosition > 0 then Dec(MemoryPosition)
     227    else raise Exception.Create(SProgramLowerLimit);
     228end;
     229
     230procedure TBrainFuckInterpretter.CommandInput;
     231begin
     232  while (InputPosition > Length(Input)) and (FState <> rsStopped) do begin
     233    Sleep(1);
     234  end;
     235  if InputPosition <= Length(Input) then begin
     236    Memory[MemoryPosition] := Ord(Input[InputPosition]);
     237    Inc(InputPosition);
     238  end;
     239end;
     240
     241procedure TBrainFuckInterpretter.CommandOutput;
     242begin
     243  if OutputPosition > Length(Output) then
     244    SetLength(Output, Length(Output) + 1 + Length(Output) div 4);
     245  Output[OutputPosition] := Char(Memory[MemoryPosition]);
     246  Inc(OutputPosition);
     247end;
     248
     249procedure TBrainFuckInterpretter.CommandLoopStart;
     250begin
     251  if Memory[MemoryPosition] = 0 then
     252    SourcePosition := SourceJump[SourcePosition];
     253end;
     254
     255procedure TBrainFuckInterpretter.CommandLoopEnd;
     256begin
     257  if Memory[MemoryPosition] > 0 then
     258    SourcePosition := SourceJump[SourcePosition] - 1;
    226259end;
    227260
     
    230263  I: Integer;
    231264begin
    232   RemoveBlankCharacters;
    233265  PrepareJumpTable;
    234266  SourcePosition := 0;
     
    244276
    245277procedure TBrainFuckInterpretter.SingleStep;
    246 var
    247   CodeText: string;
    248   C: Integer;
    249   NewPos: Integer;
    250 begin
    251   case FSource[SourcePosition] of
    252     '>': if MemoryPosition < MemorySize then Inc(MemoryPosition)
    253       else raise Exception.Create(SProgramUpperLimit);
    254     '<': if MemoryPosition > 0 then Dec(MemoryPosition)
    255       else raise Exception.Create(SProgramLowerLimit);
    256     '+': Memory[MemoryPosition] := ((Memory[MemoryPosition] + 1) mod CellSize);
    257     '-': Memory[MemoryPosition] := ((Memory[MemoryPosition] - 1) mod CellSize);
    258     '.': Write(Memory[MemoryPosition]);
    259     ',': Memory[MemoryPosition] := Read;
    260     '[': begin
    261       if Memory[MemoryPosition] = 0 then begin
    262         SourcePosition := SourceJump[SourcePosition];
    263         (*C := 1;
    264         Inc(SourcePosition);
    265         while C > 0 do begin
    266           case ReadCode of
    267             '[': Inc(C);
    268             ']': Dec(C);
    269           end;
    270           Inc(SourcePosition);
    271         end;
    272         Dec(SourcePosition);*)
    273         //if NewPos <> SourcePosition then raise Exception.Create('Wrong pos: ' + IntToStr(SourcePosition) + ' ' + IntToStr(NewPos));
    274       end;
    275     end;
    276     ']': begin
    277       if Memory[MemoryPosition] > 0 then begin
    278         SourcePosition := SourceJump[SourcePosition] - 1;
    279         (*C := 1;
    280         Dec(SourcePosition);
    281         while C > 0 do begin
    282           case ReadCode of
    283             ']': Inc(C);
    284             '[': Dec(C);
    285           end;
    286           Dec(SourcePosition);
    287         end;
    288         if NewPos <> SourcePosition then raise Exception.Create('Wrong pos: ' + IntToStr(SourcePosition) + ' ' + IntToStr(NewPos));
    289         *)
    290       end;
    291     end;
    292   end;
     278begin
     279  FCommandTable[FSource[SourcePosition]];
    293280  Inc(SourcePosition);
    294281  Inc(FStepCount);
     
    317304  MemorySize := 30000;
    318305  CellSize := 256;
     306  FCommandTable[cmInc] := CommandInc;
     307  FCommandTable[cmDec] := CommandDec;
     308  FCommandTable[cmPointerInc] := CommandPointerInc;
     309  FCommandTable[cmPointerDec] := CommandPointerDec;
     310  FCommandTable[cmOutput] := CommandOutput;
     311  FCommandTable[cmInput] := CommandInput;
     312  FCommandTable[cmLoopStart] := CommandLoopStart;
     313  FCommandTable[cmLoopEnd] := CommandLoopEnd;
    319314end;
    320315
  • trunk/UInterpreterForm.lfm

    r15 r18  
    77  ClientHeight = 509
    88  ClientWidth = 762
     9  OnHide = FormHide
     10  OnShow = FormShow
    911  LCLVersion = '0.9.31'
    1012  object Panel3: TPanel
     
    187189      ParentColor = False
    188190    end
     191    object Label7: TLabel
     192      Left = 1
     193      Height = 18
     194      Top = 62
     195      Width = 45
     196      Caption = 'Speed:'
     197      ParentColor = False
     198    end
     199    object LabelStepSpeed: TLabel
     200      Left = 112
     201      Height = 18
     202      Top = 62
     203      Width = 13
     204      Caption = '   '
     205      ParentColor = False
     206    end
    189207  end
    190208  object ToolBar1: TToolBar
     
    193211    Top = 0
    194212    Width = 762
    195     Caption = 'ToolBar1'
    196213    Images = MainForm.ImageList1
    197214    TabOrder = 3
     
    233250  end
    234251  object Timer1: TTimer
    235     Interval = 500
     252    Enabled = False
    236253    OnTimer = Timer1Timer
    237254    left = 495
  • trunk/UInterpreterForm.lrt

    r15 r18  
    1111TINTERPRETERFORM.LISTVIEWMEMORY.COLUMNS[1].CAPTION=Data
    1212TINTERPRETERFORM.LABEL6.CAPTION=Memory:
    13 TINTERPRETERFORM.TOOLBAR1.CAPTION=ToolBar1
     13TINTERPRETERFORM.LABEL7.CAPTION=Speed:
     14TINTERPRETERFORM.LABELSTEPSPEED.CAPTION=   
  • trunk/UInterpreterForm.pas

    r12 r18  
    2222    Label4: TLabel;
    2323    Label6: TLabel;
     24    Label7: TLabel;
    2425    LabelStepCounter: TLabel;
    2526    LabelProgramPointer: TLabel;
    2627    Label5: TLabel;
    2728    LabelMemoryPointer: TLabel;
     29    LabelStepSpeed: TLabel;
    2830    ListViewMemory: TListView;
    2931    MemoInput: TMemo;
     
    4446    ToolButton6: TToolButton;
    4547    ToolButton7: TToolButton;
     48    procedure FormHide(Sender: TObject);
     49    procedure FormShow(Sender: TObject);
    4650    procedure ListViewMemoryData(Sender: TObject; Item: TListItem);
    4751    procedure MemoInputKeyPress(Sender: TObject; var Key: char);
    4852    procedure Timer1Timer(Sender: TObject);
    4953  private
    50     { private declarations }
     54    LastStepCounter: Integer;
    5155  public
    5256    procedure RefreshListViewMemory;
     
    6468{$R *.lfm}
    6569
     70resourcestring
     71  SStepsPerSecond = ' steps/s';
     72
    6673{ TInterpreterForm }
    6774
     
    7178  LabelMemoryPointer.Caption := IntToStr(MainForm.BrainFuckInterpreter.MemoryPosition);
    7279  LabelStepCounter.Caption := IntToStr(MainForm.BrainFuckInterpreter.StepCount);
     80  LabelStepSpeed.Caption := IntToStr(MainForm.BrainFuckInterpreter.StepCount - LastStepCounter) + SStepsPerSecond;
     81  LastStepCounter := MainForm.BrainFuckInterpreter.StepCount;
    7382  RefreshListViewMemory;
    7483  MemoOutput.Lines.Text := MainForm.BrainFuckInterpreter.Output;
     
    101110end;
    102111
     112procedure TInterpreterForm.FormHide(Sender: TObject);
     113begin
     114  Timer1.Enabled := False;
     115end;
     116
     117procedure TInterpreterForm.FormShow(Sender: TObject);
     118begin
     119  Timer1.Enabled := True;
     120end;
     121
    103122procedure TInterpreterForm.MemoInputKeyPress(Sender: TObject; var Key: char);
    104123begin
  • trunk/UMainForm.lfm

    r16 r18  
    11711171  object PopupMenuSource: TPopupMenu
    11721172    Images = ImageList1
    1173     left = 128
    1174     top = 126
     1173    left = 192
     1174    top = 104
    11751175    object MenuItem23: TMenuItem
    11761176      Action = ABreakpointToggle
     1177      Bitmap.Data = {
     1178        36040000424D3604000000000000360000002800000010000000100000000100
     1179        2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
     1180        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1181        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1182        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1183        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1184        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1185        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1186        FF000000810000007500000064200000607E000060B2000060C8000060B20000
     1187        607E000064200000750000008100FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1188        FF00000081000000784102027DC10A0AA8E70F0FCAF81111D5FE0F0FCAF80A0A
     1189        A8E702027DC10000784100008100FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1190        FF0000008420030389C11515BFF31212CDFF1111CCFF1111CCFF1111CCFF1111
     1191        CCFF0E0EBCF3020288C100008420FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1192        FF000000897E1818AFE61414C1FF1111BFFF1111BFFF1111BFFF1111BFFF1111
     1193        BFFF1111BFFF0A0AA6E60000897EFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1194        FF0000008FB23434C3F81414B2FF1111B1FF1111B1FF1111B1FF1111B1FF1111
     1195        B1FF1111B1FF1414B0F800008FB2FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1196        FF00000095C84848D0FE2E2EB8FF1D1DADFF1212A5FF1111A4FF1111A4FF1111
     1197        A4FF1111A4FF1B1BADFE000095C8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1198        FF0000009AB24A4AD4F83737BFFF3737BFFF3131BAFF2727B0FF1C1CA6FF1616
     1199        A0FF12129CFF2323AEF800009AB2FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1200        FF0000009E7E3939CCE64A4AD2FF4545CDFF4545CDFF4545CDFF4545CDFF4545
     1201        CDFF4848D0FF3131C3E600009E7EFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1202        FF000000A3200A0AABC15555E3F35A5AE2FF5656DEFF5656DEFF5656DEFF5959
     1203        E1FF5050DEF30909AAC10000A320FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1204        FF000000A4000000A6410A0AAEC13F3FD5E76060EDF86A6AF3FE6060ECF83E3E
     1205        D4E70A0AADC10000A6410000A400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1206        FF000000A4000000A6000000A9200000AA7E0000AAB20000AAC80000AAB20000
     1207        AA7E0000A9200000A6000000A400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1208        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1209        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1210        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1211        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
     1212      }
     1213    end
     1214    object MenuItem26: TMenuItem
     1215      Action = AFormatSource
    11771216    end
    11781217  end
  • trunk/UMainForm.pas

    r16 r18  
    5858    MenuItem24: TMenuItem;
    5959    MenuItem25: TMenuItem;
     60    MenuItem26: TMenuItem;
    6061    MenuItem40: TMenuItem;
    6162    MenuItem21: TMenuItem;
     
    307308procedure TMainForm.AProjectNewExecute(Sender: TObject);
    308309begin
    309   ProjectFileName := 'Project.b';
     310  ProjectFileName := 'Examples' + DirectorySeparator + 'Project.b';
    310311  MemoSource.Clear;
    311312  Modified := False;
Note: See TracChangeset for help on using the changeset viewer.