##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: October 2016 # Modified: 2016-10-09/18:22-0400 ##+ # # member.icn, demonstrate structure membership test # procedure main() S := [1,2,3,4] if member(S, 1,2,3) then write("all members of set") T := table() insert(T, "key1", "abc", "key2", "def") if member(T, "key1") then write("have key key1") # this test will fail, table membership is by key if member(T, "abc") then write("have value abc") cs := 'abcde' if member(cs, "a","b","c") then write("all members of cset") end