Converts the string representation of a double value to the string representation of an integer.

C Language

int lr_convert_double_to_integer( char *source_param_name, char * target_param_name );
Example: lr_convert_double_to_integerParameter Functions


source_param_name The name of the parameter containing the double to be converted.
target_param_name The parameter to contain the output integer.

lr_convert_double_to_integer converts the string representation of a double value to an integer string by discarding the fractional part of the double. The target parameter is created if it does not exist.

If the input string is not a pure number string, as many characters as possible are converted. The rest are ignored. A string that does not begin with a character that can be converted causes an error.

For example:

  • “1234ABCDF” is converted to 1234.
  • “312.123.32.23123” is converted to 312.123 .
  • “LoadRunner” and “ABC123PC” cause errors.

Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.


Standard parameterization is not available for this function.