comp.lang.ada
 help / color / mirror / Atom feed
* Re: Comments?
  1999-01-16  0:00 Comments? Gold Rush Graphics
@ 1999-01-16  0:00 ` David C. Hoos, Sr.
  1999-01-17  0:00 ` Comments? Matthew Heaney
  1 sibling, 0 replies; 5+ messages in thread
From: David C. Hoos, Sr. @ 1999-01-16  0:00 UTC (permalink / raw)



Gold Rush Graphics wrote in message <77qt10$c2m$1@winter.news.rcn.net>...
>I have a question...I am learning some programming languages and have
>noticed that some languages such as Pascal and C++ use delimiters on both
>ends of comments. Other languages, such as Fortran and Ada, use a symbol of
>symbols to indicate the beginning of a comment and the end of line to
>terminate it. Why would these languages take such different aprouches to
>solving the same problem and which method is better?
>
If you'll look again, you'll find that C++ also uses only leading
delimiters,
i.e., "//".

The only advantage to comments delimited on both ends is that you can have
multi-line comments, in such a case.







^ permalink raw reply	[flat|nested] 5+ messages in thread

* Comments?
@ 1999-01-16  0:00 Gold Rush Graphics
  1999-01-16  0:00 ` Comments? David C. Hoos, Sr.
  1999-01-17  0:00 ` Comments? Matthew Heaney
  0 siblings, 2 replies; 5+ messages in thread
From: Gold Rush Graphics @ 1999-01-16  0:00 UTC (permalink / raw)


I have a question...I am learning some programming languages and have
noticed that some languages such as Pascal and C++ use delimiters on both
ends of comments. Other languages, such as Fortran and Ada, use a symbol of
symbols to indicate the beginning of a comment and the end of line to
terminate it. Why would these languages take such different aprouches to
solving the same problem and which method is better?

--Seth






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Comments?
  1999-01-17  0:00 ` Comments? Matthew Heaney
@ 1999-01-17  0:00   ` robert_dewar
  1999-01-18  0:00     ` Comments? Lance Kibblewhite
  0 siblings, 1 reply; 5+ messages in thread
From: robert_dewar @ 1999-01-17  0:00 UTC (permalink / raw)


In article <m3r9sugz5g.fsf@mheaney.ni.net>,
  Matthew Heaney <matthew_heaney@acm.org> wrote:
> If you're using Pascal or C, then be sure to use an
> editor that supports color-coding.  You have to make it
> obvious which part of your code is comment, and which is
> not.

UCSD Pascal generated a warning when you commented out
a semicolon, quite useful :-)

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Comments?
  1999-01-16  0:00 Comments? Gold Rush Graphics
  1999-01-16  0:00 ` Comments? David C. Hoos, Sr.
@ 1999-01-17  0:00 ` Matthew Heaney
  1999-01-17  0:00   ` Comments? robert_dewar
  1 sibling, 1 reply; 5+ messages in thread
From: Matthew Heaney @ 1999-01-17  0:00 UTC (permalink / raw)


"Gold Rush Graphics" <goldrushgraphics@erols.com> writes:

> I have a question...I am learning some programming languages and have
> noticed that some languages such as Pascal and C++ use delimiters on both
> ends of comments. Other languages, such as Fortran and Ada, use a symbol of
> symbols to indicate the beginning of a comment and the end of line to
> terminate it. Why would these languages take such different aprouches to
> solving the same problem and which method is better?

The reason Ada avoided a comment terminator is so that you can't
accidently comment-out any code.  

If you're using Pascal or C, then be sure to use an editor that supports
color-coding.  You have to make it obvious which part of your code is
comment, and which is not.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Comments?
  1999-01-17  0:00   ` Comments? robert_dewar
@ 1999-01-18  0:00     ` Lance Kibblewhite
  0 siblings, 0 replies; 5+ messages in thread
From: Lance Kibblewhite @ 1999-01-18  0:00 UTC (permalink / raw)


robert_dewar@my-dejanews.com wrote:

>In article <m3r9sugz5g.fsf@mheaney.ni.net>,
>  Matthew Heaney <matthew_heaney@acm.org> wrote:
>> If you're using Pascal or C, then be sure to use an
>> editor that supports color-coding.  You have to make it
>> obvious which part of your code is comment, and which is
>> not.
>
>UCSD Pascal generated a warning when you commented out
>a semicolon, quite useful :-)

How did one sift through the false negatives, looking for the true
negatives?  Or did this simply cause semicolons to be not used within
comments?





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-01-18  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-16  0:00 Comments? Gold Rush Graphics
1999-01-16  0:00 ` Comments? David C. Hoos, Sr.
1999-01-17  0:00 ` Comments? Matthew Heaney
1999-01-17  0:00   ` Comments? robert_dewar
1999-01-18  0:00     ` Comments? Lance Kibblewhite

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox