notin

From the SETL Wiki

Revision as of 00:24, 7 October 2008 by Finnw (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search
notin
Category relational
Syntax infix
Compatibility
CIMS SETL yes
SETL-S yes
SETL2 yes
GNU SETL yes

Contents

Purpose

Test for non-membership of a set or tuple

Synopsis

 x notin s

Description

Returns false if

  1. x is an element of the tuple s,
  2. x is a member of the set s or
  3. x is a substring of the string s.

Otherwise returns true.

Examples

  1. 1 notin {1, 2, 3}
    

    Result: false

  2. 4 notin {1, 2, 3}
    

    Result: true

  3. 4 notin [1, om, 3]
    

    Result: true

  4. om notin [1, om, 3]
    

    Result: false

See also