Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

Welcome, Guest
Guest Settings

Thread: Strange problem in UDF

Permlink Replies: 0 Threads: [ Previous | Next ]
Flavio Dei

Posts: 1
Registered: 10/5/06
Strange problem in UDF
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 13, 2018 3:51 AM
Strange problem in UDF
during some tests of Interbase Dev Edition I encountered an error that I could not solve.
A UDF, inexplicably, on some occasions is to receive totally random input values. Restarting the server and running the same query that calls the UDF the problem disappears, writing in a text file the parameters that the UDF receives I find myself

this is the function:

double FL_UDF_IfCmRNum(char *formula, char *var1, char *var2, char *var3, char *var4, char *var5, double *valtrue, double *valfalse)

fldebug("IFCMRNUM: Parametri di Chiamata: Formula [%s] Variabili:[%s][%s][%s][%s][%s] Valore True/False [%f][%f]", formula, var1, var2,var3,var4,var5,valtrue,valfalse);
return (_eval_cond_expression_retnum(formula, var1, var2, var3, var4, var5, *valtrue, *valfalse));

in my log .....

[Tue Feb 13 09:35:14 2018]:{IFCMRNUM: Params IN: [SEGNO='+'] Variabili:[SEGNO;'-'][][][][] Valore True/False [11236495781402946559701975835242168952973875686022034013476777262972269954255764818198971729957495414891958682842986666091962921057579948956421973147123712,000000][0,000000]}

The input value received from query for the the parameter "valtrue" in query is 1 and 0 for the valfalse.
The value pass to function is calculate with a subquery !

S.O. Linux Centos 7 but have same problem with Windows 10 and Server 2012 ,not in Windows 7, XP, Server 2003 Linux Centos 6.x.
Interbase Version: InterBase XE7 Devel Edition

Thank's in advance!

Edited by: Flavio Dei on Feb 13, 2018 5:30 AM

Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02