home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / hcshdemo.zip / csh-os2.zip / SAMPLES / MEMBER.CSH < prev    next >
Text File  |  1994-02-11  |  286b  |  15 lines

  1. #    Determine if first argument word appears somewhere in the list given
  2. #    by the second argument.
  3.  
  4. #    Copyright (c) 1994 by Hamilton Laboratories.  All rights reserved.
  5.         
  6. proc member ( a, b )
  7.     local i
  8.     foreach i ($b)
  9.         if (a == i) return 1
  10.     end
  11.     return 0
  12. end
  13.  
  14. member $argv
  15.