Subject arithmetic overflow errors
Author vbj34
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);

..