Poker hand analyser: Difference between revisions

m
→‎version 2: ignore blank lines in the input file. -- ~~~~
(Introduce jokers for extra credit (thanks Gerard))
m (→‎version 2: ignore blank lines in the input file. -- ~~~~)
Line 458:
:::*   alphabetic letters for suits and/or glyphs
:::*   specification of number of cards in a hand
:::*   the dealt hands can be in a file (blank lines are ignored)
:::*   dealt hands in the file can have comments after a semicolon   (''';''')
<lang rexx>/*REXX program analyzes an N-card poker hand, displays what the hand is.*/
parse arg iFID .; if iFID=='' then iFID='POKERHAN.DAT'
/* [↓] read the poker hands dealt*/
do while lines(iFID)\==0; ox=linein(iFID); if ox='' then iterate
say right(ox,max(30,length(ox))) ' ◄─── ' analyze(ox)
end /*while*/ /* [↑] analyze/validate the hand.*/