[Dev-sig] Simpleton question

Dustin Laurence dustin at laurences.net
Thu Apr 27 18:03:53 PDT 2006


On Thu, Apr 27, 2006 at 05:39:32PM -0700, juanslayton at dialup4less.com wrote:

> O.K., we got it to work.  Michael had it right--the output went to
> stderr.

Thought so.

> Dustin, the language is plain C.

Still often happens that one error leaves the compiler in a state that
it can't recover from, and it interprets the rest of the file in a
completely wrong context.  Imagine leaving off the end quote of a
string; a really stupid compiler in a language that let strings wrap
through newlines would attempt to process the rest of the source file by
reading to the beginning of the next string and interpreting it as the
end of the first one, then treating the contents of the second string as
code, and so on.  Effectively, it changes strings to code and vice
versa.

It takes something more complex to confuse a better compiler in a better
language, but it can be the same sort of thing.  Also notice that in the
above example the error message will be about the invalid code in the
second strong, possibly many lines after the actual error.

Have fun. :-)

Dustin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.sgvlug.net/pipermail/dev-sig/attachments/20060427/ce5de551/attachment.bin


More information about the Dev-sig mailing list