IsNumber
PowerScript function
Description
Reports whether the value of a string is a number.
Syntax
|
1 |
IsNumber ( string ) |
|
Argument |
Description |
|---|---|
|
string |
A string whose value you want to test to determine whether |
Return value
Boolean.
Returns true if string is a valid PowerScript number and false if it
is not. If string is null, IsNumber returns null.
Usage
Use IsNumber to check that text in an edit control can be converted
to a number.
To convert a string to a specific numeric datatype, use the Double,
Dec, Integer, Long, or Real function.
Examples
This statement returns true:
|
1 |
IsNumber("32.65") |
This statement returns false:
|
1 |
IsNumber("A16") |
If the SingleLineEdit sle_Age contains 32, these statements store 32
in li_YearsOld:
|
1 2 3 4 |
integer li_YearsOld IF IsNumber(sle_Age.Text) THEN li_YearsOld = Integer(sle_Age.Text) END IF |
See also
IsNumber method for DataWindows in IsNumber in DataWindow Reference in DataWindow
Reference.