Is "IsNumeric" deprecated?

Using Java, with the latest release of App Studio. I’m trying to validate a variable (Comps) to confirm that it is a number. Here’s the syntax:

if(IsNumeric(Comps) ){
edtTotal.value = Math.round(Comps);
}

Here’s the error: Uncaught ReferenceError: IsNumeric is not defined. line 34 column 3

Is “IsNumeric” deprecated? It still appears in your language reference for Java. If it is deprecated, can you suggest another way of avoiding the “NaN” error?

Thanks!

IsNumeric would be a function YOU write… isNAN() is what JavaScript uses.

IsNumeric() is a function AppStudio has added for backwards compatibility with Visual Basic.

To include it in your project, check BASIC in the Libraries panel.

Screen Shot 2021-10-21 at 6.20.15 AM

Thanks for the answer (and solution). Just familiarizing myself with JS–catching up on newer languages from C/C++/8086-8052-PIC assembly/Delphi, etc…

Thanks for the reply. I ended up using isNAN(), as suggested by PPetree. I can’t find a “Libraries” panel…

The Libraries panel shows up when you highlight Project Properties and Global Code in the Project Explorer.

Thanks! I hadn’t seen that previously…