Kevin Ryde on Sun, 22 Nov 2015 07:08:32 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: Vector of args
- From: Kevin Ryde <user42_kevin@yahoo.com.au>
- Date: Sun, 22 Nov 2015 17:02:41 +1100
- Delivery-date: Sun, 22 Nov 2015 07:08:32 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s2048; t=1448172491; bh=/jVhtUmsawKpijRfffDavxLM5WgW4hNQpIOmrZOEfK8=; h=From:To:Subject:References:Date:In-Reply-To:From:Subject; b=OUrqXX25bcbe8mqU6NMLqNjlafrZsriub0engu/mK8p6ecwzgOG8qrK7Bw4M9/9SNjmzyE2vdhiUGtaHwvaKsnbkGh4wXn1EKIyVXD5WgxCLLEuR0e+rsuUxrqGs6XYDhS1revBFjJ7OLiydLHI/2MDl8ZUScbA9cQFRfPMT3cpmZRDnkQGooOB3kxVZcPxiS4ze1/TCX4PSzyVjIhvLRYsWM2h4kGW9OWXQwrN9vr4oyA9msim40j10mNGiXymsW1oYgV0IsJoiVjuIiRR/EZijF85vwTAGuYl63GcEvpYf2CHo2mKCB/ukskRH3AMxJ3F7YsDPhdU6igDIpblFmQ==
- In-reply-to: <20151112131422.GA13589@yellowpig> (Bill Allombert's message of "Thu, 12 Nov 2015 14:14:22 +0100")
- Organization: Bah Humbug
- References: <CAMLkfFRwVfWaEz1Q8v8235f0BFBw=Hv-vZtiBA3hOTjdfKV4Tg@mail.gmail.com> <20151019171113.GG23787@yellowpig> <CAMLkfFRznhScOo0-nwNKsuiWE=E_bk0UOsTY3acfziqNvY3NaA@mail.gmail.com> <20151019212452.GA32274@yellowpig> <CAMLkfFRznhU+AWXezqA90oCXRJkSJN9ypbg2tyAkCF8sSc8haQ@mail.gmail.com> <20151020230211.GB6460@yellowpig> <878u666zkz.fsf@blah.blah> <CAMLkfFSiz-rZqJuidt3np+p6JrhxXFSkBbPPONNmSiEfzVo=Yg@mail.gmail.com> <20151110222443.GA2392@yellowpig> <CAMLkfFSZmSCQoMC2hi=L5Z_HkWmB1XRVpDk5zKVv-yEH0oiC=w@mail.gmail.com> <20151112131422.GA13589@yellowpig>
- User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> writes:
>
> On Wed, Nov 11, 2015 at 09:18:22AM +0100, Loïc Grenié wrote:
>> f)? In that case
>> call(g,concat([a,b],c)) would also work with the version we propose.
>> Inside the
>> variadic you know it is variadic, outside you may or may not know.
>
> That would be both awkward and inefficient, since GP will need to undo the
> concat operation.
A printf is unlikely to be many args of course. If that case is
important I still like a vstrprintf for efficiency or clarity (cut out
the middle man, and some use from C). Or a yet further way would be a
flag in call to select vector ending with a vector variant, so args can
be presented unambiguously but whichever fashion the caller likes best.
In any case I notice a small seg fault presently (with a little irony
that it's by a form I would like to make a call ... :-)
call(Strprintf, ["%d", 10])
=>
*** at top-level: call(Strprintf,["%d"
*** ^--------------------
*** in function call: Strprintf
*** ^---------
*** Strprintf: bug in PARI/GP (Segmentation Fault), please report.