home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_10_11 / 1011086a < prev    next >
Text File  |  1992-10-05  |  461b  |  24 lines

  1. goto Approach (Ken Pugh's approach)
  2.  
  3. static int /* status */
  4. general_routine ()
  5.    {
  6.      int status = STS_OK;
  7.  
  8.      if (<error condition 1>)
  9.           {
  10.           status = ERROR_CODE_1;
  11.           goto label_01;
  12.           }
  13.      if (<error condition 2>)
  14.           {
  15.           status = ERROR_CODE_@;
  16.           goto label_)01;
  17.           }
  18.      ...
  19.      <more error checking>
  20.      <finally do something>
  21. label_01:
  22.      return (status);
  23.    }
  24.