diff options
-rw-r--r-- | fhunit.pas | 27 |
1 files changed, 21 insertions, 6 deletions
@@ -29,8 +29,8 @@ type public constructor create; destructor destroy; override; - function lade(s: string): boolean; - function schreibe: string; + function lade(s: string): boolean; inline; + function schreibe: string; inline; property zeit: extended read _uZeit; property mW[mG: tMessGroesze]: extended @@ -40,12 +40,13 @@ type tMessPunkteListe = class private inhalt: tFPList; - function rItem(i: longint): tMessPunkt; - function bisekt(zeit: extended): longint; + function rItem(i: longint): tMessPunkt; inline; + function bisekt(zeit: extended): longint; inline; public constructor create; destructor destroy; override; - function add(s: string): boolean; + function add(s: string): boolean; inline; + function append(s: string): boolean; inline; function last: tMessPunkt; function count: longint; property items[i: longint]: tMessPunkt @@ -286,6 +287,20 @@ begin nm.free; end; +function tMessPunkteListe.append(s: string): boolean; +var + nm: tMessPunkt; +begin + result:=false; + nm:=tMessPunkt.create; + if not nm.lade(s) then begin + nm.free; + exit; + end; + result:=true; + inhalt.add(nm); +end; + function tMessPunkteListe.last: tMessPunkt; begin result:=items[count-1]; @@ -465,7 +480,7 @@ begin else f.loadFromFile(von); while f.readln(s) do - werte.add(s); + werte.append(s); f.free; if length(muts)=0 then begin |