[PD] what is a list? (symbols vs. floats)

Mathieu Bouchard matju at sympatico.ca
Fri Mar 19 18:04:50 CET 2004

On Sun, 14 Mar 2004, Hans-Christoph Steiner wrote:

> [list 1 2 3( is a list
> [1 2 3( is a list
> [list one two three( is a list
> [one two three( is NOT a list
> [one 2 3( is NOT a list
> [1 two three( is a list
> Ok, I can see that anything that starts with a float is automatically
> deemed a list, while anything that starts with a symbol is
> automatically deemed not a list unless cast as such.  This is
> confusing and I don't see the benefit.

A message has two parts, a selector and an argument list. it's like a
function call: "list 1 2 3" does something like call list(1,2,3) in the
context of an object and inlet. However, a selector must be a symbol, and
if it's not, then Pd has to fake it and pull something from somewhere. So
the rules are:

  single float messagebox -> selector "float"
  multi-element messagebox starting with float -> selector "list"
  any messagebox starting with a symbol -> selector is that symbol

In addition there are fallback rules so that if the function is not
defined, other calls are attempted. e.g. selector "float" vs single-float

Well, that's what I think it is... looks rather simple to me.

However, the docs may be a bit confusing wrt selector-vs-arguments
distinctions, and may call a selector a "first argument"... sigh

(Hey. I wrote all of this message days ago. And then I forgot to send
it. Silly me.)

Mathieu Bouchard                       http://artengine.ca/matju

More information about the Pd-list mailing list