"Justin Fox" <
foxpj...@gmail.com> wrote in message
news:e938cc17-8845-41f3...@googlegroups.com...
Is that the only line you're interested in changing? If so, since both
values are zero it might be simpler just to substitute the strings as you
want them directly, rather than going through printf():
{ $2 = "97.92000"; $3 = "131.76000"; print }
A more roundabout way of accomplishing this might be to dynamically create a
new format string, ie., change this:
%SSiPrshPage: 0.00000 0.00000 198.00000 198.00000 0 1 0 0.00000 0.00000
0.00000 0.00000 16388 0.00000 1.00000 0.00000 1 0.00000 0.00000 1
to this:
%SSiPrshPage: %.5f %.5f 198.00000 0 1 0 0.00000 0.00000 0.00000 0.00000
16388 0.00000 1.00000 0.00000 1 0.00000 0.00000 1
and use that to print the new line, perhaps something like this (untested):
{
f2val = $2 + 97.92
f3val = $3 + 131.76
$2 = "%.5f"
$3 = "%.5f"
printf( $0, f2val, f3val )
}
or if using $0 as a format string makes you uncomfortable (I confess I've
never done it myself), maybe assign $0 to a string you feel good about
manipulating and use one of the subs() family functions to change the
contents of fields $2 and $3 instead.
- Anton Treuenfels