Y
yzy88nihaoma
Unregistered / Unconfirmed
GUEST, unregistred user!
我的INI结构是这样的:<br>[user1]<br>password=YES<br>password1=NO<br>password2=OK<br>password3=HAO<br>password4=BA<br>下面是我的代码部分. <br> s1:= TStringList.Create;<br> ini := Tinifile.Create(extractfilepath(application.exename)+'myini.ini');<br> A:=ini.ReadString('user1','password','无此值');//测试部分,取到YES正常.<br> showmessage(A);<br> try<br> ini.ReadSection('user1',s1);//读每个section下的value<br> for i := 0 to s1.Count - 1 do<br> begin<br> Showmessage(s1);//取到password,password1等也正常.<br> Space:=ini.ReadString('user1','s1','无此值');//全部为空?打印出来'无此值'.为什么?<br> showmessage(Space);<br> end;<br> finally<br> ini.Free;<br> s1.Free;<br> end;<br>end;<br><br>问题我在注释里面写好了,帮忙看下,为什么出现那种情况?谢谢啊