御 御风而行 Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-06 #1 DELPHI里有这个str函数,说是可以把数值转换成字符窜,但我这么用:str(i);i是个数,想把i变成字符窜,但老提示过不去,请问这个函数正确应该怎么样用啊~ 我是个初学者,多谢啊~
S stuwe Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-06 #3 procedure Str(X [: Width [: Decimals ]] var S); 參數都錯了﹐怎么有可能過呢
H hellfire2008 Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-06 #5 看Delhpi例子 function MakeItAString(I: Longint): string; { Convert any integer type to a string } var S: string[11]; begin Str(I, S); Result:= S; end; begin Canvas.TextOut(10, 10, MakeItAString(-5322)); end;
看Delhpi例子 function MakeItAString(I: Longint): string; { Convert any integer type to a string } var S: string[11]; begin Str(I, S); Result:= S; end; begin Canvas.TextOut(10, 10, MakeItAString(-5322)); end;