On Tue, 5 Aug 2014, Allin Cottrell wrote:
On Mon, 4 Aug 2014, Logan Kelly wrote:
> Quick suggestion. Could a function called varnames() be added that is
> like varname() except it returns an array with the names of variables in
> a list. For example:
varname() already does that, except that since it predates string arrays
what it returns when given a list argument is a single string containing
the names of the member series separated by commas.
If we're serious on arrays (as I think we should be), we should have all
functions with similar purposes return arrays. Clearly, this introduces
the issue of backward compatibility. Would you consider it useful to have
a function turning a space (or comma, ot tab, or whatever) separated
string into a string array? This way, you could preserve backward
compatibility for old scripts but also enjoy the power and flexibility of
array, as in
<hansl>
list X = a b c
string moo = varname(X)
strings boo = strtoarr(moo, ",")
</hansl>
in (what I hope is) obvious notation.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------