Page 360 - Handbook Of Multiphase Flow Assurance
P. 360

Computer code (Makogon, 1994, 1997)              359

                  short:=true;
                  goto S1;
                  end;

                if (snext=finish) and (ns<dist) then
                  begin
                  short:=true;
                  goto S1;
                  end;

                if ns<dist then goto S4;
                SChoice;
                scontin:=false;
                ks:=1;
                for js:=1 to ns do          {get number of links to use in new path}
                  if srinn[js] then              {from old path}
                   begin
                   ks:=js;
                   scontin:=true;
                   end;
                ns:=ks;
                if(not scontin)or(ns=1)then goto S3;
                                                 {if no branches left,goto next sbond}
                for js:=ns+1 to nmax div 2 do
                  begin                          {reset the rest of temp. short circ.}
                  srin[js]:=0;
                  sbonds[js]:=0;
                  srinn[js]:=false;
                  srinm[js]:=0;
                  end;
                found:=true;
                snext:=nhb[srinm[ns],1];
                if srin[ns]=snext then
                  snext:=nhb[srinm[ns],2];
                sbonds[ns]:=srinm[ns];
                goto S2;
                end;                             {end of repeat–loop}
              until ns>=dist;                    {end search not giving short circuit}

            { if not proceed then goto S3;       {program never gets here}
            { SChoice;                           {this part was intended to continue}
            { ns:=dist−1;                        {search if ring weren't closed}
            { goto S2;  }
   355   356   357   358   359   360   361   362   363   364   365