Thema: Delphi Arrays vergleichen

Einzelnen Beitrag anzeigen

Benutzerbild von nailor
nailor

Registriert seit: 12. Dez 2002
Ort: Karlsruhe
1.989 Beiträge
 
#6
  Alt 15. Jan 2003, 20:30
@sakura:
Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TType = array[0..3] of byte;
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  a: TType = (1,2,3,4);
  b: TType = (1,2,3,4);

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
if a = b then close;
end;

end.
--> [Error] Unit1.pas(31): Operator not applicable to this operand type

@Daniel: Das kann ich selber, aber dafür bin ich zu faul. Ich will eine einzige Abfrage, um zu wissen, ob die Dinger gleich sind.[/quote]
Michael N.
http://nailor.devzero.de/code/sharpmath/testing/ --- Tests, Feedback, Anregungen, ... aller Art sehr willkommen!
::: don't try so hard - it'll happen for a reason :::
  Mit Zitat antworten Zitat