Table of Content
HAL Forum
procedure ResetLoop (
record recordname)
Description:
Resets record pointer, is used before LoopMain, LoopKey, ReadFirstMain, ReadFirstKey when you apply to one and the same register many times in one function
Parameters:
recordname argument of record type
function boolean CheckDispGroupsInINVc(record INVc INr,var string wctype)
begin
  boolean res,found;
  record ITVc ITr;
  record DIVc DIr;
  integer typeam,i,clam,j;
  string 5 ctype,cclass;
  
  res=true;
  wctype="";
  ITr.Code=INr.Group; 
  if (ReadFirstMain(ITr,1,true)) then begin
    if (nonblank(ITr.ClassType)) then begin
      typeam=CountObjects(ITr.ClassType); 
      clam=CountObjects(INr.DispGroups); 
      for (i=1;i<=typeam;i=i+1) begin
        ExtractElemFromSet(ITr.ClassType,i,ctype);
        found=false;
        for (j=1;j<=clam;j=j+1) begin
          ExtractElemFromSet(INr.DispGroups,j,cclass);
          ResetLoop(DIr);
          DIr.Code=cclass;
          if (ReadFirstMain(DIr,1,true)) then begin
            if (DIr.CType==ctype) then begin
              found=true;
              j=clam+1;
            end;
          end;
        end;
        if (not (found)) then begin
          res=false;
          wctype=ctype;
          i=typeam+1;
        end;
      end;
    end;
  end;
  CheckDispGroupsInINVc = res;
  return;
end;
Related topics:
««