if you want a sprintf that accepts any number of format specifiers, supports %*f, supports %.*f, supports %*.*f, and nearly any other that you think of, I finally wrote an external that supports it all.
[gf/sprintf]
in GridFlow's SVN. (or future releases starting with 9.11)
The things it doesn't do, are :
%ld (makes no sense in pd. use %d instead.) %lld %hd %hhd %lx ... (same thing) %p %n %m (why ?) %1$d %2$*1$d etc (surely one day)
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
What does sprintf have to do with grids? Also, there is already a [sprintf] in cyclone which is a clone of Max/MSPs.
.hc
On Thu, 2010-08-12 at 13:31 -0400, Mathieu Bouchard wrote:
if you want a sprintf that accepts any number of format specifiers, supports %*f, supports %.*f, supports %*.*f, and nearly any other that you think of, I finally wrote an external that supports it all.
[gf/sprintf]
in GridFlow's SVN. (or future releases starting with 9.11)
The things it doesn't do, are :
%ld (makes no sense in pd. use %d instead.) %lld %hd %hhd %lx ... (same thing) %p %n %m (why ?) %1$d %2$*1$d etc (surely one day)
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801 _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Thu, 12 Aug 2010, Hans-Christoph Steiner wrote:
Also, there is already a [sprintf] in cyclone
And it already doesn't support %*d, %.*d, %*.*d ! Half of the point of [gf/sprintf] is to support those features that the other [sprintf] classes don't !
What does sprintf have to do with grids?
Nothing. You still want to bring up your idea of splitting GridFlow in several parts ? I don't care.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
On Thu, 12 Aug 2010, Hans-Christoph Steiner wrote:
What does sprintf have to do with grids?
ah, now it has something to do with grids.
introducing [#sprintf], sharing almost all of its code with [gf/sprintf] (and with [gf/error] too)
http://gridflow.ca/help/gf/sprintf-help.html http://gridflow.ca/help/%23sprintf-help.html http://gridflow.ca/help/gf/error-help.html
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Is cyclone/sprintf missing any of these features?
--- On Thu, 8/12/10, Mathieu Bouchard matju@artengine.ca wrote:
From: Mathieu Bouchard matju@artengine.ca Subject: [Gridflow-dev] a new, better [makefilename] ! To: pd-list@iem.at, gridflow-dev@artengine.ca Date: Thursday, August 12, 2010, 7:31 PM
if you want a sprintf that accepts any number of format specifiers, supports %*f, supports %.*f, supports %*.*f, and nearly any other that you think of, I finally wrote an external that supports it all.
[gf/sprintf]
in GridFlow's SVN. (or future releases starting with 9.11)
The things it doesn't do, are :
%ld (makes no sense in pd. use %d instead.) %lld %hd %hhd %lx ... (same thing) %p %n %m (why ?) %1$d %2$*1$d etc (surely one day)
_____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801 -----Inline Attachment Follows-----
Gridflow-dev mailing list Gridflow-dev@lists.artengine.ca http://lists.artengine.ca/cgi-bin/mailman/listinfo/gridflow-dev
On Thu, 12 Aug 2010, Jonathan Wilkes wrote:
Is cyclone/sprintf missing any of these features?
[cyclone/sprintf %*d] [cyclone/sprintf %.*d] [cyclone/sprintf %*.*d]
all print out this to the console :
sprintf's error: slot skipped (width parameter not supported in a
format pattern)
and naturally anything else with asterisks in their format specifiers.
Actually, [cyclone/sprintf] also silently fails with a plain %05d or %5d, for example, as it converts them back to float, instead of keeping them as symbols.
But if I do foo%05dbar, it's fine (though it produces it as a selector instead of symbol $1... but that is its intention, I suppose...).
But if I do foo%5dbar, then it's wrong again, as it does foo%4dbar instead !
Can you find any bugs in [gf/sprintf] ?
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
On Thu, 12 Aug 2010, Mathieu Bouchard wrote:
But if I do foo%5dbar, then it's wrong again, as it does foo%4dbar instead !
Oops no, it probably does the right thing internally, but then replaced any multi-space sequence by an atom break (that is, it terminates the current symbol or float and starts a new one).
Can you find any bugs in [gf/sprintf] ?
(or anything missing that would be useful...)
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
--- On Thu, 8/12/10, Mathieu Bouchard matju@artengine.ca wrote:
From: Mathieu Bouchard matju@artengine.ca Subject: Re: [Gridflow-dev] a new, better [makefilename] ! To: "Jonathan Wilkes" jancsika@yahoo.com Cc: pd-list@iem.at, gridflow-dev@artengine.ca Date: Thursday, August 12, 2010, 10:00 PM On Thu, 12 Aug 2010, Jonathan Wilkes wrote:
Is cyclone/sprintf missing any of these features?
[cyclone/sprintf %*d] [cyclone/sprintf %.*d] [cyclone/sprintf %*.*d]
all print out this to the console :
sprintf's error: slot skipped (width parameter not supported in a format pattern)
and naturally anything else with asterisks in their format specifiers.
Actually, [cyclone/sprintf] also silently fails with a plain %05d or %5d, for example, as it converts them back to float, instead of keeping them as symbols.
But if I do foo%05dbar, it's fine (though it produces it as a selector instead of symbol $1... but that is its intention, I suppose...).
But if I do foo%5dbar, then it's wrong again, as it does foo%4dbar instead !
Can you find any bugs in [gf/sprintf] ?
I haven't checked yet. How do I get it?
-Jonathan
_____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
On Thu, 12 Aug 2010, Jonathan Wilkes wrote:
--- On Thu, 8/12/10, Mathieu Bouchard matju@artengine.ca wrote:
Can you find any bugs in [gf/sprintf] ?
I haven't checked yet. How do I get it?
do you have a svn checkout of gridflow ?
then do svn update && ./configure && make
if you don't have one then go see on http://gridflow.ca/
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801