Changeset 3 for trunk


Ignore:
Timestamp:
Feb 9, 2012, 1:25:43 PM (13 years ago)
Author:
chronos
Message:
  • Fixed: Now "Hello world" example is correctly interpretted.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11lib
         2LazFuckIDE.exe
  • trunk/LazFuckIDE.lps

    r2 r3  
    55    <Version Value="9"/>
    66    <BuildModes Active="Default"/>
    7     <Units Count="4">
     7    <Units Count="6">
    88      <Unit0>
    99        <Filename Value="LazFuckIDE.lpr"/>
    1010        <IsPartOfProject Value="True"/>
    1111        <UnitName Value="LazFuckIDE"/>
    12         <UsageCount Value="20"/>
     12        <UsageCount Value="23"/>
    1313      </Unit0>
    1414      <Unit1>
     
    1818        <ResourceBaseClass Value="Form"/>
    1919        <UnitName Value="UMainForm"/>
    20         <IsVisibleTab Value="True"/>
    2120        <EditorIndex Value="0"/>
    2221        <WindowIndex Value="0"/>
    23         <TopLine Value="68"/>
    24         <CursorPos X="13" Y="77"/>
    25         <UsageCount Value="20"/>
     22        <TopLine Value="40"/>
     23        <CursorPos X="35" Y="98"/>
     24        <UsageCount Value="23"/>
    2625        <Loaded Value="True"/>
    2726        <LoadedDesigner Value="True"/>
     
    3130        <IsPartOfProject Value="True"/>
    3231        <UnitName Value="UBrainFuck"/>
     32        <IsVisibleTab Value="True"/>
    3333        <EditorIndex Value="2"/>
    3434        <WindowIndex Value="0"/>
    35         <TopLine Value="70"/>
    36         <CursorPos X="19" Y="78"/>
    37         <UsageCount Value="20"/>
     35        <TopLine Value="67"/>
     36        <CursorPos X="42" Y="71"/>
     37        <UsageCount Value="23"/>
    3838        <Loaded Value="True"/>
    3939      </Unit2>
     
    4848        <TopLine Value="11"/>
    4949        <CursorPos X="19" Y="6"/>
    50         <UsageCount Value="20"/>
     50        <UsageCount Value="23"/>
    5151        <Loaded Value="True"/>
    5252        <LoadedDesigner Value="True"/>
    5353      </Unit3>
     54      <Unit4>
     55        <Filename Value="H:\Lazarus\0.9.31_2.7.1\fpc\2.7.1\source\rtl\objpas\classes\classesh.inc"/>
     56        <EditorIndex Value="3"/>
     57        <WindowIndex Value="0"/>
     58        <TopLine Value="636"/>
     59        <CursorPos X="14" Y="649"/>
     60        <UsageCount Value="11"/>
     61        <Loaded Value="True"/>
     62      </Unit4>
     63      <Unit5>
     64        <Filename Value="H:\Lazarus\0.9.31_2.7.1\fpc\2.7.1\source\rtl\objpas\classes\stringl.inc"/>
     65        <EditorIndex Value="4"/>
     66        <WindowIndex Value="0"/>
     67        <TopLine Value="434"/>
     68        <CursorPos X="3" Y="441"/>
     69        <UsageCount Value="11"/>
     70        <Loaded Value="True"/>
     71      </Unit5>
    5472    </Units>
    5573    <General>
    5674      <ActiveWindowIndexAtStart Value="0"/>
    5775    </General>
    58     <JumpHistory Count="29" HistoryIndex="28">
     76    <JumpHistory Count="30" HistoryIndex="29">
    5977      <Position1>
    60         <Filename Value="UMainForm.pas"/>
    61         <Caret Line="43" Column="18" TopLine="20"/>
     78        <Filename Value="UBrainFuck.pas"/>
     79        <Caret Line="121" Column="1" TopLine="104"/>
    6280      </Position1>
    6381      <Position2>
    64         <Filename Value="UMainForm.pas"/>
    65         <Caret Line="44" Column="18" TopLine="21"/>
     82        <Filename Value="UBrainFuck.pas"/>
     83        <Caret Line="125" Column="1" TopLine="104"/>
    6684      </Position2>
    6785      <Position3>
    68         <Filename Value="UMainForm.pas"/>
    69         <Caret Line="45" Column="18" TopLine="21"/>
     86        <Filename Value="UBrainFuck.pas"/>
     87        <Caret Line="121" Column="1" TopLine="104"/>
    7088      </Position3>
    7189      <Position4>
    72         <Filename Value="UMainForm.pas"/>
    73         <Caret Line="59" Column="5" TopLine="44"/>
     90        <Filename Value="UBrainFuck.pas"/>
     91        <Caret Line="125" Column="1" TopLine="104"/>
    7492      </Position4>
    7593      <Position5>
    76         <Filename Value="UInterpreterForm.pas"/>
    77         <Caret Line="1" Column="1" TopLine="1"/>
     94        <Filename Value="UBrainFuck.pas"/>
     95        <Caret Line="121" Column="1" TopLine="104"/>
    7896      </Position5>
    7997      <Position6>
    80         <Filename Value="UMainForm.pas"/>
    81         <Caret Line="81" Column="28" TopLine="58"/>
     98        <Filename Value="UBrainFuck.pas"/>
     99        <Caret Line="125" Column="1" TopLine="104"/>
    82100      </Position6>
    83101      <Position7>
    84         <Filename Value="UMainForm.pas"/>
    85         <Caret Line="86" Column="24" TopLine="65"/>
     102        <Filename Value="UBrainFuck.pas"/>
     103        <Caret Line="121" Column="1" TopLine="104"/>
    86104      </Position7>
    87105      <Position8>
    88         <Filename Value="UMainForm.pas"/>
    89         <Caret Line="85" Column="58" TopLine="64"/>
     106        <Filename Value="UBrainFuck.pas"/>
     107        <Caret Line="125" Column="1" TopLine="104"/>
    90108      </Position8>
    91109      <Position9>
    92         <Filename Value="UMainForm.pas"/>
    93         <Caret Line="71" Column="20" TopLine="56"/>
     110        <Filename Value="UBrainFuck.pas"/>
     111        <Caret Line="121" Column="1" TopLine="104"/>
    94112      </Position9>
    95113      <Position10>
    96         <Filename Value="UMainForm.pas"/>
    97         <Caret Line="88" Column="64" TopLine="68"/>
     114        <Filename Value="UBrainFuck.pas"/>
     115        <Caret Line="125" Column="1" TopLine="104"/>
    98116      </Position10>
    99117      <Position11>
    100         <Filename Value="UMainForm.pas"/>
    101         <Caret Line="89" Column="50" TopLine="69"/>
     118        <Filename Value="UBrainFuck.pas"/>
     119        <Caret Line="121" Column="1" TopLine="104"/>
    102120      </Position11>
    103121      <Position12>
    104122        <Filename Value="UBrainFuck.pas"/>
    105         <Caret Line="38" Column="16" TopLine="25"/>
     123        <Caret Line="125" Column="1" TopLine="104"/>
    106124      </Position12>
    107125      <Position13>
    108         <Filename Value="UMainForm.pas"/>
    109         <Caret Line="91" Column="1" TopLine="70"/>
     126        <Filename Value="UBrainFuck.pas"/>
     127        <Caret Line="121" Column="1" TopLine="104"/>
    110128      </Position13>
    111129      <Position14>
    112130        <Filename Value="UBrainFuck.pas"/>
    113         <Caret Line="122" Column="1" TopLine="109"/>
     131        <Caret Line="125" Column="1" TopLine="104"/>
    114132      </Position14>
    115133      <Position15>
    116134        <Filename Value="UBrainFuck.pas"/>
    117         <Caret Line="123" Column="1" TopLine="109"/>
     135        <Caret Line="121" Column="1" TopLine="104"/>
    118136      </Position15>
    119137      <Position16>
    120138        <Filename Value="UBrainFuck.pas"/>
    121         <Caret Line="41" Column="34" TopLine="24"/>
     139        <Caret Line="125" Column="1" TopLine="104"/>
    122140      </Position16>
    123141      <Position17>
    124142        <Filename Value="UBrainFuck.pas"/>
    125         <Caret Line="130" Column="3" TopLine="127"/>
     143        <Caret Line="121" Column="1" TopLine="104"/>
    126144      </Position17>
    127145      <Position18>
    128         <Filename Value="UMainForm.pas"/>
    129         <Caret Line="91" Column="1" TopLine="70"/>
     146        <Filename Value="UBrainFuck.pas"/>
     147        <Caret Line="125" Column="1" TopLine="104"/>
    130148      </Position18>
    131149      <Position19>
    132150        <Filename Value="UBrainFuck.pas"/>
    133         <Caret Line="128" Column="1" TopLine="123"/>
     151        <Caret Line="121" Column="1" TopLine="104"/>
    134152      </Position19>
    135153      <Position20>
    136154        <Filename Value="UBrainFuck.pas"/>
    137         <Caret Line="129" Column="1" TopLine="123"/>
     155        <Caret Line="125" Column="1" TopLine="104"/>
    138156      </Position20>
    139157      <Position21>
    140158        <Filename Value="UBrainFuck.pas"/>
    141         <Caret Line="74" Column="1" TopLine="61"/>
     159        <Caret Line="121" Column="1" TopLine="104"/>
    142160      </Position21>
    143161      <Position22>
    144162        <Filename Value="UBrainFuck.pas"/>
    145         <Caret Line="75" Column="1" TopLine="61"/>
     163        <Caret Line="125" Column="1" TopLine="104"/>
    146164      </Position22>
    147165      <Position23>
    148         <Filename Value="UMainForm.pas"/>
    149         <Caret Line="91" Column="3" TopLine="68"/>
     166        <Filename Value="UBrainFuck.pas"/>
     167        <Caret Line="121" Column="1" TopLine="104"/>
    150168      </Position23>
    151169      <Position24>
    152170        <Filename Value="UBrainFuck.pas"/>
    153         <Caret Line="129" Column="3" TopLine="127"/>
     171        <Caret Line="123" Column="1" TopLine="104"/>
    154172      </Position24>
    155173      <Position25>
    156174        <Filename Value="UBrainFuck.pas"/>
    157         <Caret Line="74" Column="3" TopLine="70"/>
     175        <Caret Line="125" Column="1" TopLine="104"/>
    158176      </Position25>
    159177      <Position26>
    160178        <Filename Value="UBrainFuck.pas"/>
    161         <Caret Line="76" Column="1" TopLine="70"/>
     179        <Caret Line="130" Column="1" TopLine="117"/>
    162180      </Position26>
    163181      <Position27>
    164182        <Filename Value="UBrainFuck.pas"/>
    165         <Caret Line="77" Column="1" TopLine="70"/>
     183        <Caret Line="123" Column="14" TopLine="117"/>
    166184      </Position27>
    167185      <Position28>
    168186        <Filename Value="UBrainFuck.pas"/>
    169         <Caret Line="78" Column="1" TopLine="70"/>
     187        <Caret Line="117" Column="1" TopLine="104"/>
    170188      </Position28>
    171189      <Position29>
    172190        <Filename Value="UBrainFuck.pas"/>
    173         <Caret Line="80" Column="3" TopLine="70"/>
     191        <Caret Line="123" Column="1" TopLine="104"/>
    174192      </Position29>
     193      <Position30>
     194        <Filename Value="UBrainFuck.pas"/>
     195        <Caret Line="125" Column="1" TopLine="104"/>
     196      </Position30>
    175197    </JumpHistory>
    176198  </ProjectSession>
     199  <Debugging>
     200    <BreakPoints Count="2">
     201      <Item1>
     202        <Kind Value="bpkSource"/>
     203        <WatchScope Value="wpsLocal"/>
     204        <WatchKind Value="wpkWrite"/>
     205        <Source Value="UBrainFuck.pas"/>
     206        <Line Value="117"/>
     207      </Item1>
     208      <Item2>
     209        <Kind Value="bpkSource"/>
     210        <WatchScope Value="wpsLocal"/>
     211        <WatchKind Value="wpkWrite"/>
     212        <Source Value="UBrainFuck.pas"/>
     213        <Line Value="123"/>
     214      </Item2>
     215    </BreakPoints>
     216  </Debugging>
    177217</CONFIG>
  • trunk/UBrainFuck.pas

    r2 r3  
    2626    function ReadCode: Char;
    2727  public
    28     Source: TStrings;
     28    Source: string;
    2929    SourcePosition: Integer;
    3030    Memory: array of Byte;
     
    3232    Loop: array of Integer;
    3333    LoopCurrent: Integer;
    34     Output: TStrings;
    35     Input: TStrings;
     34    Output: string;
     35    Input: string;
    3636    InputPosition: Integer;
    3737    procedure Reset;
     
    4242  end;
    4343
     44
    4445implementation
     46
     47resourcestring
     48  SProgramLowerLimit = 'Program run over lower limit';
     49  SProgramUpperLimit = 'Program run over upper limit';
    4550
    4651{ TBrainFuckInterpreter }
     
    4853procedure TBrainFuckInterpreter.Write(Value: Byte);
    4954begin
    50   Output.Text := Output.Text + Char(Value);
     55  Output := Output + Char(Value);
    5156end;
    5257
     
    5560  Character: string;
    5661begin
    57   Character := Copy(Input.Text, InputPosition, 1);
     62  Character := Copy(Input, InputPosition, 1);
    5863  Result := Ord(Character[1]);
    5964  Inc(InputPosition);
     
    6469  Code: string;
    6570begin
    66   Code := Copy(Source.Text, SourcePosition, 1);
     71  Code := Copy(Source, SourcePosition + 1, 1);
    6772  Result := Code[1];
    6873end;
     
    7479  SourcePosition := 0;
    7580  InputPosition := 0;
    76   Output.Text := '';
     81  Output := '';
    7782  MemoryPosition := 0;
    7883  for I := 0 to Length(Memory) - 1 do
     
    8994  case ReadCode of
    9095    '>': Inc(MemoryPosition);
    91     '<': Dec(MemoryPosition);
     96    '<': if MemoryPosition > 0 then Dec(MemoryPosition)
     97      else raise Exception.Create(SProgramLowerLimit);
    9298    '+': Memory[MemoryPosition] := Memory[MemoryPosition] + 1;
    9399    '-': Memory[MemoryPosition] := Memory[MemoryPosition] - 1;
     
    97103      if Memory[MemoryPosition] = 0 then begin
    98104        C := 1;
    99         Inc(MemoryPosition);
     105        Inc(SourcePosition);
    100106        while C > 0 do begin
    101107          case ReadCode of
     
    103109            ']': Dec(C);
    104110          end;
    105           Inc(MemoryPosition);
     111          Inc(SourcePosition);
    106112        end;
    107         Dec(MemoryPosition);
     113        Dec(SourcePosition);
    108114      end;
    109115    end;
     
    111117      if Memory[MemoryPosition] > 0 then begin
    112118        C := 1;
    113         Dec(MemoryPosition);
     119        Dec(SourcePosition);
    114120        while C > 0 do begin
    115121          case ReadCode of
     
    117123            '[': Dec(C);
    118124          end;
    119           Dec(MemoryPosition);
     125          Dec(SourcePosition);
    120126        end;
    121127      end;
    122128    end;
    123129  end;
    124   Inc(MemoryPosition);
     130  Inc(SourcePosition);
    125131end;
    126132
     
    128134begin
    129135  Reset;
    130   while SourcePosition < Length(Source.Text) do
     136  while SourcePosition < Length(Source) do
    131137    SingleStep;
    132138end;
  • trunk/UMainForm.lfm

    r2 r3  
    11object MainForm: TMainForm
    22  Left = 270
    3   Height = 534
     3  Height = 465
    44  Top = 120
    5   Width = 629
     5  Width = 643
    66  Caption = 'LazFuck'
    7   ClientHeight = 515
    8   ClientWidth = 629
     7  ClientHeight = 446
     8  ClientWidth = 643
    99  Menu = MainMenu1
    1010  OnCreate = FormCreate
     11  OnDestroy = FormDestroy
    1112  OnShow = FormShow
    1213  LCLVersion = '0.9.31'
    1314  object MemoSource: TMemo
    1415    Left = 0
    15     Height = 439
     16    Height = 370
    1617    Top = 56
    17     Width = 629
     18    Width = 643
    1819    Align = alClient
    1920    Lines.Strings = (
     
    2728    Left = 0
    2829    Height = 20
    29     Top = 495
    30     Width = 629
     30    Top = 426
     31    Width = 643
    3132    Panels = <>
    3233  end
     
    3536    Height = 26
    3637    Top = 0
    37     Width = 629
     38    Width = 643
    3839    Images = ImageList1
    3940    ParentShowHint = False
     
    8283    Height = 30
    8384    Top = 26
    84     Width = 629
     85    Width = 643
    8586    Align = alTop
    8687    TabOrder = 3
     
    9495      object MenuItem8: TMenuItem
    9596        Action = AProjectNew
     97        Bitmap.Data = {
     98          36040000424D3604000000000000360000002800000010000000100000000100
     99          2000000000000004000064000000640000000000000000000000000000000000
     100          0000000000000000000000000000000000000000000000000000000000000000
     101          0000000000000000000000000000000000000000000000000000000000000000
     102          0000000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
     103          00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
     104          0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     105          FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     106          0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     107          FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     108          0000000000FFFFFFFFFFFFFFFFFFFF0000FFFF0000FFFF0000FFFF0000FFFF00
     109          00FFFF0000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     110          0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     111          FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     112          0000000000FFFFFFFFFFFFFFFFFFFF0000FFFF0000FFFF0000FFFF0000FFFF00
     113          00FFFF0000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     114          0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     115          FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     116          0000000000FFFFFFFFFFFFFFFFFFFF0000FFFF0000FFFF0000FFFF0000FFFF00
     117          00FFFF0000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     118          0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     119          FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     120          0000000000FFFFFFFFFFFFFFFFFFFF0000FFFF0000FFFF0000FFFF0000FFFFFF
     121          FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     122          0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     123          FFFF000000FF000000FF000000FF000000FF0000000000000000000000000000
     124          0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     125          FFFF000000FFBDBDBDFF000000FF000000000000000000000000000000000000
     126          0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     127          FFFF000000FF000000FF00000000000000000000000000000000000000000000
     128          0000000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
     129          00FF000000FF0000000000000000000000000000000000000000000000000000
     130          0000000000000000000000000000000000000000000000000000000000000000
     131          0000000000000000000000000000000000000000000000000000
     132        }
    96133      end
    97134      object MenuItem2: TMenuItem
    98135        Action = AProjectOpen
     136        Bitmap.Data = {
     137          36040000424D3604000000000000360000002800000010000000100000000100
     138          2000000000000004000064000000640000000000000000000000000000000000
     139          0000000000000000000000000000000000000000000000000000000000000000
     140          0000000000000000000000000000000000000000000000000000000000000000
     141          0000000000000000000000000000000000000000000000000000000000000000
     142          0000000000000000000000000000000000000000000000000000000000FF0000
     143          00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
     144          00FF000000FF0000000000000000000000000000000000000000000000FF0000
     145          00FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0084
     146          84FF008484FF000000FF00000000000000000000000000000000000000FF00FF
     147          FFFF000000FF008484FF008484FF008484FF008484FF008484FF008484FF0084
     148          84FF008484FF008484FF000000FF000000000000000000000000000000FFFFFF
     149          FFFF00FFFFFF000000FF008484FF008484FF008484FF008484FF008484FF0084
     150          84FF008484FF008484FF008484FF000000FF0000000000000000000000FF00FF
     151          FFFFFFFFFFFF00FFFFFF000000FF008484FF008484FF008484FF008484FF0084
     152          84FF008484FF008484FF008484FF008484FF000000FF00000000000000FFFFFF
     153          FFFF00FFFFFFFFFFFFFF00FFFFFF000000FF000000FF000000FF000000FF0000
     154          00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00FF
     155          FFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FF
     156          FFFF000000FF0000000000000000000000000000000000000000000000FFFFFF
     157          FFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFF
     158          FFFF000000FF0000000000000000000000000000000000000000000000FF00FF
     159          FFFFFFFFFFFF00FFFFFF000000FF000000FF000000FF000000FF000000FF0000
     160          00FF000000FF0000000000000000000000000000000000000000000000000000
     161          00FF000000FF000000FF00000000000000000000000000000000000000000000
     162          00000000000000000000000000FF000000FF000000FF00000000000000000000
     163          0000000000000000000000000000000000000000000000000000000000000000
     164          0000000000000000000000000000000000FF000000FF00000000000000000000
     165          0000000000000000000000000000000000000000000000000000000000FF0000
     166          00000000000000000000000000FF00000000000000FF00000000000000000000
     167          0000000000000000000000000000000000000000000000000000000000000000
     168          00FF000000FF000000FF00000000000000000000000000000000000000000000
     169          0000000000000000000000000000000000000000000000000000000000000000
     170          0000000000000000000000000000000000000000000000000000
     171        }
    99172      end
    100173      object MenuItem3: TMenuItem
    101174        Action = AProjectSave
     175        Bitmap.Data = {
     176          36040000424D3604000000000000360000002800000010000000100000000100
     177          2000000000000004000064000000640000000000000000000000000000000000
     178          0000000000000000000000000000000000000000000000000000000000000000
     179          0000000000000000000000000000000000000000000000000000000000000000
     180          0000000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
     181          00FF000000FF000000FF000000FF000000FF000000FF00000000000000000000
     182          00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000
     183          00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     184          00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000
     185          00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     186          00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000
     187          00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     188          00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000
     189          00FF000000FF000000FF000000FF008484FF000000FF00000000000000000000
     190          00FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0084
     191          84FF008484FF008484FF008484FF008484FF000000FF00000000000000000000
     192          00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000
     193          00FF000000FF000000FF008484FF008484FF000000FF00000000000000000000
     194          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     195          FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     196          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     197          FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     198          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     199          FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     200          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     201          FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     202          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     203          FFFFFFFFFFFFFFFFFFFF000000FF000000FF000000FF00000000000000000000
     204          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     205          FFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFF000000FF00000000000000000000
     206          00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
     207          00FF000000FF000000FF000000FF000000FF000000FF00000000000000000000
     208          0000000000000000000000000000000000000000000000000000000000000000
     209          0000000000000000000000000000000000000000000000000000
     210        }
    102211      end
    103212      object MenuItem4: TMenuItem
    104213        Action = AProjectSaveAs
     214        Bitmap.Data = {
     215          36040000424D3604000000000000360000002800000010000000100000000100
     216          2000000000000004000064000000640000000000000000000000000000000000
     217          0000000000000000000000000000000000000000000000000000000000000000
     218          0000000000000000000000000000000000000000000000000000000000000000
     219          0000000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
     220          00FF000000FF000000FF000000FF000000FF000000FF00000000000000000000
     221          00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000
     222          00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     223          00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000
     224          00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     225          00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000
     226          00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     227          00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000
     228          00FF000000FF000000FF000000FF008484FF000000FF00000000000000000000
     229          00FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0084
     230          84FF008484FF008484FF008484FF008484FF000000FF00000000000000000000
     231          00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000
     232          00FF000000FF000000FF008484FF008484FF000000FF00000000000000000000
     233          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     234          FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     235          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     236          FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     237          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     238          FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     239          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     240          FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000
     241          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     242          FFFFFFFFFFFFFFFFFFFF000000FF000000FF000000FF00000000000000000000
     243          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     244          FFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFF000000FF00000000000000000000
     245          00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
     246          00FF000000FF000000FF000000FF000000FF000000FF00000000000000000000
     247          0000000000000000000000000000000000000000000000000000000000000000
     248          0000000000000000000000000000000000000000000000000000
     249        }
    105250      end
    106251      object MenuItem7: TMenuItem
    107252        Action = AProjectClose
     253        Bitmap.Data = {
     254          36040000424D3604000000000000360000002800000010000000100000000100
     255          2000000000000004000064000000640000000000000000000000000000000000
     256          0000000000000000000000000000000000000000000000000000000000000000
     257          0000000000000000000000000000000000000000000000000000000000000000
     258          0000000000000000000000000000000000000000000000000000000000000000
     259          0000000000000000000000000000000000000000000000000000000000000000
     260          0000000000000000000000000000000000000000000000000000000000000000
     261          00000000000000000000000000003A3AE2FFC0C0C0FF00000000000000000000
     262          0000000000003A3AE2FFC0C0C0FF000000000000000000000000000000000000
     263          0000000000000000000000000000000000000000000000000000000000000000
     264          00003A3AE2FF3A3AE2FF3A3AE2FFC0C0C0FF0000000000000000000000000000
     265          000000000000000000003A3AE2FFC0C0C0FF0000000000000000000000000000
     266          00003A3AE2FF3A3AE2FF3A3AE2FFC0C0C0FF0000000000000000000000000000
     267          0000000000003A3AE2FFC0C0C0FF000000000000000000000000000000000000
     268          0000000000003838E0FF3838E0FF3838E0FFC0C0C0FF00000000000000000000
     269          00003838E0FF3838E0FFC0C0C0FF000000000000000000000000000000000000
     270          000000000000000000003535DDFF3535DDFF3535DDFFC0C0C0FF000000003535
     271          DDFF3535DDFFC0C0C0FF00000000000000000000000000000000000000000000
     272          00000000000000000000000000003232DAFF3232DAFF3232DAFF3232DAFF3232
     273          DAFFC0C0C0FF0000000000000000000000000000000000000000000000000000
     274          0000000000000000000000000000000000002F2FD7FF2F2FD7FF2F2FD7FFC0C0
     275          C0FF000000000000000000000000000000000000000000000000000000000000
     276          00000000000000000000000000002C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FF2C2C
     277          D4FFC0C0C0FF0000000000000000000000000000000000000000000000000000
     278          000000000000000000002929D1FF2929D1FF2929D1FFC0C0C0FF000000002929
     279          D1FFC0C0C0FF0000000000000000000000000000000000000000000000000000
     280          00002626CEFF2626CEFF2626CEFF2626CEFFC0C0C0FF00000000000000000000
     281          00002626CEFF2626CEFFC0C0C0FF000000000000000000000000000000002020
     282          C8FF2020C8FF2020C8FF2020C8FFC0C0C0FF0000000000000000000000000000
     283          0000000000002020C8FF2020C8FFC0C0C0FF0000000000000000000000001818
     284          C0FF1818C0FFC0C0C0FF00000000000000000000000000000000000000000000
     285          000000000000000000001818C0FF1818C0FFC0C0C0FF00000000000000000000
     286          0000000000000000000000000000000000000000000000000000000000000000
     287          0000000000000000000000000000000000000000000000000000
     288        }
    108289      end
    109290      object MenuItem5: TMenuItem
     
    112293      object MenuItem6: TMenuItem
    113294        Action = AExit
     295        Bitmap.Data = {
     296          36040000424D3604000000000000360000002800000010000000100000000100
     297          2000000000000004000064000000640000000000000000000000000000000000
     298          0000000000000000000000000000000000FF0000000000000000000000000000
     299          0000000000000000000000000000000000000000000000000000000000000000
     300          00000000000000000000000000FF000000FF0000000000000000000000000000
     301          0000000000000000000000000000000000000000000000000000000000000000
     302          000000000000000000FF008484FF000000FF0000000000000000000000000000
     303          0000000000000000000000000000000000000000000000000000000000000000
     304          0000000000FF008484FF008484FF000000FF0000000000000000000000000000
     305          0000000000000000000000000000000000000000000000000000000000FF0000
     306          00FF008484FF008484FF008484FF000000FF000000FF000000FF000000FF0000
     307          00FF000000FF000000FF000000FF000000000000000000000000000000000000
     308          00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     309          0000000000000000000000000000000000000000000000000000000000000000
     310          00FF008484FF008484FF000000FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     311          0000000000000000000000000000840000FF0000000000000000000000000000
     312          00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     313          00000000000000000000840000FF840000FF0000000000000000000000000000
     314          00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     315          000000000000840000FF840000FF840000FF840000FF840000FF000000000000
     316          00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     317          0000840000FF840000FF840000FF840000FF840000FF840000FF000000000000
     318          00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     319          000000000000840000FF840000FF840000FF840000FF840000FF000000000000
     320          00FF008484FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000
     321          00000000000000000000840000FF840000FF0000000000000000000000000000
     322          00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000
     323          0000000000000000000000000000840000FF0000000000000000000000000000
     324          00FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000
     325          0000000000000000000000000000000000000000000000000000000000000000
     326          00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
     327          0000000000000000000000000000000000000000000000000000000000000000
     328          0000000000000000000000000000000000000000000000000000000000000000
     329          0000000000000000000000000000000000000000000000000000
     330        }
    114331      end
    115332    end
     
    118335      object MenuItem11: TMenuItem
    119336        Action = ACompile
     337        Bitmap.Data = {
     338          36040000424D3604000000000000360000002800000010000000100000000100
     339          2000000000000004000064000000640000000000000000000000000000000000
     340          0000000000000000000000000000000000000000000000000000000000000000
     341          0000000000000000000000000000000000000000000000000000000000000000
     342          0000000000000000000000000000000000000000000000000000000000000000
     343          0000000000000000000000000000000000000000000000000000000000000000
     344          0000000000000000000000000000339966FF009933FF009933FF009933FF66CC
     345          99FF0000000000000000339966FF000000000000000000000000000000000000
     346          00000000000000000000339966FF339966FF009933FF009933FF009933FF0099
     347          33FF009933FF339966FF009933FF000000000000000000000000000000000000
     348          00000000000066CC99FF009933FF66CC99FF000000000000000066CC99FF0099
     349          33FF009933FF009933FF009933FF000000000000000000000000000000000000
     350          000000000000009933FF66CC99FF000000000000000000000000000000003399
     351          66FF009933FF009933FF009933FF000000000000000000000000000000000000
     352          0000000000000000000000000000000000000000000000000000339966FF0099
     353          33FF009933FF009933FF009933FF000000000000000000000000000000000000
     354          0000000000000000000000000000000000000000000000000000000000000000
     355          0000000000000000000000000000000000000000000000000000000000000000
     356          000000000000009933FF009933FF009933FF009933FF339966FF000000000000
     357          0000000000000000000000000000000000000000000000000000000000000000
     358          000000000000009933FF009933FF009933FF339966FF00000000000000000000
     359          00000000000066CC99FF009933FF000000000000000000000000000000000000
     360          000000000000009933FF009933FF009933FF009933FF66CC99FF000000000000
     361          000066CC99FF009933FF66CC99FF000000000000000000000000000000000000
     362          000000000000009933FF339966FF009933FF009933FF009933FF009933FF0099
     363          33FF339966FF339966FF00000000000000000000000000000000000000000000
     364          000000000000339966FF000000000000000066CC99FF009933FF009933FF0099
     365          33FF339966FF0000000000000000000000000000000000000000000000000000
     366          0000000000000000000000000000000000000000000000000000000000000000
     367          0000000000000000000000000000000000000000000000000000000000000000
     368          0000000000000000000000000000000000000000000000000000000000000000
     369          0000000000000000000000000000000000000000000000000000000000000000
     370          0000000000000000000000000000000000000000000000000000000000000000
     371          0000000000000000000000000000000000000000000000000000
     372        }
    120373      end
    121374      object MenuItem12: TMenuItem
    122375        Action = ARun
     376        Bitmap.Data = {
     377          36040000424D3604000000000000360000002800000010000000100000000100
     378          2000000000000004000064000000640000000000000000000000000000000000
     379          0000000000000000000000000000000000000000000000000000000000000000
     380          0000000000000000000000000000000000000000000000000000000000000000
     381          0000000000000000000000000000000000000000000000000000000000000000
     382          0000000000000000000000000000000000000000000000000000000000000000
     383          000000000000000000000000000000FF00FF0000000000000000000000000000
     384          0000000000000000000000000000000000000000000000000000000000000000
     385          000000000000000000000000000000FF00FF00FF00FF00000000000000000000
     386          0000000000000000000000000000000000000000000000000000000000000000
     387          000000000000000000000000000000FF00FF00FF00FF00FF00FF000000000000
     388          0000000000000000000000000000000000000000000000000000000000000000
     389          000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF0000
     390          0000000000000000000000000000000000000000000000000000000000000000
     391          000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF
     392          00FF000000000000000000000000000000000000000000000000000000000000
     393          000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF
     394          00FF00FF00FF0000000000000000000000000000000000000000000000000000
     395          000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF
     396          00FF00FF00FF00FF00FF00000000000000000000000000000000000000000000
     397          000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF
     398          00FF00FF00FF0000000000000000000000000000000000000000000000000000
     399          000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF
     400          00FF000000000000000000000000000000000000000000000000000000000000
     401          000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF0000
     402          0000000000000000000000000000000000000000000000000000000000000000
     403          000000000000000000000000000000FF00FF00FF00FF00FF00FF000000000000
     404          0000000000000000000000000000000000000000000000000000000000000000
     405          000000000000000000000000000000FF00FF00FF00FF00000000000000000000
     406          0000000000000000000000000000000000000000000000000000000000000000
     407          000000000000000000000000000000FF00FF0000000000000000000000000000
     408          0000000000000000000000000000000000000000000000000000000000000000
     409          0000000000000000000000000000000000000000000000000000000000000000
     410          0000000000000000000000000000000000000000000000000000
     411        }
    123412      end
    124413    end
     
    127416      object MenuItem13: TMenuItem
    128417        Action = AHelp
     418        Bitmap.Data = {
     419          36040000424D3604000000000000360000002800000010000000100000000100
     420          2000000000000004000064000000640000000000000000000000000000000000
     421          0000000000000000000000000000000000000000000000000000000000000000
     422          0000000000000000000000000000000000000000000000000000000000000000
     423          00000000000000000000916429FF855A24FF885015FF824A1DFF7E4719FF7944
     424          17FF583C0EFF49340DFF00000000000000000000000000000000000000000000
     425          000000000000A1692CFFC08858FFE0C9B4FFF7F1ECFFFEFDFCFFFEFDFCFFF5F0
     426          ECFFDCC9B8FF9E7857FF473108FF000000000000000000000000000000000000
     427          0000B2702BFFDBAB80FFF8EFE7FFE2BBA6FFCC7E56FFC15823FFC05722FFC97F
     428          56FFDEBAA7FFF2EBE7FFB39376FF483108FF000000000000000000000000B677
     429          34FFD6996BFFF9F0E7FFDDA488FFC75013FFC04E11FFDCA688FFFFFEFEFFB549
     430          11FFB64A10FFD59E82FFF3ECE7FF9A7352FF49340DFF0000000000000000B479
     431          3AFFEFD6C1FFEDC5B2FFDD5A1AFFD55617FFD25313FFD87D4DFFE3A686FFBB4C
     432          11FFB34A12FFB64A10FFDEB9A6FFDCC9B8FF563C0DFF0000000000000000CD7F
     433          45FFFCF4EDFFEC9772FFE86021FFE05A1DFFDB5819FFEDAA89FFFFFEFEFFC84E
     434          12FFB94C11FFB34C13FFC77B53FFF6F0ECFF7A4319FF0000000000000000CD81
     435          47FFFFFEFEFFF87A46FFF96829FFF66525FFF16020FFF18653FFFFFEFEFFF0BF
     436          A8FFC55A24FFB64C15FFB75724FFFEFEFDFF7F481AFF0000000000000000CD84
     437          4EFFFFFEFEFFFC814CFFFF7031FFFF6B2CFFFD6928FFF86523FFF49265FFFDF5
     438          F1FFF4D4C5FFC65018FFBA5927FFFEFEFDFF834A1CFF0000000000000000D183
     439          4CFFFCF7F1FFFAA582FFFF733AFFFF844EFFFFAE8AFFFE6C2DFFF76727FFF192
     440          68FFFFFEFEFFE98354FFD78560FFF8F1ECFF81551FFF0000000000000000C483
     441          41FFF0DAC3FFFAD1C0FFFF7940FFFF986EFFFFFEFEFFFFC9B2FFFD9164FFFAC6
     442          AFFFFEF5F1FFF5773DFFEDC5B2FFE4CBB3FF905D21FF0000000000000000C484
     443          45FFDCA277FFFCF4EDFFFABFA6FFFF7A43FFFFBB9EFFFFF6F3FFFFFEFEFFFEED
     444          E5FFFA9970FFF3B69CFFF8F0E6FFBB8B56FF986426FF00000000000000000000
     445          0000C48443FFE5B999FFFCF4EDFFFBD2C1FFFAA887FFFD8757FFFD8454FFF8A5
     446          82FFF7CEBDFFFAF1E7FFD2A77AFFA36A2AFF0000000000000000000000000000
     447          000000000000C58442FFDCA277FFF3DAC7FFFCF7F1FFFFFEFEFFFFFEFEFFFCF4
     448          EDFFF1D6C0FFC7935DFFA66F33FF000000000000000000000000000000000000
     449          00000000000000000000C58444FFC28342FFD89C6DFFD69668FFD49463FFD696
     450          68FFB2793CFFB1783BFF00000000000000000000000000000000000000000000
     451          0000000000000000000000000000000000000000000000000000000000000000
     452          0000000000000000000000000000000000000000000000000000
     453        }
    129454      end
    130455      object MenuItem14: TMenuItem
     
    165490      Caption = 'Exit'
    166491      ImageIndex = 5
     492      OnExecute = AExitExecute
    167493      ShortCut = 32883
    168494    end
  • trunk/UMainForm.pas

    r2 r3  
    5252    ToolButton6: TToolButton;
    5353    ToolButton7: TToolButton;
     54    procedure AExitExecute(Sender: TObject);
    5455    procedure ARunExecute(Sender: TObject);
    5556    procedure FormCreate(Sender: TObject);
     57    procedure FormDestroy(Sender: TObject);
    5658    procedure FormShow(Sender: TObject);
    5759  private
     
    8183begin
    8284  BrainFuckInterpreter := TBrainFuckInterpreter.Create;
    83   BrainFuckInterpreter.Source := MemoSource.Lines;
     85end;
     86
     87procedure TMainForm.FormDestroy(Sender: TObject);
     88begin
     89  BrainFuckInterpreter.Free;
    8490end;
    8591
     
    8793begin
    8894  InterpreterForm.Show;
    89   BrainFuckInterpreter.Input := InterpreterForm.MemoInput.Lines;
    90   BrainFuckInterpreter.Output := InterpreterForm.MemoOutput.Lines;
     95  BrainFuckInterpreter.Input := InterpreterForm.MemoInput.Lines.Text;
     96  BrainFuckInterpreter.Source := MemoSource.Lines.Text;
    9197  BrainFuckInterpreter.Run;
     98  InterpreterForm.MemoOutput.Lines.Text := BrainFuckInterpreter.Output;
     99end;
     100
     101procedure TMainForm.AExitExecute(Sender: TObject);
     102begin
     103  Close;
    92104end;
    93105
Note: See TracChangeset for help on using the changeset viewer.