Dear Allin,
Are there automatized tools to check
the code?
One way is to search for 'ifs', but this
will not find such things as
series x = (y==1) + 2*(y==2)
Oleh
P.S. I have thousands of lines
to check!
9 лютого 2017, 23:42:13, від "Allin Cottrell" <cottrell(a)wfu.edu>:
This point has been the subject of discussion not so long ago
(sorry, couldn't find the reference before timing out!). But here I
take it up again.
For a long time, the gretl documentation has stated that testing for
equality should be done using "==" (two consecutive equals signs, as
in most programming languages). But also for a long time, we have
accepted a single equals sign for that purpose. The latter is now
officially deprecated (see
http://gretl.sourceforge.net/Backward.html ) because it makes it
difficult to produce correct error messages in some cases (plus it's
plain sloppy). And in current git you get a warning if gretl reckons
you're using '=' for an equality test.
Here's the problem: it turns out that several function packages use
'=' for testing equality, in some cases within loops that may have
many iterations. So if we keep the warning in place, and don't
revise those packages, users may end up seeing a huge spew of
warnings from packages that have been approved for public
consumption -- which doesn't seem good.
We could kick the can down the road by hushing the warning for the
next release. We could identify the packages in question and request
that their authors fix them. And/or we could fix the packages
ourselves (if the authors are non-responsive).
This raises a policy question. On a few previous occasions I have
fixed up somebody else's package (when the author has apparently
dropped out of circulation but the package seems to have some
merit). But is this something we want to get into?
Allin
_______________________________________________
Gretl-devel mailing list
Gretl-devel(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel