Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?



The NUM function is used to test arguments for numeric values. It takes the general form:


Where expression may evaluate to any data type.

If it is found that every character in expression is numeric then NUM returns a value of Boolean TRUE. If any character in expression is found not to be numeric then a value of Boolean FALSE is returned. 


To execute user code migrated from older systems correctly, the NUM function will accept both a null string and the single characters ".", "+", and "-" as being numeric. Also, if running jBASE BASIC in ros emulation the "." , "+" and "-" characters would not be considered numeric.

An example of use is as: 

    INPUT Answer,1
    IF NUM (Answer) THEN BREAK ;* Exit loop if numeric

The above will ensure the program only exits when a numeric value is entered.

Go back to jBASE BASIC.

Was this article helpful?