<< Sets Sets complement >>

Scilab Scholar module for schools >> Sets > add_to_set

add_to_set

adds an element to a set

Calling sequence

set2 = add_to_set(e,set1)

Arguments

e

character string

ens1

set

set2

set

Description

The function add_to_set creates a new set set2 which is the set set1 to which is added the element e (a character string).

Note that if the element e belongs already to the set set1, the set obtained set2 is the same as the set set1.

Examples

set1=define_set("a","b","c")
set2=add_to_set("toto",set1)
set2=add_to_set("b",set1)

See Also

<< Sets Sets complement >>