Table of Contents
Previous Sample | List of Samples | Next Sample

Member.csh


#  Determine if first argument word appears somewhere in the list given
#  by the second argument.

#  Copyright (c) 1994 by Hamilton Laboratories.  All rights reserved.
      
proc member ( a, b )
   local i
   foreach i ($b)
      if (a == i) return 1
   end
   return 0
end

member $argv



Previous Sample | List of Samples | Next Sample
Table of Contents



Copyright © 1988-2003 by Hamilton Laboratories. All rights reserved.