Dear all, I tested the User-defined functions and found some potential errors. For example, my function is:
<script> function test (series y, int order[0:2:1], string option[null]) if option="nc" printf "%s\n","empty" else printf "%s\n","no options" end if end function </script> the argument, string option[null], above should indicate that the "option" string should be optional. After normally processing it as a package, I execute this function via GUI (the same via command line). If I choose the default "null" as automatically specified by gretl, I got an error: "The symbol 'otion' is undefined... error evaluating 'if' " If I type any other strings, it works as normal. If I give no string at all in the text box, gretl tells me: "Argument 3 (option) is missing" I also test it in the command-line console, for example, ? test(djclose,1,"nc") empty ? test(djclose,1) The symbol 'option' is undefined error evaluating 'if' ? test(djclose,1,"1") no options Are these normal or potential bugs? Yi-Nung