begin
label1.Caption:='悄槐明岩HELLO WORD!'启槐友
end
//加个opendialog,代码不难,应该看得明白带拆银var
p :PChar
i,n :Integer
list :TStringList
str :string
begin
if opendialog1.execute then
begin
list := TStringList.Create
list.LoadFromFile(opendialog1.FileName)
str := list.Text
p := PChar(str)
while p^ <>蠢宴 #0 do
begin
case p^ of
'0'..'9':
else p^ := #32
end
Inc(p)
end
list.clear
list.Delimiter := #32
list.DelimitedText := str
n := 0
str := ''御弊
for i := 0 to list.Count - 1 do
begin
n := n+strtoint(list.Strings[i])
if str = '' then
str := list.Strings[i]
else
str := str+'+'+list.Strings[i]
end
list.Free
showmessage(inttostr(n)+'='+str)
end
end
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)