Default language.

PRECISION Function


Description: Counts the number of digits in the number and return an integer representing the count. The precision count includes digits to the left and right of the decimal point. Any characters other than a leading sign and decimal point will cause the value to be considered invalid.

Parameters: String

  • Source text: The string containing the number to be counted.

Return: Integer containing the total number of digits in the number. If the value is not a number, -1 will be returned.

Syntax: PRECISION(<source text>)

Example: Set the value in TNUM 1P to the number of digits in TNUM 1.

DE( "TNUM 1P" ).setValue
  (PRECISION(DE( "TNUM 1" ).getValue( ) ) );

{{export-indexterm primary="PRECISION function"/}}

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*