Incorrect expression evaluation with expr object in Pure Data

402 Views Asked by At

I'm trying to print string message once the expression is true, right now the output still prints a message though the expression is false. enter image description here

1

There are 1 best solutions below

1
On

Actually there is no problem with your expression, but the subsequent dataflow. The bang object [bng] converts any input to a bang message. Even though the expression is correct, the output 0 and 1 will both be converted into a bang. the bang is then printed into the console as "text":bang.

Replace the bang GUI with a [select 1] object and you are almost there.

This is a more Pd-like syntax:

Pd-style

Also: Please read Is there any reason to use vanilla Pure Data instead of Pd-extended?