O
opmn
The output of my program is messed up.
This is the code for output:
-------------------------------
printf("%5d Q0 %15s %5d %.10f Exp\n", $query_id,
$docidmap{$docid}, $rank, $scores{$docid});
------------------------------
The output is expected to have 6 columns. But actually, I got only last
3. I did debugging and here is what I get:
------------------------------
DB<13> printf("%5d", $query_id);
152
DB<14> printf("%5d Q0", $query_id);
152 Q0
DB<15> printf("%5d Q0 %15s", $query_id, $docidmap{$docid});
152 Q0 DOE1-62-0080
DB<16> printf("%5d Q0 %15s %5d", $query_id, $docidmap{$docid},
$rank);
1Q0 DOE1-62-0080
-------------------------------
Here the value of $rank is 1. It's so weird that when $rank is added to
the output, it begins from the beginning of the line. Anyone tell me
why is this happening and how can I avoid it?
Thanks for any tip!
This is the code for output:
-------------------------------
printf("%5d Q0 %15s %5d %.10f Exp\n", $query_id,
$docidmap{$docid}, $rank, $scores{$docid});
------------------------------
The output is expected to have 6 columns. But actually, I got only last
3. I did debugging and here is what I get:
------------------------------
DB<13> printf("%5d", $query_id);
152
DB<14> printf("%5d Q0", $query_id);
152 Q0
DB<15> printf("%5d Q0 %15s", $query_id, $docidmap{$docid});
152 Q0 DOE1-62-0080
DB<16> printf("%5d Q0 %15s %5d", $query_id, $docidmap{$docid},
$rank);
1Q0 DOE1-62-0080
-------------------------------
Here the value of $rank is 1. It's so weird that when $rank is added to
the output, it begins from the beginning of the line. Anyone tell me
why is this happening and how can I avoid it?
Thanks for any tip!