2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -1,17 +1,18 @@
/*REXX pgm capitalizes each word in string, maintains imbedded blanks.*/
/*REXX program capitalizes each word in string, and maintains imbedded blanks. */
x= "alef bet gimel dalet he vav zayin het tet yod kaf lamed mem nun samekh",
"ayin pe tzadi qof resh shin tav." /*"old" spelling Hebrew letters. */
y= capitalize(x) /*capitalize each word in string.*/
say x /*show original string of words. */
say y /*show the capitalized words. */
exit /*stick a fork in it, we're done.*/
/*───────────────────────────────────CAPITALIZE subroutine──────────────*/
capitalize: procedure; parse arg z; $=' 'z /*prefix with a blank.*/
abc = "abcdefghijklmnopqrstuvwxyz" /*define all lowercase letters. */
"ayin pe tzadi qof resh shin tav." /*the "old" spelling of Hebrew letters.*/
y= capitalize(x) /*capitalize each word in the string. */
say x /*display the original string of words.*/
say y /* " " capitalized words.*/
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
capitalize: procedure; parse arg z; $=' 'z /*prefix $ string with a blank. */
abc = "abcdefghijklmnopqrstuvwxyz" /*define all Latin lowercase letters.*/
do j=1 for 26 /*process each letter in alphabet*/
_=' 'substr(abc,j,1); _U=_; upper _U /*get a lower and upper letter. */
$ = changestr(_, $, _U) /*maybe capitalize some word(s). */
end /*j*/
do j=1 for 26 /*process each letter in the alphabet. */
_=' 'substr(abc,j,1); _U=_ /*get a lowercase (Latin) letter. */
upper _U /* " " uppercase " " */
$=changestr(_, $, _U) /*maybe capitalize some word(s). */
end /*j*/
return substr($,2) /*capitalized words, -1st blank.*/
return substr($, 2) /*return the capitalized words. */