17.05.2015 Views

Pascal News

Pascal News

Pascal News

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

.. /\ Qmnent CB1 Qmunents"<br />

.W.COX<br />

GenBaWFuturedata<br />

17361 :Ann5trong /we.<br />

1r¥iDt!.CA 92114<br />

.Introc'k!ction<br />

Jftlile working on our <strong>Pascal</strong> canpiler for the Intel 8086 (written in<br />

U::SD <strong>Pascal</strong>), I have stulied closely several:of the User's Group software<br />

tools with an eye toward converting them to that dialect. I have the<br />

follJi\Wing obser¥ations to make regarding the. handling of COIIIIIeIlts by<br />

thpse tools and upon'the definitiQll of a CQIIIIlent in the Draft Standard<br />

proposal Ill.<br />

,lSO Standarci QmunentForms<br />

This table eIURerates the four forms of canment pennitted by the<br />

Draft Standar~.<br />

Starting<br />

Ending<br />

For1DS Delimiter Delimiter<br />

1<br />

t~tn '~lfl<br />

2 n(,*,' It*)"<br />

3 ·~tn It-*)"<br />

4 "(It" tt'lt<br />

Nate:Fonns 3& .4 are prohibited by our UCSD compiler.<br />

UCSD. Pa~l toument .1iaJ!dlin8<br />

The UCSD<strong>Pascal</strong> compiler that we use (a IIlIlICh-modified version 1.5)<br />

pennits Forms 1 & Z of COJIIIlents, with a most'usefUl twist: a comnent<br />

be81;11l by a curly bracket can only be tenninated by a curley bracket, and<br />

one beg1;1Il by the "C""digraph can only be tepninated by the n*) .. digraph.<br />

Users whose Syst.WIS doo't .permit both forms are unaffected, but those of<br />

us who have curley bracket characters are luci:ky. By using only form 1<br />

for normal cClllllents. we are able ·to "canment: out"our temporarily delete<br />

bo!iies of text (using form Z) ina natl.lral and error-free manner.<br />

Draft Standard Suggestion<br />

Since the above manner of comment handling is most useful to some of us •<br />

relatively cheap to implement for all of us, and invisible to those whose<br />

character sets don't permit it, I suggest that the Draft Standard, section<br />

6.1.8 paragraphy 1, sentence 1 be rewritten as follows:<br />

The constructs "''' • .... 1" and "("" ••• "")" shall be comnents if the "i"<br />

or "(*" does not occur within a ·character-string. The constructs "\" •.• "*)"<br />

and "("" ••• ':/" are expressly forbidden.<br />

The note in section 6.11 should be deleted.<br />

Software Tools Qmunentary<br />

It is interesting that the software tools published in <strong>Pascal</strong> <strong>News</strong><br />

are not unifonn in their handling of conments.<br />

XREF (4), written by <strong>Pascal</strong>'s<br />

inventor, and ID21D (21 follow the UCSD convention while PRETIYPRINf (6]<br />

and REFERENCER( 3J follow the Draft Standard.<br />

FORMATI'ER1. 7J doesn't recognize<br />

curley brackets at all!<br />

References:<br />

1. A.Mdyrnan, et al. ISO DP/7185 -- A Draft Proposed Standard for the<br />

Progranming Language <strong>Pascal</strong>.<br />

<strong>Pascal</strong> <strong>News</strong> It 18 (May, 1980)<br />

2. Andy Mickel. Recoding a <strong>Pascal</strong> Program using ID2ID.<br />

<strong>Pascal</strong> <strong>News</strong> * 15 (September, 1979)<br />

3. Sale, A.H.J. User Manual - Referencer.<br />

<strong>Pascal</strong> <strong>News</strong> • 17 (March, 1980)<br />

4. Wirth, N., et a1. Cross Referencer Generator for <strong>Pascal</strong> PrQgrams.<br />

<strong>Pascal</strong> <strong>News</strong> * 17 (March, 1980)<br />

5. Shillington & Ackland (ed)' UCSD (Mini-Micro Cornputa:).<br />

<strong>Pascal</strong> Version 1. 5 (January, 1980)<br />

Nate: This reference does not discuss the UCSD comment handling;<br />

it is included for completeness only.<br />

6. Heuras' & Ledgard. <strong>Pascal</strong> Prettyprinting Program.<br />

<strong>Pascal</strong> <strong>News</strong> • 13 (December, 1978)<br />

7. Condict, Marcus & Mickel. <strong>Pascal</strong> Program Formatter.<br />

<strong>Pascal</strong> <strong>News</strong> • 13 (December, 1978)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!