FB 6.0.0.2068, more for completeness, another legacy bug, Udfs are deprecated of course and this could be rewritten as UDR. The same udf runs fine in FB5.
declare external function FOO
cstring(100), cstring(4096)
returns parameter 2
entry_point 'foo'
module_name 'my_udf';
select foo('abc') from rdb$database;
SQL Message : -804
An error was found in the application program input parameters for the SQL statement.
Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -804
Data type unknown
FB 6.0.0.2068, more for completeness, another legacy bug, Udfs are deprecated of course and this could be rewritten as UDR. The same udf runs fine in FB5.