Re: Combining @ and [*] in one function call?

Chris Angelico <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <CAPTjJmo0APHnyPY1HjxC6EQu1C3zKOC6dshXmr9Y1izEiJ8jZw@mail.gmail.com>
On Fri, Apr 25, 2014 at 10:44 AM, Ralph Ritoch <[email protected]> wrote:
> Have you tried using parenthesis to control the order of operations?
>
>  colors = GTK2.GdkColor(@(color_defs[*]));
>
> This seems to work for me.

Yes, tried that. It does the exact same thing as not having the
parens. It does appear to "work" in the sense that it will be valid
code. It just isn't doing what I expect of it; and the most obvious
evidence of that is that the data type of the result is "object"
rather than "array(object)". (And if I do this in a context where a
'mixed' result is accepted, I then get "[*] not supported here".)

I'm doing this on Pike 8.0.1, built from a fairly recent trunk (plus a
few patches that haven't yet been accepted).

ChrisA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.