Text processing/Max licenses in use: Difference between revisions

Found incorrectness.
(Found incorrectness.)
Line 1,244:
 
=={{header|Java}}==
{{improve|Java|Unproductive tests.
* Redundant test if count is decreased.
* Superfluous test if line is an "OUT" case.}}
{{works with|Java|1.5+}}
<lang java5>import java.io.BufferedReader;
Line 2,021 ⟶ 2,024:
PrintN(#CRLF$+"Press ENTER to exit"): Input()
CloseConsole()</lang>
<pre>99 license(s) used at ;
<pre>
99 license(s) used at ;
2008/10/03_08:39:34
2008/10/03_08:40:40
 
Press ENTER to exit</pre>
</pre>
 
=={{header|Python}}==
{{incorrect|Python|Invalid assumption of a (third party) licensing daemon. If a line is not a "OUT" signal it could be a (lead or trailing) empty line or e.g. a comment. In the task description is ... is meant as any line. It not so hard to make this example more robust for all eventualities.}}
<lang python>out, max_out, max_times = 0, -1, []
for job in open('mlijobs.txt'):
Line 2,042 ⟶ 2,044:
 
{{out}}
<pre> Maximum simultaneous license use is 99 at the following times:
2008/10/03_08:39:34
2008/10/03_08:40:40
</pre>
 
=={{header|R}}==
Line 2,654 ⟶ 2,655:
2008/10/03_23:51:05
</pre>
 
 
{{omit from|GUISS}}
Anonymous user