Procedure Deletesibling;

{***************************************************************************}

var

  Gonesibling: integer;

  alpha,

  bravo: integer;

  Gender: char;

  Father,

  Mother,

  NumChildren, NumSpouses, NumSiblings: integer;

begin

  clrscr;

  ReadPos(PresentRec, Gender, Father, Mother, NumChildren, NumSpouses, NumSiblings);

  writeln('0) None of these');

  for alpha := 1 to NumSiblings do

    WriteName(sibling[alpha]);

  writeln;

  write('Delete which sibling?:  ');

  readln(Gonesibling);

  if Gonesibling <> 0 then

    begin

      bravo := 0;

      for alpha := 1 to NumSiblings do

        begin

          if sibling[alpha] = Gonesibling then

            bravo := alpha;

        end;

      if bravo <> 0 then

        begin

          NumSiblings := NumSiblings - 1;

          for alpha := 1 to NumSiblings do

            if alpha >= bravo then

              sibling[alpha] := sibling[alpha+1];

          EnterPos(Str3(PresentRec), Gender, Father, Mother, NumChildren, NumSpouses, NumSiblings);

          writeln('The sibling was deleted.');

        end

      else

        writeln('No sibling was deleted.');

    end

  else

    writeln('No sibling was deleted.');

  PoliteWait;

  clrscr;

  ReadDat(PresentRec);

end;

