[route] problem

Rui Caldas's icon

Hi

I'm building an patch capable of read an sentence and tell if the sentence's syntax is correct, but when the item is an number, int or float, the route object do not let the message to continue it's way!

Any thing wrong with this? or it's an [route] problem?

Max Patch
Copy patch and select New From Clipboard in Max.

Thanks

Luke Hall's icon

Because "3 p" begins with a number and has more than one item it is considered to be a list rather than a number. Try a combination of [route list] and [zl slice 1] as in the example below. I hope it helps.

lh

Max Patch
Copy patch and select New From Clipboard in Max.

Rui Caldas's icon

At some point, it solves the problem but not entirely!

if the user do not enters an number but anything else, the patch will say "good syntax"

Check this!

Max Patch
Copy patch and select New From Clipboard in Max.

Rui Caldas's icon

... but the point is.... I've made the same thing with MAX4.6 and I don't remember this problem...it worked (long time ago!) I just don't understand why MAX5 doesn't!

Maurizio Giri's icon

Hi Rui, see if this is what you need

m

Max Patch
Copy patch and select New From Clipboard in Max.

Zachary Seldess's icon

Hi Rui,

And this works as well.

best,
Zachary

Max Patch
Copy patch and select New From Clipboard in Max.

Rui Caldas's icon

Hi

Those solutions work well.

Since this is not an "realtime" application, it will only to check syntax and translate to "realtime code", the complexety of the patch is not important.

I guess that I'll combine your two ways and add an extra feature: the capability to change what's being checked!

When it's ready I'll post here... that could be useful for anyone!

Anyway... Thanks alot!