PDA

View Full Version : Funtioning of the funtion



OnAtul
05-27-2004, 05:20 AM
HI friends

can anyone explain me what this user efined install script 7.0 function is trying to do?

An explanation from you will be highly appreciated

function GetFromLang(szFile,szSection,szName,svString)
STRING svTemp1,svTemp2,svTemp3;
LIST listTemp;
begin

svString = "";
GetProfString(szFile,szSection,szName,svTemp1);
listTemp = ListCreate(STRINGLIST);
StrGetTokens(listTemp,svTemp1,"||");
if (ListCount(listTemp)!=0)then
ListSetIndex(listTemp,LISTFIRST);
ListCurrentString(listTemp,svTemp2);
ListDeleteString(listTemp);

while(ListCount(listTemp)!=0)
ListSetIndex(listTemp,LISTFIRST);
ListCurrentString(listTemp,svTemp3);

if (svTemp3 != "|") then
svTemp2 = svTemp2 + " "+svTemp3;
svTemp3 = "";
endif;
ListDeleteString(listTemp);
endwhile;
svString = svTemp2;
else
svString = svTemp1;
endif;
end;//End of GetFromLang function

smurthy
06-11-2004, 10:00 AM
Atul,

this script is processing a file which has this format:

[section name]
name=a || b || c || d |

The function is returning the string as "a b c d" without the separator characters.

Hope this helps