Query about doing fortran-esque repeat formatting

R

Rob Briggs

Hello,

Is there a way to do a repeat formatting command like in Fortran? Rather
that doing this:

print "%s %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f" %
(parmName, tmp[1], tmp[2], tmp[4], tmp[6], tmp[7],
tmp[8], tmp[9])

Something like this:

print "%s 7%-5.3f % (parmName, tmp[1], tmp[2], tmp[4],
tmp[6], tmp[7], tmp[8], tmp[9])

regards,

Rob
 
M

Mensanator

Hello,

Is there a way to do a repeat formatting command like in Fortran? Rather
that doing this:

print "%s %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f" %
(parmName, tmp[1], tmp[2], tmp[4], �tmp[6], �tmp[7],
tmp[8], �tmp[9])

Something like this:

print "%s 7%-5.3f % (parmName, tmp[1], tmp[2], tmp[4],
tmp[6], �tmp[7], tmp[8], �tmp[9])

s 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top