How to test if string is numeric using Progress 4GL

Donna

Does Progress 4GL have a function for testing whether a string is numeric, like PHP's is_numeric($foo) function?

I've seen the function example at http://knowledgebase.progress.com/articles/Article/P148549 to test if a character in a string is numeric. Looks like it has a typo, btw.

But I would think the language would be a built-in function for this.

AquaAlex

Do not need a function can jsut do a straight conversion.

ASSIGN dNumber = DECIMAL(cNumber) NO-ERROR. 
IF ERROR-STATUS:ERROR THEN
DO:
    {Handle issues}        
END.

or if it is always whole numbers can use INTEGER instead of DECIMAL.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Progress 4gl format string with constants

How to match a records in progress 4GL?

** Invalid character in numeric input /. (76) - PROGRESS 4GL

How to assign content of a file to a string variable in progress openedge 4gl?

How do I call the procedure section from window application using asynchronous method on progress 4GL?

Progress 4GL: How to generate different log file name when multiple processes using the same Timestamp?

How to calculate yesterday records with today records using progress 4gl?

How to read a XML file and export an item using Progress 4GL

How to increase the performance for a module running parallely (using asynchronous method) in Progress 4gl Appserver?

Unable to connect to db using -pf in openEdge progress 4gl

How to 'group by' using variables in 4gl

How to list all lines in a field with Progress 4GL

How to hide form fields data? - PROGRESS 4GL?

How to store the data in database in chinese language on progress 4gl?

How to converts a character to decimal on progress 4GL?

How to fix Dynamic Query error for progress 4gl?

How to rethrow caught exception in progress 4gl?

Progress 4GL: How to find where a procedure is defined

How to send a SOAP headers in Progress 4GL

How can i get the same result in Progress 4gl?

How to make a multidimensional array in Progress 4GL?

How to export xml file in progress 4gl?

How do I count total lines and create new/Select sheet in one csv file using progress 4GL?

Datatype in progress 4gl

System.String:Format limited to 3 input in progress 4gl?

How to get the last comma separated data stored in a variable? - Progress 4gl

How fast can a file be written/read by progress 4GL program?

how to apply last key from a program itself without requiring a user input? - PROGRESS 4GL

How add only required fields from table to dynamic temp table? - PROGRESS 4GL