On Tue, 20 Sep 2016, Sven Schreiber wrote:
Hi,
print b.s
doesn't work if s is an array of strings inside the bundle b.
(It works if I make a temp copy first, for example 's = b.s', so it looks
like a bug.)
In response to this I looked at the help page for "print". Sadly, I
found that it was out-of-date in some respects, and neither as
explicit nor as well cross-referenced as it should be. That's now
fixed in git (and the pages for "printf" and "eval" are also
improved).
Anyway, here's the executive summary: "print" is not designed to do
what you want here; use eval or printf instead. The "print" command
wants:
* a list (named, or given in extenso) of one or more series, plus
some options (its original and primary purpose); or
* a single string literal; or
* a space-separated list of names of non-series variables (scalars,
strings, matrices, bundles, arrays).
This command doesn't do any evaluation, including evaluation of
members of bundles, or elements/ranges of matrices or arrays.
One may perhaps wish this were otherwise, but it's the status quo
(has been for some time) and it's now properly documented.
Allin