Text processing/Max licenses in use: Difference between revisions
Content added Content deleted
(Text processing/Max licenses in use en FreeBASIC) |
|||
Line 1,056: | Line 1,056: | ||
2008/10/03_08:40:40 |
2008/10/03_08:40:40 |
||
</pre> |
</pre> |
||
=={{header|FreeBASIC}}== |
|||
{{trans|PureBasic}} |
|||
<lang freebasic>Const CRLF = Chr(13) & Chr(10) |
|||
Dim As String currline, maxtime |
|||
Dim As Integer counter = 0, max = 0 |
|||
Dim As String filename = "mlijobs.txt" |
|||
Open filename For Input As #1 |
|||
While Not Eof(1) |
|||
Line Input #1, currline |
|||
If Mid(currline,9,3) = "OUT" Then |
|||
counter += 1 |
|||
Else |
|||
counter -= 1 |
|||
End If |
|||
If counter > max Then |
|||
max = counter |
|||
maxtime = Mid(currline,15,19) |
|||
Elseif counter = max Then |
|||
maxtime &= CRLF & Mid(currline,15,19) |
|||
End If |
|||
Wend |
|||
Print Str(max); " license(s) used at ;"; CRLF; maxtime |
|||
Close #1 |
|||
Print !"\nPress ENTER to exit" |
|||
Sleep</lang> |
|||
{{out}} |
|||
<pre> |
|||
Igual que la entrada de PureBasic. |
|||
</pre> |
|||
=={{header|Gema}}== |
=={{header|Gema}}== |