ADELIA |
VADELIA |
SADELIA |
WADELIA |
EADELIA |
(I/B) |
(I/B) |
(B) |
(I/B) |
(B) |
Description
This predefined function is used to check whether a character string is entirely numeric.
A field is numeric if it contains only characters between 0 and 9.
Syntax
Result = &NUMERIC(String)
Parameters
|
Description |
Contents |
Controls |
Result |
One-position alphanumeric variable. |
Possible values: 0 Not numeric 1 Numeric |
|
String |
Alphanumeric constant or variable. |
Character string on which the function is to be run. |
Mandatory parameter. |
Note: Blank spaces that may appear at the end of the string are not taken into account. If the field contains only blank spaces, it will be considered as a numeric field.
Example
STRING = '123456789'
TEST_NUM = &NUMERIC(STRING)
*
* TEST_NUM is equal to 1 (numeric).
*
STRING = '123 56789'
TEST_NUM = &NUMERIC(STRING)
*
* TEST_NUM is equal to 0 (non numeric).
*
STRING = '1234567 '
TEST_NUM = &NUMERIC(STRING)
*
* TEST_NUM is equal to 1 (numeric).
List of predefined functions by topic
↑ Top of page Copyrights Ι ©Hardis Group 2025 - Any partial or total reproduction of the content, not expressly authorized by Hardis Group, is strictly prohibited.