[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: WHEN and other conditional phrases



In a message dated 12/15/99 2:40:57 AM EST, Barticus@att.net writes:

<< 
 Also I think we should plagi^H^H^H^H^H imitate IBM's nesting level 
indicators.
  >>

They don't own nesting levels, nor the indicators thereof. I learned to count 
nesting levels in lisp before I could even spell IBM. Why heck, when I was a 
kid we used these abacus thingies and they had lots of nesting level 
indicators. A nesting level indicator is nothing but a carry flag collection 
from which you ought to borrow back completely before you turn out the lights 
to go home.

This modern world has this implicit borrow back bunk, which we old geezers 
know there ain't no justification for any how, but if it lights up your 
bubble then glow on cosmonauts!

Notice that right about "at line 24" the nesting level can drop precipitously 
in a deeply nested "assumed implied terminator" situation. That will look 
interesting if you do not put in the excellent second message(s!) that Randall
 Bart, Barticus@usa.net suggests (but do you realize that you might be 
putting plenty of messages right there!)


Randall Bart posted
<<
In all the talk about mixing SEARH with EVALUATE, I think we've missed 
mixing SEARCH with SEARCH and EVALUATE with EVALUATE.  Examples:

SEARCH
     AT END
         SEARCH ALL
             WHEN
     WHEN

Since SEARCH ALL can only take one WHEN, does the second WHEN bind to the 
outer SEARCH?
>>

It is a fact that you are fairly bright. We can do that, I bet, but we need 
another couple of days in each week. The SEARCH ALL is new to our list. 
Hurrah!


Randall Bart also posted
<<
EVALUATE
     WHEN
         EVALUATE
             WHEN
             WHEN OTHER
     WHEN
>>

I think we have kind of talked about that. The presence of WHEN OTHER 
potentially gives us enough material to 'presumptuously imply a termination', 
before an 'enclosing' WHEN, be it an E-WHEN or an S-WHEN. But you are right 
we have not drawn that out specifically.  That point helps emphasize how much 
care must be taken in managing an X-WHEN stack should we choose to try that 
solution. So there is another implied gizzy here, and another mystery for the 
X-WHEN file.  Hurrah! Hurrah!


Randall Bart also posted
<<
READ RANDOM-FILE
     INVALID KEY
        WRITE SEQUENTIAL-FILE
     NOT INVALID KEY

Since WRITE of a sequential file cannot take NOT INVALID KEY, does it bind 
to the READ?  (Bill, has J4 ever ruled on this one?)
>>

He posted that just so we would know that the universe has an infinite source 
of glory and all of it flows through his keyboard. However, ...

No doubt that is the best puzzle so far.  We can only do what you are 
suggesting if we manifest type in the parser. It is nice to see someone else 
suggest that :-) But seriously, I do not mean to put words in your post. 
There are no disambiguating tokens, so the two kind of WRITEs (sequential and 
reandom) look the same 'on the surface' to a parser that knows-not-what of 
type. 

If we emblaze SYMT with FD attributes then the organization and access 
declarations can mediate the specific token manifest for filenames. What you 
suggest can be done. This will require only a fractional extra week in each 
month.  (The Myans, by the way, knew exactly how to handle this kind of 
thing. They had a base 13 and a base 20 fantasmagora that modulated together 
to count the largest units of time in a way that kept the entire populace 
awestruct at all times. But they added to this the great mystery that the 
itty-bitty solar year had to be counted simply by months of 20 days. Which 
lead them up to 360 days at the end of 18 months; but there was no implied 
end to the year at that point. These devoutly religious people made no 
assumptions and they tolerated no implications. These great forebearer of all 
our computational sciences added a 19th month each and every year. Sometimes 
it had five days, sometimes six.  These were the so called unnamed days in 
the unnamed month; which was such a completely frightening idea that it is 
said the populace stayed indoors the whole month! They used that time to work 
on COBOL on their laptops.)

We should not wait for stuffy ole J4, we should lead.

A minor problem here is that we kind of want to be able to trap 
        WRITE SEQUENTIAL-FILE
     NOT INVALID KEY
all by itself under most circumstances. If you have been considering my other 
posts, this actually constitutes a reason to get the parser rules out of the 
business of matching leading to trailing tokens (inverted rules that break 
things up instead); and let the actions police numerous concurrent scope 
stacks.

The idea applied here would be that upon recognition of the NOT INVALID KEY 
we check to see if there is any scope that could capture it plausibly (such 
as your READ RANDOM), but also check to see if there is a conflicting IO 
category verb which does not capture it. Life is not so much tough in this 
situation just time consuming. If we do the scopics manually, you can do 
anything of this kind.

Strange to report though INVALID KEY and NOT INVALID KEY is actually 
supported on mainframes for sequential files, by extension (specifically 
QSAM).  Seems impossible, I know. But for WRITES that go beyond your 
allocation limits, the system can avoid abend if you _have_ coded INVALID 
KEY. The DCB merge and error address features deep in the advanced operating 
systems are hellaciously esoteric.

I promise I will not refer to code base. I promise. I promise.

Another spin, or wrenching, on this same subject is when is an error 
processing clause _required_ on an I/O verb? And how do we catch that 
syntactically? But we meander.


Best Wishes
Bob Rayhawk
RKRayhawk@aol.com

--
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.