Subject | Re: [firebird-support] arithmetic overflow errors |
---|---|
Author | Ivan Prenosil |
Post date | 2004-08-19T16:41:14Z |
I copy-pasted your example and no error here ...
Why do you have commented-out FREE_IT keywords ?
It will leak memory.
Ivan
Why do you have commented-out FREE_IT keywords ?
It will leak memory.
Ivan
----- Original Message -----
From: "vbj34" <vbj34@...>
To: <firebird-support@yahoogroups.com>
Sent: Thursday, August 19, 2004 6:23 PM
Subject: [firebird-support] arithmetic overflow errors
> Hello,
>
> I keep getting arithmetic overflow errors trying to take the leftmost
> 80 char from a 1024 char variable and assign to a 80 char variable.
> I'm using freeudflib redeclared with 1024 char parameters. What is
> the right way to accomplish this? Thanks.
>
> declare external function f_BiglrTrim
> cstring(1024)
> returns
> cstring(1024) /* free_it */
> entry_point 'lrTrim' module_name 'FreeUDFLib.dll';
>
> declare external function f_BigLeft
> cstring(1024), integer
> returns
> cstring(1024) /* free_it */
> entry_point 'Left' module_name 'FreeUDFLib.dll';
>
> CREATE PROCEDURE TEST
> AS
> DECLARE VARIABLE bigcomment VARCHAR(1024);
> DECLARE VARIABLE smallcomment VARCHAR(80);
> BEGIN
>
> /* Cause arithmetic overflow errors */
> smallcomment = f_bigleft(f_biglrtrim(bigComment),80);
>
> ..