[PD] Concatenating floats

Rick T ratulloch at gmail.com
Mon Oct 1 13:51:51 CEST 2012


Thanks that made it work :-)

Aloha

On Tue, Oct 2, 2012 at 1:24 AM, Roman Haefeli <reduzent at gmail.com> wrote:

> On Mon, 2012-10-01 at 00:14 -1000, Rick T wrote:
> > Greetings All
> >
> > I'm trying export time to a file in the format YYYYMMDDhhmmss but it
> > doesn't concatenate YYYY MM DD hh mm ss when I use the pack object.
> > I can export the data to a file but how do I concatenate everything
> > together so it outputs as  YYYYMMDDhhmmss with no spaces in-between?
>
> You probably need to do that in two steps:
> 1) Make sure, that all numbers have the correct number of digits
> 2) glue everything together
>
>
> 1)
> Use [makefilename %02d] to create a two digit symbol (<- yeah, the
> output is a symbol!) with leading zeros from the incoming float.
> For the year you need [makefilename %04d] in order to create a
> four-digit symbol. You get the idea.
>
> 2)
> Use [pack s s s s s s] to put everything into a single list message.
> Then you get rid of the spaces with a message box like this:
> [symbol $1$2$3$4$5$6(
>
> Roman
>
>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20121001/ed12a5e1/attachment.htm>


More information about the Pd-list mailing list