Anonymous user
World Cup group stage: Difference between revisions
m
→version 2, generated game sets: added comments, changed a literal definition style.
m (→version 2, generated game sets: added comments, changed a literal definition style.) |
|||
Line 946:
This REXX version can also simulate a Cricket World Cup (by specifying '''2''' for the '''win''' variable).
Programming notes: these are some of the changes from REXX version 1:
:::* the number of teams that are playing can be specified from the command line.
Line 976:
:::* used an idiomatic method to show the place winners.
:::* added the capability to simulate a Cricket World Cup.
<lang rexx>/*REXX pgm calculates world cup standings based on the number of games won by the teams.*/
parse arg teams win . /*obtain optional argument from the CL.*/
Line 1,009 ⟶ 1,008:
say /* [↓] build grid line for the box*/
L= length($.1) -2; $$= translate( translate( left($.1, L), , 0123456789), '─', " ")
say left('', 15) center(
say left('', 15) "╔"translate($$, '═╤', "─│")'╗' /*display the bottom sep for title.*/
p= 0
|