Text processing/Max licenses in use: Difference between revisions

→‎{{header|Forth}}: multiple dates
(Forth)
(→‎{{header|Forth}}: multiple dates)
Line 213:
<lang forth>
19 constant date-size
create20 max-dateconstant date-size allot
create max-dates date-size 100 * allot
variable max-out
variable counter
Line 225 ⟶ 226:
counter @ max-out @ > if
counter @ max-out !
drop 65 + max-date date-size movemax-dates place
else 2dropcounter then@ max-out @ = if
drop 5 + date-size max-dates +place
else 2drop then then
else drop 2 s" IN" compare 0= if
-1 counter +!
Line 237 ⟶ 240:
begin pad 80 input read-line throw
while pad swap process
repeat drop
input close-file throw
max-out @ . ." max licenses in use @ "
max-datedates date-sizecount type cr ;
 
main bye
</lang>
 
Anonymous user