unit HixHistographFormUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, HixHistograph;
type
THixHistographForm =
class(TForm)
HixHistoGraph1: THixHistoGraph;
procedure FormShow(Sender: TObject);
private
{ Private-Deklarationen }
FileName :
String;
ASCIn : Textfile;
procedure ReadData(
var AscIn: TextFile; FileName:
String);
public
{ Public-Deklarationen }
ReadInArray:
Array of Real;
end;
var
HixHistographForm: THixHistographForm;
implementation
{$R *.dfm}
procedure THixHistographForm.ReadData(
var AscIn: TextFile; FileName:
String);
var
StrTemp :
String;
i, Code : integer;
RealTemp : Real;
begin
AssignFile(AscIn, FileName);
// öffne File
Reset(AscIn);
// Zeige auf ersten Wert
SetLength(ReadInArray, 0);
// beginne am Anfang des Array
i := 0;
while not eof(Ascin)
do // lese bis Dateiende
begin
ReadLn(AscIn,StrTemp);
Val(StrTemp,RealTemp,Code);
SetLength(ReadInArray, length(ReadInArray) + 1);
ReadInArray[i] := RealTemp;
i:=i+1;
end;
closefile(AscIn);
end;
procedure THixHistographForm.FormShow(Sender: TObject);
begin
FileName := '
o:\Delphi6\Student\HixHistograph\Abild1.asc';
ReadData(ASCIn,FileName);
HixHistograph1.DrawMeasureValue(ReadInArray);
end;
end.