@IsNotMember (JavaScript)

Indicates if a list does not contain a string or strings.

Defined in

@Functions (JavaScript)

Syntax

@IsNotMember(value:any, list:any) : int

@IsNotMember(value:string, list:any) : int

Parameter Description
value A string or list of strings. The value or values must match list elements exactly, including case, for the value to be in the list.
list The list to check against.
Return value Description
int 1 if list does not contain value, 0 otherwise. Where value is a list, all elements of value must be absent from list for the result to be 1.

Examples

This example tests a list to see if it does not contain strings and other lists. The first, third, and fourth tests are true. The second and fifth tests are false.
function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var cities = new Array("Paris", "Berlin", "London", "Moscow");
var cities1 = new Array("Berlin", "Moscow");
var cities2 = new Array("Berlin", "Vienna");
var cities3 = new Array("Madrid", "Vienna");

if(@IsNotMember("London", cities) == @True()) {
	p("London is not member");
} else {
	p("London is member");
}

if(@IsNotMember("Vienna", cities) == @True()) {
	p("Vienna is not member");
} else {
	p("Vienna is member");
}

if(@IsNotMember(cities1, cities) == @True()) {
	p(@Implode(cities1, "-") + " is not member");
} else {
	p(@Implode(cities1, "-") + " is member");
}

if(@IsNotMember(cities2, cities) == @True()) {
	p(@Implode(cities2, "-") + " is not member");
} else {
	p(@Implode(cities2, "-") + " is member");
}

if(@IsNotMember(cities3, cities) == @True()) {
	p(@Implode(cities3, "-") + " is not member");
} else {
	p(@Implode(cities3, "-") + " is member");
}