View script | License | Download documentation as: HTML or editable | Download script | History |
30-Apr 14:27 UTC
[0.049] 11.671k
[0.049] 11.671k
Documentation for: twelvedays.rUsage document for %twelvedays.r1. Introduction to %twelvedays.rtwelvedays.r prints out all the lyrics for the popular Christmas song, The Twelve Days of Christmas. 2. twelvedays At a GlanceNot setup is required, just doit. 3. Using %twelvedays.r3.1. Running %twelvedays.rEvaluate the script directly out of the rebol.org library with >> do http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=twelvedays.ror locally with >> do %twelvedays.r 4. What you can learnThis script is a fair example of information hiding. The Twelve_Days object! encapsulates a function, Sing that also encapsulates another function, Gift. Both of these inner functions make proper use of local variables. The script only exposes the Twelve_Days object into the global name space. Everything else is hidden within this naming context. Plus you get to learn the proper lyrics for the Twelve Days of Christmas rhyme. 5. What can breakNothing to break here. 6. Credits
|