Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
RealityV15.1Online Documentation (MoTW) Revision 7
NUM Function (DataBasic) (m618703+num_f.htm)
Determines whether an expression is a numeric value.
NUM(expression)
expression Any valid DataBasic expression or a string, substring, or value.
NUM returns a value of 1 (true) if expression evaluates to a number or a numeric string (see Numeric Data for the format of a numeric string).
NUM returns a value of 0 (false) if expression evaluates to a non-numeric string.
A null string is considered to be a numeric string.
A string containing a system delimiter is considered to be non-numeric.
A1=NUM(123) and A2=NUM("123")
Both assign a value of 1 to variable A1.
A2=NUM("ABC")
Assigns a value of 0 to variable A2.
A3=NUM("123":@AM:"321")
Assigns a value of 0 to variable A3, because @AM is an attribute mark.
IF NOT(NUM(VALUE)) THEN PRINT "NON-NUMERIC DATA"
Prints the message NON-NUMERIC DATA if VALUE is not a number or a numeric string.
IF NUM(I:J) THEN GOTO 5
Transfers control to statement 5 if the values of both I and J are numbers or numeric strings.