[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Qualification (was RE: gnubol: Re: ref touch points
Speaking of the qualification rules,
I just wanted to make certain that "you all" had come across the rule that
says that it *IS* legal to have data-items (or procedure-names) that are NOT
unique - and cannot be made unique - as long as they are never referenced in
any procedure division statement. Eg. The following is a valid program:
Identification Division.
Program-ID. Whatever.
Data Division.
Working-Storage Section.
01 XYZ.
05 ABC Pic X.
01 XYZ.
05 ABC Pic 9.
Procedure Division.
aSection.
aParagraph.
Display "here"
.
aSection.
aParagraph.
Display "there"
.
aParagraph.
Stop Run
.
Bill Klein
wmklein <at> ix.netcom.com
> -----Original Message-----
> From: owner-gnu-cobol@wallace.lusars.net
> [mailto:owner-gnu-cobol@wallace.lusars.net]On Behalf Of Michael McKernan
> Sent: Saturday, December 04, 1999 11:58 AM
> To: gnu-cobol@lusars.net
> Cc: mck@tivoli.mv.com; mck@tivoli.mv.com
> Subject: Re: gnubol: Re: ref touch points
>
>
> >>>>> "Mike" == Michael McKernan <mck@tivoli.mv.com>
> >>>>> wrote the following on Sat, 04 Dec 1999 12:22:23 -0500
>
> Mike> No, I have not made myself clear. This is not a parsing
> Mike> issue. Let's say we have the following records.
>
> 01 A. 01 B.
> 02 B. 02 B.
> 03 C. 03 C.
> 04 D. 04 D.
> 05 X. 05 Y.
> 06 Z PIC 9. 06 Z PIC X.
>
> Mike> The programmer may legitimately reference Z of Y and it is a
> Mike> unique reference. Since the name at the top of the tree need
> Mike> not be among the qualifiers, it becomes very inefficient to
> Mike> do the lookup top-down. What we do instead, is form chains
> Mike> while we're building the symbol table of all the symbol table
> Mike> entries that have the same name, then use those chains to
> Mike> accomplish the lookup bottom-up. We are now searching only
> Mike> the trees that contain the data-name instead of searching
> Mike> every tree in the program.
>
> I should also have noted that when you start at an internal node and
> search upward, you are searching only a single unique path to the top
> of the tree. In a top-down search, it is necessary to investigate
> every branch.
>
>
>
> --
> This message was sent through the gnu-cobol mailing list. To
> remove yourself
> from this mailing list, send a message to majordomo@lusars.net with the
> words "unsubscribe gnu-cobol" in the message body. For more information on
> the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.
--
This message was sent through the gnu-cobol mailing list. To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body. For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.