Parse
(Created page with "Most value types, for example Integer and Decimal has a function "parse" to convert a string into a value. ====== Example ====== You use it as follows; Decimal.parse('10')...")
 
No edit summary
Line 10: Line 10:
  Decimal.parse('x').isNull
  Decimal.parse('x').isNull
Returns true.
Returns true.
[[Category:OCLOperators]]
[[Category:OCL]]

Revision as of 07:27, 9 January 2023

Most value types, for example Integer and Decimal has a function "parse" to convert a string into a value.

Example

You use it as follows;

Decimal.parse('10')
Integer.parse('5')
Error handling

If the provided string isn't convertible to the type, the resulting value is NULL.

Decimal.parse('x').isNull

Returns true.

This page was edited 89 days ago on 02/10/2024. What links here