formatting correct string

Aug 9, 2007 at 10:13pm

formatting correct string

Hi There,

I’m experiencing a odd problem while formatting a correct string using
the sprintf object.
I’m trying compile a list of symbols that should look like this:
00:01:14:05. As a SMPTE formatted timecode.

My problem is that I end up with something that looks like this:
00:01:14:5 , so without the last zero.
If someone could point me to the problem I would appreciate it.
here’s an example:

max v2;
#N vpatcher 1689 197 2468 817;
#P window setfont “Sans Serif” 9.;
#P newex 278 118 40 196617 t b b b;
#P message 308 419 97 196617 00: 00: 19: 0 tab;
#P newex 308 387 61 196617 prepend set;
#P newex 308 363 134 196617 sprintf 00: 00: %ld: 0 tab;
#P toggle 278 67 15 0;
#P newex 278 92 63 196617 metro 1000;
#P number 308 169 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 1 9;
#X flags 0 0;
#P newobj 308 144 66 196617 counter 1 9;
#P message 308 336 20 196617 03;
#P message 358 265 52 196617 separator;
#P newex 308 285 78 196617 prepend symbol;
#P message 308 307 38 196617 set $1;
#P newex 308 265 49 196617 tosymbol;
#B color 5;
#P message 308 241 50 196617 0 6;
#P newex 308 212 61 196617 prepend set;
#P newex 308 191 69 196617 sprintf 0 %ld;
#P connect 11 0 10 0;
#P connect 10 0 15 0;
#P connect 15 2 8 0;
#P connect 8 0 9 0;
#P connect 9 0 0 0;
#P connect 0 0 1 0;
#P connect 15 1 2 0;
#P connect 1 0 2 0;
#P hidden connect 6 0 3 0;
#P connect 2 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 4 0;
#P connect 15 0 7 0;
#P connect 4 0 7 0;
#P connect 7 0 12 0;
#P connect 12 0 13 0;
#P connect 13 0 14 0;
#P pop;

Cheers,

Martijn

#33202
Aug 9, 2007 at 10:27pm

#110247
Aug 9, 2007 at 10:49pm

#110248
Aug 10, 2007 at 5:41am

#110249
Aug 10, 2007 at 7:53am

#110250
Aug 10, 2007 at 9:37am

#110251
Aug 10, 2007 at 9:50am

#110252
Aug 10, 2007 at 9:58am

#110253
Aug 10, 2007 at 11:38am

#110254
Aug 10, 2007 at 11:40am

#110255
Aug 10, 2007 at 2:25pm

#110256
Aug 10, 2007 at 3:06pm

#110257
Aug 10, 2007 at 5:47pm

#110258

You must be logged in to reply to this topic.