Question about select module and symbols

ward de jager's icon

In pure data when the arguments for a select module are words , it will only work when the incoming message is converted to a symbol ( needs the selector symbol)
Example : select module has argument 'this' , when sending it the message 'this' it won't work , appending a symbol object solves this .

See screenshot 1



In max however , it works straight out of the box , messages are routed accordingly .

Are these then converted to symbols automatically


👽'tW∆s ∆lienz👽's icon

Are these then converted to symbols automatically

yes, basically, this is specific to how certain objects are coded internally, 'select' just happens to be friendly to 'string'/symbols that way... other objects might require an identifier like '%s'(see 'regexp' helpfile) or '$s'(see 'if' helpfile) entered within its arguments/scripting-opcodes to prepare it for symbol input(sometimes you still need the 'fromsymbol' and 'tosymbol' objects to translate symbols in certain contexts, anyways... i can't think of one of these contexts easily because max has become very format-agnostic in recent years, it's much easier to handle data of all kinds now).

Roman Thilenius's icon

in max, "this" is a symbol (and you can not convert it to a symbol or type "this" into a trigger or messagebox for that reason.)

you only need [tosymbol] if there are spaces in a string, because those are of type list.

ward de jager's icon

yes "this" message is a symbol for the same reason why it's a symbol in pure data

But , for convenience sake , the print will NOT show it's a symbol neither in max or pure data , it will just print : "this "
And why does pd need an extra symbol to ge it into select if it's a symbol to begin with ?

It's small differences between these two that make me scratch my head



Roman Thilenius's icon

i agree with this: why is it so strange in pd. :) if i had to guess, they probably wanted to avoid that those words who are also messages to the object are "reserved" for that purpose.

[print] does never show you the type of data, but [printit] does.

where "message... with arguments" == data type list, "message" == data type symbol

ward de jager's icon

Interesting , but over here the printit object does not instantiate .

Is it deprecated ?

O.K , it's an external ( this should be included in the main package )