rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* re. a minor but annoying bug
@ 1993-04-08  8:28 Byron Rakitzis
  0 siblings, 0 replies; 2+ messages in thread
From: Byron Rakitzis @ 1993-04-08  8:28 UTC (permalink / raw)
  To: rc

Well, the reason for the bug is that rc does not annotate the
parse-tree with line numbers the way a C compiler might. The error
printer makes a stab at what the line number is, by printing the number
of newlines read so far. (This trick works ok for syntax errors.)

Therefore, an error raised anywhere inside a while loop will print the
line number of the close-brace of the while loop.

I realize this is ugly, but a fix for this problem is more effort than
I can or want to put into rc right now.


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

* Re: re. a minor but annoying bug
@ 1993-04-08 17:06 Alan Watson
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Watson @ 1993-04-08 17:06 UTC (permalink / raw)
  To: Byron Rakitzis; +Cc: rc

I think this is the kind of `yes, it's ugly, but I've got better things
to do' problem for which the BUGS section of the manual page was
designed.

Alternatively, only print a line number for syntax errors, on the
grounds that no information is better than false information.

rc does better than another scripting language I use regularly (cl in
IRAF -- an astronomical data mangling package), which always reports an
error as occuring on the line AFTER the last line in a file.

Alan.


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

end of thread, other threads:[~1993-04-08 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-04-08  8:28 re. a minor but annoying bug Byron Rakitzis
1993-04-08 17:06 Alan Watson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).