round
Declaration
double function round(double x, integer Y)
Description
round returns the double X rounded to precision Y where -304 <= Y <= 304.
Example Stored Procedure
CREATE PROCEDURE test_round (X DOUBLE PRECISION, Y INTEGER)
RETURNS (result DOUBLE PRECISION) AS
BEGIN
result = round(X, Y);
END!!
WISQL - calling the example stored procedure
execute procedure test_round( 723.123, 2)
RESULT
======================
723.12
execute procedure test_round( -723.123, 2)
RESULT
======================
-723.12
execute procedure test_round( -723.123, -2)
RESULT
======================
-700
execute procedure test_round( 723.123, -2)
RESULT
======================
700
Error Results - restrictions on Y are : -304 <= Y <= 304
execute procedure test_round( 723.123, 305)
RESULT
======================
-999999