Thanks for fixing it that quickly, Allin. It works fine now.

> function void latextab (matrix M1, string S1, string S2)
Actually the expression already included "void" here, but I forgot to add it in the example.

Best,
Artur


2014-06-22 16:28 GMT+02:00 Allin Cottrell <cottrell@wfu.edu>:
On Sun, 22 Jun 2014, Artur T. wrote:

> I updated gretl to latest cvs and obtained an error which did not
> occur using a previous version from last week.
>
> The function I have includes string arguments which are stated as
> something like:
>
> function latextab (matrix M1, string S1, string S2)
>
> As said, I obtain the following message now:
>
> <ERROR>
> latextab: argument 15 is of the wrong type (is string, should be strings)
> Data types not conformable for operation
> </ERROR>
>
> It may be related to the latest "array" function where an array of
> STRINGS can be used as mentioned in Allin's news on "CVS news, part 2".
> Does this mean that the function has to be re-written to something like:
> function latextab (matrix M1, strings S1, strings S2)

Thanks for the report. No, it's still perfectly OK to have a
function with arguments of type "string" (although "strings" in the
plural is now also an option).

I'm afraid a introduced a typo yesterday that is responsible for the
mix-up you cite. That's now fixed in CVS.

However, the line

   function latextab (matrix M1, string S1, string S2)

should in fact produce an error:

> function latextab (matrix M1, string S1, string S2)
Missing function return type

This is because we're no longer supporting old-style function
definitions (pre gretl 1.8.4) that do not state the return type
before the name of the function (or "void" for no return value).
That is, if "latextab" doesn't return anything its definition must
start

function void latextab (matrix M1, string S1, string S2)

Please see http://gretl.sourceforge.net/Backward.html and the
chapter on User-defined functions in the current Guide.

Allin

_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel