The 32-bit Windows "sandbox/rick/sem" version of ooRexx can be temporarily 
found here:
<https://www.dropbox.com/sh/olh1mqfwb4brp7r/AABI1X-Le9zDCJ0gyfvMdKB8a?dl=0>.

To illustrate how the new COUNTER subkeyword/counter works here a little 
program first:

    -- rgf, 2019-03-06

    -- cf. <https://en.wikipedia.org/wiki/Spelling_alphabet>

    en_spelling1908=("Actor", "Baker", "Canteen", "Diver", "Eagle", "Fisher",  -
                     "Gangway", "Halliard", "Insect", "Jockey", "Knapsack",    -
                     "Lugger", "Musket", "Neptune", "Oyster", "Pistol",        -
                     "Quadrant", "Reefer", "Shipmate", "Topsail", "Unload",    -
                     "Vessel", "Windage", "Xray", "Yeoman", "Zebra")

    en_spelling1969=("Alfa", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot",   -
                     "Golf", "Hotel", "India", "Juliett", "Kilo", "Lima",      -
                     "Mike", "November", "Oscar", "Papa", "Quebec", "Romeo",   -
                     "Sierra", "Tango", "Uniform", "Victor", "Whiskey",        -
                     "X-ray", "Yankee", "Zulu")

    en_spellings=(en_spelling1908, en_spelling1969)
    en_spellings_years=("1908", "1969")

    do counter c1 sp over en_spellings
       say c1". Spelling Alphabet from" en_spellings_years[c1]":"
       say
       do counter c2 char over sp
          say c1"."c2":" char
       end
       say "-"~copies(40)
    end

Here the output when running the above program:

    e:\DropBox\Dropbox\xfer\orx\beta\sandbox_ooRexx\misc_tests\counter>test1.rex
    1. Spelling Alphabet from 1908:

    1.1: Actor
    1.2: Baker
    1.3: Canteen
    1.4: Diver
    1.5: Eagle
    1.6: Fisher
    1.7: Gangway
    1.8: Halliard
    1.9: Insect
    1.10: Jockey
    1.11: Knapsack
    1.12: Lugger
    1.13: Musket
    1.14: Neptune
    1.15: Oyster
    1.16: Pistol
    1.17: Quadrant
    1.18: Reefer
    1.19: Shipmate
    1.20: Topsail
    1.21: Unload
    1.22: Vessel
    1.23: Windage
    1.24: Xray
    1.25: Yeoman
    1.26: Zebra
    ----------------------------------------
    2. Spelling Alphabet from 1969:

    2.1: Alfa
    2.2: Bravo
    2.3: Charlie
    2.4: Delta
    2.5: Echo
    2.6: Foxtrot
    2.7: Golf
    2.8: Hotel
    2.9: India
    2.10: Juliett
    2.11: Kilo
    2.12: Lima
    2.13: Mike
    2.14: November
    2.15: Oscar
    2.16: Papa
    2.17: Quebec
    2.18: Romeo
    2.19: Sierra
    2.20: Tango
    2.21: Uniform
    2.22: Victor
    2.23: Whiskey
    2.24: X-ray
    2.25: Yankee
    2.26: Zulu
    ----------------------------------------

    e:\DropBox\Dropbox\xfer\orx\beta\sandbox_ooRexx\misc_tests\counter>

That is really a very useful addition, thank you very much!

---rony

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to