how to combine numbers from different sources?

Sep 29, 2007 at 4:19pm

how to combine numbers from different sources?

So three sources: 1 0 1
become: 101

thanks

#33895
Sep 29, 2007 at 4:25pm

On 29 sept. 07, at 18:19, chaosmoon wrote:

> So three sources: 1 0 1
> become: 101

sprintf allows you to concatenate anything: [sprintf %i%i%i] will do
the job (%i, %d, %ld means integer).

HTH,
ej

#113546
Sep 29, 2007 at 4:30pm

pack or pak?

Keith

On 9/29/07, chaosmoon

wrote:
>
> So three sources: 1 0 1
> become: 101
>
> thanks
>


Keith Manlove
(512) 825-9176
keithmanlove@gmail.com

#113547
Sep 29, 2007 at 4:44pm

yep, sprintf works like a charm. Drops leading zeros, but i can live with that.

thanks.

#113548
Sep 29, 2007 at 5:02pm

On 29 sept. 07, at 18:44, chaosmoon wrote:

> yep, sprintf works like a charm. Drops leading zeros, but i can
> live with that.

You can add leading zero with [sprintf symout %.2d%.2d%.2d].

ej

#113549
Sep 29, 2007 at 5:20pm

yeah, sorry… wasn’t paying that much attention. I second the sprintf.

Keith

#113550
Sep 29, 2007 at 5:26pm

perfect.

thanks for your time.

#113551

You must be logged in to reply to this topic.