Text processing/Max licenses in use: Difference between revisions
Text processing/Max licenses in use (view source)
Revision as of 07:30, 24 February 2011
, 13 years agoalphebetized
(Go solution) |
m (alphebetized) |
||
Line 640:
2008/10/03_08:40:40
</pre>
=={{header|Gema}}==▼
Start with ''gema -f licenses.gema mlijobs.txt''▼
<lang gema>▼
@set{count;0};@set{max;0}▼
License OUT \@ * *\n=@incr{count}@testmax{${count},*}▼
License IN \@ * *\n=@decr{count}▼
\Z=@report{${max},${times${max}}}▼
testmax:*,*=@cmpn{${max};$1;@set{max;$1};;}@append{times${count};$2\n}▼
report:*,*=Maximum simultaneous license use is * at\n*▼
</lang>▼
Output:▼
<pre>▼
Maximum simultaneous license use is 99 at▼
2008/10/03_08:39:34▼
2008/10/03_08:40:40▼
</pre>▼
== {{header|Go}} ==
<lang go>package main
Line 707 ⟶ 727:
2008/10/03_08:39:34
2008/10/03_08:40:40
▲</pre>
▲=={{header|Gema}}==
▲Start with ''gema -f licenses.gema mlijobs.txt''
▲<lang gema>
▲@set{count;0};@set{max;0}
▲License OUT \@ * *\n=@incr{count}@testmax{${count},*}
▲License IN \@ * *\n=@decr{count}
▲\Z=@report{${max},${times${max}}}
▲testmax:*,*=@cmpn{${max};$1;@set{max;$1};;}@append{times${count};$2\n}
▲report:*,*=Maximum simultaneous license use is * at\n*
▲</lang>
▲Output:
▲<pre>
▲Maximum simultaneous license use is 99 at
▲2008/10/03_08:39:34
▲2008/10/03_08:40:40
</pre>
|