Recherche Google
OpenMusic 6 – User ManualAdvanced Visual Programming > Control Structures > Predicates
previous pagenext page

Predicates : Testing Relations and Properties

Predicate

The concept of predicate refers to a property, or a relation between two terms of a proposition.

Predicates are boolean operators : they verify that a proposition is true by returning "true" or "false" – "yes" or "no". In Lisp, "nil" means "false", and "t" means "true". As a convention, any non nil value is also interpreted as "true".

There are several types of predicates. Among them, algebraic predicates compare numbers, equality predicates test if two objects are identical, type predicates that test if an object belongs to a specific Lisp type, and so on.

In OM, predicates are often used as conditions for the execution of a program.

Arguments and Evaluation of Predicate Boxes

Predicates can take arguments directly from their inputs or from other boxes. They are evaluated like any other box. Evaluation returns either "t" or "nil".

Using Predicates in Conditional Structures
previous pagenext page
About...(c) Ircam - Centre PompidouMade with Scenari