On Mon, 27 Jun 2011, Sven Schreiber wrote:
On 06/27/2011 05:35 PM, Allin Cottrell wrote:
>
> Sven (3):
>
> When I specify a function parameter with min/max and default values like
> this:
> 'int p[1::2]',
> on saving gretl seems to insert a trailing colon:
> 'int p[1::2:]'
>
> This doesn't seem to do any harm (which is also strange, isn't it?), but
> is it intended?
>
> Allin: This is not really a problem: the last colon demarcates the
> (possibly absent) "step" value. But it's maybe inelegant, and is
> now removed in CVS.
I don't know anything about the "step" value in this context, it
doesn't
seem to be in the manual.
It's new, and is described in my paper for the gretl conference.
I've now put this at
http://www.wfu.edu/~cottrell/tmp/extending.pdf
> But I get an error message:
> "Unrecognized sample command
> *** error in function samplecheck"
>
> Allin: The problem here is not specific to loops, it's specific
> to the use of "-p", which is a valid short-form option for the
> "smpl" command. Fix in CVS: insist on long-form options for smpl
> (i.e. don't interpret "-p" as an option flag).
Ah good catch. As I confessed at the conference, I wasn't really aware
of the short-form options. Would it be possible to have them
syntax-colored, too? Apart from general readability it would have
indicated the problem here in this case.
And also, what does 'smpl -p' mean, as there is no option starting with p?
It's short for --replace.
Oh, and just a gentle reminder that this is mildly
backwards-incompatible and should go on the respective log :-)
Well, in effect the short-form options are "secret": they're not
documented anywhere, and for commands with several options they are
not necessarily the first letter of the long version.
Allin