"isnumber" function coming to a build near you

isnumber will be available soon. I had originally intended to add an isstring/isexpr, but I decided the simpler way to handle those would be just testing for !isnumber. let me know if the need arises for expression detection.

Selina

working fine :mrgreen:

Expression detection would be nice one day, but I think for now I have a workaround (as I use string mode in evaluate DAT, all expressions in my DATs have ``, so I can test for those).

Hey Selina,

this works fine when passing the result of tab() to isnumber, but what’s the syntax for checking a parameter?

If “/null1/tx” is $F, then
isnumber(par(“/null1/tx”))
fails , as par already evaluates the parameter. Noevals doesn’t make a difference.

Thanks
Achim

maybe a parsraw is in order. noevals wouldn’t work because the string that comes out of pars is already evaluated.

Selina

parsraw would be great!

For now I found a solution using

isnumber(parmlsvar("/null1/tx", "CM_EXPRCHECK")) 

but it has some update problems when used in a CHOP. If I put it in a constant CHOP I would need to force a cook on the constant CHOP when “/null1/tx” is changed. Might be a bug and related to the par() bug I just posted.

Achim