cstr_to_dbl

Declaration

double function cstr_to_dbl(cstring S)

Description

cstr_to_dbl converts string S to a double. The string can consist of:

[white space][sign][ddd][.][ddd][e|E[sign]ddd] where items between the "[ ]" are optional.

Example Stored Procedure

CREATE PROCEDURE test_cstr_to_dbl(S char(20))

RETURNS (result double precision) AS

BEGIN

result = cstr_to_dbl(S);

END!!

WISQL - calling the example stored procedure

execute procedure test_cstr_to_dbl("-3.21");

RESULT

======================

-3.21

execute procedure test_cstr_to_dbl("-3.21e2");

RESULT

======================

-321