Re: Syntax (was: Perfrom Thru
From: William M. Klein (wmklein_at_nospam.netcom.com)
Date: 03/28/04
- Next message: William M. Klein: "Re: Syntax (was: Perfrom Thru"
- Previous message: Rick Smith: "Re: Perfrom Thru"
- In reply to: Peter E. C. Dashwood: "Re: Syntax (was: Perfrom Thru"
- Next in thread: Richard: "Re: Syntax (was: Perfrom Thru"
- Reply: Richard: "Re: Syntax (was: Perfrom Thru"
- Reply: Peter E. C. Dashwood: "Re: Syntax (was: Perfrom Thru"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 28 Mar 2004 04:50:53 GMT
Peter,
So you think that if a compiler vendor only supports 15 WHEN phrases for
EVALUATE and a source program with 16 WHEN statement is "compiled" that it
should get a message saying
"This statement has violated the limits of this compiler"
and not call it a syntax message.
I (hopefully) indicated earlier, that I don't really care - as long as it is a
message. The way the Standard itself uses "syntactic specification" it is
(basically) anything that the compiler can detect (which exceeding limits is).
Therefore, these are syntax violations in the Standard's definition of them.
Others may not like it, but it is the way the Standard is written.
-- Bill Klein wmklein <at> ix.netcom.com "Peter E. C. Dashwood" <dashwood@enternet.co.nz> wrote in message news:b3638c46.0403271748.3ce8b4dd@posting.google.com... > It's a quiet Sunday here and I am taking a break from real work so I > thought I'd have a little peep into CLC. > > It is staggering the amount of brain cells being expended in this > particular thread (by both contributors), but it is really going > nowhere. > > Nevertheless, it is entertaining. > > As I have a few brain cells to spare, I thought I'd post a few > observations. > > Please find my two cents interspersed below. My hope is that you can > both now turn on me and forget your original dispute <G>. > > > "William M. Klein" <wmklein@nospam.netcom.com> wrote in message news:<ij39c.2174$Dv2.1278@newsread2.news.pas.earthlink.net>... > > Sorry - still not quite right. This is the old "logic" issue. > > > > Just because it is true that > > > > If A Then B > > > > then it is true that > > IF not B, then not A > > > > but it is not (necessarily) True that > > If not A then not B > > > > Now let's substitute statement > > > > A = source violates the rules of the Standard > > B = source must get a syntax error. > > > > That's not fair. You've weighted the conditions away from what Doc is > saying. > > It isn't about source violating the rules of the standard, it is about > source violating the SYNTAX rules of the standard. > > Doc's objection is that a diagnostic from a compiler should state > whether the problem is a compiler limitation or it is a syntax error, > or it is some other kind of error. > > (Actually, I agree. I don't think a compiler should throw a syntax > error because its limits have been blown, given that the actual syntax > was compliant. BUT, I really don't care enough about it to spend hours > of my time arguing it...) > > > substitution (I amended this to keep it honest...) > > > > (true statement 1) > > If (AND ONLY IF) "source violates the SYNTAX rules of the Standard" > > Then "source gets a syntax error" > > > > It is also true > > > > If not "source gets a syntax error" > > Then not "source violates the SYNTAX rules of the Standard" > > > > but NOT true > > > > If not "source violates the SYNTAX rules of the Standard" > > Then not "source gets a syntax error" > > > Nope. This one is now TRUE. > > > **** > > > > There is NO "guaranteed true" statement that you can make about code that does > > not violate the rules of the Standard - > > No, but there IS a "guaranteed TRUE" statement you can make about code > that does not violate the SYNTAX rules of the standard. (It will NOT > throw a syntax error). > > All of which goes to show that formal Logic can be used to support > anything...<G> > > My position would be: > > 1. If source code violates the syntax for COBOL as laid down in the > standard corresponding to the compiler being used, then it should flag > a syntax error. > That is the ONLY time a compiler should issue a syntax error. > > (There is one possible override to this: Where the vendor has chosen > to depart from the COBOL standard (maybe to implement a vendor > extension) and has CLEARLY DOCUMENTED in the vendor supplied COBOL > manual what the syntax must be, then the syntax standard is as > described by the vendor, rather than as described by the COBOL > standard. A syntax error is still exactly that; an error in the > prescribed syntax.) > > 2. If source code violates the internal limits of a compiler, then > this should result in a diagnostic that is NOT a syntax error.(If a > syntax error caused the limit violation, then the syntax error should > be flagged, not the limit violation.) > > (Once, long ago and far away, I was responsible for maintaining the > internals of a COBOL compiler and those were certainly the rules that > I applied.) > > Bottom line: > > Doc has a case, and no amount of arguing or "LOGIC" can dimininsh it. > > HOWEVER, I think we would all agree that ANY diagnostic is better than > NO diagnostic, so if a compiler gives a syntax error when it is really > an internal limit violation, it really isn't the end of the world. At > least you have been given a clue to WHICH source statement was > problematic. > > To sensitive programmers like the Doc <G>, this is offensive. It > implies the programmer was in error when he/she wasn't. > > I think that is a valid position. > > (Sorry, Bill, it isn't personal...<G>) > > Pete.
- Next message: William M. Klein: "Re: Syntax (was: Perfrom Thru"
- Previous message: Rick Smith: "Re: Perfrom Thru"
- In reply to: Peter E. C. Dashwood: "Re: Syntax (was: Perfrom Thru"
- Next in thread: Richard: "Re: Syntax (was: Perfrom Thru"
- Reply: Richard: "Re: Syntax (was: Perfrom Thru"
- Reply: Peter E. C. Dashwood: "Re: Syntax (was: Perfrom Thru"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|