雪
雪球
Unregistered / Unconfirmed
GUEST, unregistred user!
从外界读进来的字符串想要转换为array of real,该怎么转啊?
var
i,n,j,k:intefer;
instring:string;
begin
instring:=memo1.text;
repeat
n:=pos(' ',instring);
tarray[j]:=copy(instring,1,n-1);
delete(instring,1,n);
j:=j+1;
until instring=null;
repeat
x[k]:=strtofloat(tarray);
k:=k+1;
i:=i+1;
until i=j;
已经定义x:array of real;tarray:array[1..100] of string;
这段程序为什么是错啊?
var
i,n,j,k:intefer;
instring:string;
begin
instring:=memo1.text;
repeat
n:=pos(' ',instring);
tarray[j]:=copy(instring,1,n-1);
delete(instring,1,n);
j:=j+1;
until instring=null;
repeat
x[k]:=strtofloat(tarray);
k:=k+1;
i:=i+1;
until i=j;
已经定义x:array of real;tarray:array[1..100] of string;
这段程序为什么是错啊?