Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- db_VISTA III - d_ismember http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   D_ISMEMBER

SUMMARY
   d_ismember(SET [,dbn])
   int SET;
   int dbn;

ARGUMENTS
   SET         The set type for which the current record's membership will be
               checked.

   dbn         (optional) The number of the database containing the record

DESCRIPTION

   This function determines whether or not the current record is connected as
   a member of SET. If it is, the status S_OKAY is returned. If not, status
   S_EOS is returned.

-------------------------------------------------------------------
NOTE

   If the current record is a legal member of SET, d_ismember will
   return an error code of -19, which will in turn call dberr.

-------------------------------------------------------------------

CURRENCY CHANGES
   None

RETURN CODES

     0   S_OKAY             The current record is connected as a member
                            of SET.

     1   S_EOS              End of set. The current record is not
                            connected as a memeber of SET.

    -2   S_INVSET           Invalid set type. Probably passed a record or
                            field type instead of a set type.

    -7   S_NOCR             The current record is null.

   -19   S_INVMEM           Current record is not a legal member of SET.

EXAMPLE


  /* annual corporate awards */
  while (d_keynext(EMPLOYEE_ID)==S_OKAY) {
      if (d_ismember(DIVISION_MANAGER)==S_OKAY) {
         /* award fat dividend */
         ...
      }
      else if (d_ismember(DEPT_MANAGER)==S_OKAY) {
         /* award nice raise */
         ...
      }
      else {
         /* give a nice pat-on back */
      }
   }

See Also: d_isowner

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson