[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECmcc user notes file. Does not replace IPMT. |
Notice: | Use IPMT for problems. Newsletter location in note 6187 |
Moderator: | TAEC::BEROUD |
|
Created: | Mon Aug 21 1989 |
Last Modified: | Wed Jun 04 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 6497 |
Total number of notes: | 27359 |
2066.0. "On commas" by TAEC::HARPER (John Harper, DTN 830 3647) Fri Jan 10 1992 08:53
Following on from 2065.0, the general handling of commas in the FCL is
distinctly user-unfriendly. Again, I'm not suggesting that this is a
"must fix" for V1.2, but it could make the product noticeably less
daunting for the novice if it could get fixed some time.
The whole business of commas is very confusing. Why do some things
need commas and others not? Most of the time it's perfectly clear
without them, e.g.:
show recording node4 tenere circuit bna-0 partition counters in domain .blah
couldn't possibly be interpreted other than as intended. The actual
error message, "%MCC-E-LATIN1STRING_ERROR, error in Latin1String
value", is neither friendly nor especially illuminating.
Now, since I was involved in the architecture of NCL, I vaguely
remember why the comma got invented, which was to do with some obscure
cases of possible ambiguity. 99.9% of the time, however, there is
no ambiguity and a mildly intelligent parser could sort it out.
Thus, instead of giving an error, the parser could "imagine" a comma
and see if it could do better. Similarly for:
MCC> show recording node4 tenere circuit bna-0, partition .........
%MCC-W-QUALUNKNOWN, qualifier is unknown: PARTITION
the parser could "imagine" the absence of the comma. (If you wanted to
be pedantic, you could have an information message saying what the
"right" syntax was, to which the command had been translated).
(There is a parallel here with programming languages and semicolons.
Only one language that I know of, BCPL, had the wit to allow you to
miss out semicolons in the 99% of cases where it was unambiguous
anyway).
John
T.R | Title | User | Personal Name | Date | Lines |
---|
2066.1 | NCL syntax and commas | TOOK::CALLANDER | MCC = My Constant Companion | Wed Jan 15 1992 18:05 | 15 |
| What we currently do is suggest that people use the forms mode of the
FCL to learn the syntax. The context sensitive help <pf2> helps with
putting in the commas and building a syntactically correct command.
Right now the problem with removing commas is that we need some form of
delimiter between arguments weather it is a DCL \ or an ultrix - most
languages have something. Unluckily NCL (the language DECmcc uses) is
very english like except in its use of punctuation.
If you ahve more suggestions in this area they would be appreciated.
As to the error messages, the problem with the ambiguities is that the
parser tries all possibilities before returning an error. Unluckily the
error we return is on the last thing we tried not the first. If you use
forms mode you will find that PF2 also gives better messages.
|