Ignore:
Timestamp:
Jan 18, 2018, 1:30:58 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Now arrays of string and integer are supported and executed correctly by executor.
  • Added: IfNotEqual command.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/easy compiler/UFormMain.pas

    r148 r149  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   UTargetCode, USourceCode, USourceExecutor, USourceGenerator;
     9  UTargetCode, USourceCode, USourceExecutor, USourceGenerator, LCLIntf;
    1010
    1111type
     
    128128        Add('IfEqual Answer ''y''');
    129129        Add('Begin');
    130           Add('PrintLn ''Thats clear. It is ''');
     130          Add('Print ''Thats clear. It is ''');
    131131          Add('PrintLn AnimalName[I]');
    132132          Add('Break');
     
    136136        Add('Break');
    137137      Add('End');
    138       Add('PrintLn ''I am lost. What is the animal?''');
    139       Add('InputLn AnimalName[I]');
    140       Add('PrintLn ''Describe the animal for me. What is it like?''');
    141       Add('InputLn AnimalProperty[I]');
    142       Add('PrintLn ''Thank you. I will remember that animal.''');
    143       Add('Increment AnimalCount 1');
     138      Add('IfEqual I AnimalCount');
     139      Add('Begin');
     140        Add('PrintLn ''I am lost. What is the animal?''');
     141        Add('InputLn AnimalName[I]');
     142        Add('PrintLn ''Describe the animal for me. What is it like?''');
     143        Add('InputLn AnimalProperty[I]');
     144        Add('PrintLn ''Thank you. I will remember that animal.''');
     145        Add('Increment AnimalCount 1');
     146      Add('End');
     147      Add('Print ''Do you want to try again? (y/n)''');
     148      Add('InputLn Answer');
     149      Add('IfNotEqual Answer ''y''');
     150      Add('Break');
    144151      Add('PrintLn ''''');
    145152    Add('End');
     153    Add('PrintLn ''Bye''');
    146154    Add('End');
    147155  end;
     
    201209begin
    202210  MemoOutput.Text := MemoOutput.Text + Text;
     211  MemoOutput.SelStart := Length(MemoOutput.Text);
     212  //SendMessage(MemoOutput.Handle, EM_LINESCROLL, 0, MemoOutput.Lines.Count);
    203213end;
    204214
Note: See TracChangeset for help on using the changeset viewer.