Code Comments
Programming Forum and web based access to our favorite programming groups.The COPY statement, for 2002, 7.1.2.3 General rules, 10, c), 3, states, in part, "... each lowercase letter is equivalent to its corresponding uppercase letter, as specified for the COBOL character repertoire in 8.1.2, COBOL character repertoire.", and, the REPLACE statement, 7.1.3.3 General rules, 8, c), 3, states, in part, "... each lowercase letter is equivalent to its corresponding uppercase letter, as specified for the COBOL character repertoire in 8.1.2, COBOL character repertoire.". However, COBOL character repertoire, 8.1.2.1 General rules, 3, states, in part, "Equivalence of uppercase and lowercase basic letters is achieved by folding from uppercase to lowercase in accordance with the case mapping described in Annex D." Thus, it seems to me, that the wording in both the COPY and REPLACE statements should be reversed to say "each uppercase letter is equivalent to its corresponding lowercase letter, ...", since folding is from uppercase to lowercase, then equivalence should be from uppercase to lowercase. The same references apply to WD 1.5, except Annex C instead of Annex D.
Post Follow-up to this message"Rick Smith" <ricksmith@mfi.net> wrote in message news:1225lhe6r38lj5f@corp.supernews.com... > The COPY statement, for 2002, 7.1.2.3 General rules, > 10, c), 3, states, in part, "... each lowercase letter is > equivalent to its corresponding uppercase letter, as > specified for the COBOL character repertoire in 8.1.2, > COBOL character repertoire.", and, the REPLACE > statement, 7.1.3.3 General rules, 8, c), 3, states, in part, > "... each lowercase letter is equivalent to its corresponding > uppercase letter, as specified for the COBOL character > repertoire in 8.1.2, COBOL character repertoire.". > > However, COBOL character repertoire, 8.1.2.1 General > rules, 3, states, in part, "Equivalence of uppercase and > lowercase basic letters is achieved by folding from > uppercase to lowercase in accordance with the case > mapping described in Annex D." > > Thus, it seems to me, that the wording in both the COPY > and REPLACE statements should be reversed to say > "each uppercase letter is equivalent to its corresponding > lowercase letter, ...", since folding is from uppercase to > lowercase, then equivalence should be from uppercase > to lowercase. > > The same references apply to WD 1.5, except Annex C > instead of Annex D. Not sure if "equivalence" has some special meaning in COBOL, but in math, equivalence is a symmetric relationship. So if A is equivalent to B, then it is always true that B is equivalent to A. - Oliver
Post Follow-up to this messageOn Thu, 23 Mar 2006 17:12:43 GMT, "Oliver Wong" <owong@castortech.com> wrote: > > Not sure if "equivalence" has some special meaning in COBOL, but in >math, equivalence is a symmetric relationship. So if A is equivalent to B, >then it is always true that B is equivalent to A. But does that apply to the King James version of CoBOL?
Post Follow-up to this messageI'd say that depends on whether you're referring to the original 1960 recension, or its 1968, 1974, 1985 or 2002 revisions! ;-) -Chuck Stevens "Howard Brazee" <howard@brazee.net> wrote in message news:ikn52212c4t7nc6j7ot9ldc56pu70vs0e4@ 4ax.com... > On Thu, 23 Mar 2006 17:12:43 GMT, "Oliver Wong" <owong@castortech.com> > wrote: > > > But does that apply to the King James version of CoBOL?
Post Follow-up to this message
"Oliver Wong" <owong@castortech.com> wrote in message
news:fGAUf.2907$K11.1151@clgrps12...
[snip]
> Not sure if "equivalence" has some special meaning in COBOL, but in
> math, equivalence is a symmetric relationship. So if A is equivalent to B,
> then it is always true that B is equivalent to A.
My dictionary, RHCD, provides the special definition
for "equivalent", when used for Mathematics, as
"capable of being set into one-to-one correspondence"
and, for "one-to-one", "associating with each element
in one set a unique element in a second set".
Consider that age 28 is equivalent to adult, but not the
reverse; that is, associating the set of ages with the set
of {baby, child, teenager, adult, senior}.
As to letter case in COBOL, there are some lowercase
letters that may translate to either of two uppercase
letters, depending on context; while uppercase letters
only map to one lowercase letter, that provided in an
annex in the COBOL standard.
Post Follow-up to this message
"Rick Smith" <ricksmith@mfi.net> wrote in message
news:1225q86q8fh8528@corp.supernews.com...
>
> "Oliver Wong" <owong@castortech.com> wrote in message
> news:fGAUf.2907$K11.1151@clgrps12...
> [snip]
>
> My dictionary, RHCD, provides the special definition
> for "equivalent", when used for Mathematics, as
> "capable of being set into one-to-one correspondence"
> and, for "one-to-one", "associating with each element
> in one set a unique element in a second set".
I believe this is consistent with the definition I was using above. For
there to exist a one-to-one correspondence between two sets, those two sets
must be of equal size. (This sometimes leads to surprising results, such as
the set of even positive numbers is of the same size as the set of all
integers, including the odd and negative ones).
>
> Consider that age 28 is equivalent to adult, but not the
> reverse; that is, associating the set of ages with the set
> of {baby, child, teenager, adult, senior}.
The set of natural numbers is NOT in a one to one correspondance with
the set {baby, child, teen, adult, senior}, so the term "equivalent" here is
not being used in the mathematical sense.
>
> As to letter case in COBOL, there are some lowercase
> letters that may translate to either of two uppercase
> letters, depending on context; while uppercase letters
> only map to one lowercase letter, that provided in an
> annex in the COBOL standard.
If that's the case (and I wouldn't be too surprised if it were), then
"equivalence" is probably the wrong term to describe the mapping.
- Oliver
Post Follow-up to this message"Rick Smith" <ricksmith@mfi.net> wrote in message news:1225q86q8fh8528@corp.supernews.com... <snip> > As to letter case in COBOL, there are some lowercase > letters that may translate to either of two uppercase > letters, depending on context; while uppercase letters > only map to one lowercase letter, that provided in an > annex in the COBOL standard. > Rick, Didn't you say this backwards (or am I misunderstanding your intent)? The "lower-case" letters ë é è ê and e are all treated as "equivalent" (via folding) to E at least for some (most) alphabets - as used in COBOL. I can't think of any examples where an individual lower-case letter correspo nds to two different upper-case letters. There *are* cases where there isn't an y correspondence OR the correspondence is from a single symbol to multiple letters, e.g. ß and "SS" and some diagraphs also do odd mapping. -- Bill Klein wmklein <at> ix.netcom.com
Post Follow-up to this message"William M. Klein" <wmklein@nospam.netcom.com> wrote in message news:NeEUf.94344$NN1.83760@fe12.news.easynews.com... > "Rick Smith" <ricksmith@mfi.net> wrote in message > news:1225q86q8fh8528@corp.supernews.com... > <snip> > > Rick, > Didn't you say this backwards (or am I misunderstanding your intent)? No, but I may be mistaken, (and maybe). > The "lower-case" letters > ë > é > è > ê > and e > > are all treated as "equivalent" (via folding) to > E > at least for some (most) alphabets - as used in COBOL. That may be true for implementations prior to 2002; but such letters, except for "e", were not COBOL Characters, hence vendors could do, fairly much, what they wanted. For 2002, COBOL words may have letters other that A-Z and a-z, at least, as far as I understand such things. The translation of the mapping shown in Annex D, for 2002 is: <È,è>, <É,é>, <Ê,ê>, <Ë,ë>; that is, the first letter is mapped to the second letter. There is no mapping of è, é, ê, ë, or e to E, in COBOL 2002, referring to Annex D. > I can't think of any examples where an individual lower-case letter corresponds > to two different upper-case letters. There *are* cases where there isn't any > correspondence OR the correspondence is from a single symbol to multiple > letters, e.g. > ß and "SS" > > and some diagraphs also do odd mapping. I may be mistaken on that point; but I do note that there is no mapping of ß to any other character, in Annex D, so it remains unchanged in COBOL words.
Post Follow-up to this message
"Oliver Wong" <owong@castortech.com> wrote in message
news:S5DUf.3240$K11.1107@clgrps12...
>
> "Rick Smith" <ricksmith@mfi.net> wrote in message
> news:1225q86q8fh8528@corp.supernews.com...
>
> I believe this is consistent with the definition I was using above.
For
> there to exist a one-to-one correspondence between two sets, those two
sets
> must be of equal size. (This sometimes leads to surprising results, such
as
> the set of even positive numbers is of the same size as the set of all
> integers, including the odd and negative ones).
>
>
> The set of natural numbers is NOT in a one to one correspondance with
> the set {baby, child, teen, adult, senior}, so the term "equivalent" here
is
> not being used in the mathematical sense.
Maybe. The clearest description I have found so far
is "asymmetric relation". An asymmetric relation seems
not to be an "equivalence relation", so 'not mathematical
sense' seems about right. Perhaps, logically equivalent then.
(Though Russell is said to have claimed that mathematics
is a branch of logic!)
>
> If that's the case (and I wouldn't be too surprised if it were), then
> "equivalence" is probably the wrong term to describe the mapping.
I am going to do myself a big favor and let WG4/J4
decide that question.
Post Follow-up to this messageYou're right and I was wrong (working from memory). Folding is defined from Upper to Lower in the '02 Standard. -- Bill Klein wmklein <at> ix.netcom.com "Rick Smith" <ricksmith@mfi.net> wrote in message news:122668tndn7um50@corp.supernews.com... > > "William M. Klein" <wmklein@nospam.netcom.com> wrote in message > news:NeEUf.94344$NN1.83760@fe12.news.easynews.com... > > No, but I may be mistaken, (and maybe). > > > That may be true for implementations prior to 2002; but > such letters, except for "e", were not COBOL Characters, > hence vendors could do, fairly much, what they wanted. > For 2002, COBOL words may have letters other that > A-Z and a-z, at least, as far as I understand such things. > > The translation of the mapping shown in Annex D, for 2002 is: > <È,è>, <É,é>, <Ê,ê>, <Ë,ë>; that is, the first letter is > mapped to the second letter. > > There is no mapping of è, é, ê, ë, or e to E, in COBOL 2002, > referring to Annex D. > > corresponds > any > > I may be mistaken on that point; but I do note that there > is no mapping of ß to any other character, in Annex D, > so it remains unchanged in COBOL words. > > >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.