|
Returns number of lines in area |
|
area |
area where we count lines |
|
updating procedure ParseXRateReply(record RcVc RepSpec,Area a_reply)
begin
LongInt lines,l;
string 255 curncy,curncyname,units,rate,method,tstr;
record BaseCurBlock BCb;
record ERBlock ERb;
Date ratedate;
val ratev,unitsv;
BlockLoad(BCb);
BlockLoad(ERb);
lines = CountLinesInArea(a_reply);
for (l=2;l<lines;l=l+1) begin
tstr = GetLineFromArea(a_reply,l);
curncyname = ConvertStringFromCodePage("WINDOWS-1257",GetValue(tstr,0));
curncy = GetValue(tstr,1);
units = GetValue(tstr,2);
rate = GetValue(tstr,3);
ratedate = DateFromString(GetValue(tstr,4),"YYYY.MM.DD");
unitsv = StringToValue(units,M4Rate,"",",");
ratev = StringToValue(rate,M4Rate,"",",");
AddCurencyRate(RepSpec,BCb,ERb,curncy,curncyname,ratev,ratev,unitsv,ratedate);
end;
return;
end;
««