From futur.dorko@gmail.com Sat May 24 06:32:04 2008 From: Stefano Balietti To: gretl-devel@gretlml.univpm.it Subject: [Gretl-devel] null list as parameter Date: Sat, 24 May 2008 12:32:00 +0200 Message-ID: <1c7d4a100805240332m47191b03l1d11873e9f41b4b7@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3920561240374799253==" --===============3920561240374799253== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit I had already mentioned this bug, but I can't find where. Anyway, it is still here. With a function declaration like this: function foo ( series a, scalar b[0::1], scalar c[0:2:1], const list d[null], scalar e[0:2:0]) I'm supposed to be able to invoke the function just with a simple: foo(a) where a is a a series obviously. Instead, gretl wants at least: foo(a,b,c,d) because does not accept the absence of the list, whereas it should be allowed by the [null] tag. Cheers. Stefano --===============3920561240374799253==-- From cottrell@wfu.edu Sat May 24 13:49:37 2008 From: Allin Cottrell To: gretl-devel@gretlml.univpm.it Subject: Re: [Gretl-devel] null list as parameter Date: Sat, 24 May 2008 13:49:17 -0400 Message-ID: In-Reply-To: 1c7d4a100805240332m47191b03l1d11873e9f41b4b7@mail.gmail.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5228476575426543754==" --===============5228476575426543754== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Sat, 24 May 2008, Stefano Balietti wrote: > I had already mentioned this bug, but I can't find where. Anyway, it > is still here. With a function declaration like this: > > function foo ( series a, scalar b[0::1], scalar c[0:2:1], const list > d[null], scalar e[0:2:0]) > > I'm supposed to be able to invoke the function just with a simple: > > foo(a) > > where a is a a series obviously. > > Instead, gretl wants at least: > > foo(a,b,c,d) Could you post a complete test case, please? I think there must be some special complication at work, because the following script works fine here: It prints: ? myfoo(sqft) Obs a 1 1065 2 1254 3 1300 4 1577 5 1600 6 1750 7 1800 8 1870 9 1935 10 1948 11 2254 12 2600 13 2800 14 3000 b = 1.00000 c = 1.00000 e = 0.00000 Allin. --===============5228476575426543754==-- From futur.dorko@gmail.com Sat May 24 18:11:18 2008 From: Stefano Balietti To: gretl-devel@gretlml.univpm.it Subject: Re: [Gretl-devel] null list as parameter Date: Sun, 25 May 2008 00:11:15 +0200 Message-ID: <1c7d4a100805241511u16862897jfda0289a332665c9@mail.gmail.com> In-Reply-To: alpine.LRH.1.10.0805241343560.2831@ricardo.ecn.wfu.edu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8591553332622706232==" --===============8591553332622706232== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Well, you are right that wasn't the problem. The problem was that the null list was passed to the ols command and it caused the error. Now the point is that the error message may mislead, and perhaps it should be changed. In fact, this way the ols produces the error msg: "Command has insufficient arguments" If that happens to a function (the case I thought) we have: "*function_name*: not enough arguments Command has insufficient arguments" The best would be having a similar msg for the ols as well: "*command_name*: not enough arguments Command has insufficient arguments" But that is far from being an urgent matter. Cheers. Stefano --===============8591553332622706232==-- From cottrell@wfu.edu Sat May 24 20:57:03 2008 From: Allin Cottrell To: gretl-devel@gretlml.univpm.it Subject: Re: [Gretl-devel] null list as parameter Date: Sat, 24 May 2008 20:56:52 -0400 Message-ID: In-Reply-To: 1c7d4a100805241511u16862897jfda0289a332665c9@mail.gmail.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8128059333466308538==" --===============8128059333466308538== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Sun, 25 May 2008, Stefano Balietti wrote: > Well, you are right that wasn't the problem. The problem was > that the null list was passed to the ols command and it caused > the error. Now the point is that the error message may mislead, > and perhaps it should be changed... Ah, there's a difference that should be resolved, between the gretlcli output and the GUI script output. Running the above with gretlcli produces: Command has insufficient arguments error on line 1 of function myfoo > ols a x gretlcli: error executing script: halting > myfoo(price) which seems to me fine. But it's true, in the GUI the error message is not so informative. Allin. --===============8128059333466308538==--