【发布时间】:2013-03-13 14:40:22
【问题描述】:
我的程序需要一些帮助。我想将一些字符串保存在另一个过程中创建的字符串列表中。我该怎么做?
我在正确的地方写了一条评论以便更好地理解它。
procedure GetIniNamesWithoutExt(IniPfade: TStringList);
var
i, suchPunkt: integer;
ini: TIniFile;
Modul, fullFileName, IniName: String;
begin
try
for i := 0 to IniPfade.Count-1 do
begin
fullFileName := IniPfade.Strings[i];
Modul := ExtractFileName(fullFileName); // Dateiname aktueller Ini + .Ini Endung
suchPunkt := Pos('.', Modul);
IniName := Copy(Modul, 1, suchPunkt-1); // Aktueller Modulname ohne ini Endung
// Here should be the Code for saving the String "IniName" to a StringList which is created in procedure a. Procedure a calls the procedure GetIniNamesWithoutExt.
end;
finally
end;
end;
【问题讨论】:
-
我不确定您的意图是什么,但如果您要将修改后的字符串保存到作为参数传递的
IniPfade字符串列表中,只需通过IniPfade[i] := IniName;执行即可,但是我猜你的问题是关于其他的。 -
我在另一个过程“a”中创建了一个字符串列表,并希望将我的 var IniName 保存到过程 a 中存在的 StringList...
标签: delphi procedure delphi-xe3 tstringlist