Re: A C Adventure: your comments are welcome



spinoza1111 said:

On Aug 17, 2:17 pm, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:

<snip>

If you post broken code, the claim "it wasn't broken when I pasted
it into my newsreader", whilst perhaps appearing cute to some
people, is far from convincing - not least to the implementation.
Compilers don't bother reading your sociology claptrap excuses -
they can simply say "syntax error" and be done with you.

You're both dumb and evil. The newline is added by formatting.

If you post broken code, the claim "it wasn't broken when I pasted it
into my newsreader", whilst perhaps appearing cute to some people, is
far from convincing - not least to the implementation. Compilers
don't bother reading your sociology claptrap excuses - they can
simply say "syntax error" and be done with you.


A competent programmer would have known that,

And a competent programmer /did/ know that, and has pointed it out
several times already. At your end, however, a competent programmer
who made this error (which is, after all, easily done) would have
checked out the claim, confirmed it, and posted a fix.

<snip>

The code wouldn't have compiled with a real
newline, and this you should have known.

And did know, which is why I pointed out (quite a while ago now) that
your claim that it did was false. What you compiled is not what you
posted.

You're dumb because you failed to notice the real error in the
code...

Well, I don't pretend to have spotted all the errors, but even
ignoring the syntax error "80", I found and reported two other
diagnosable errors in the code you posted - and yet you claim that no
diagnostic messages were produced. Either the compiler is broken, or
it is not being invoked in conforming mode, or you are, again, not
posting what you compile.

which did not prevent the code from compiling.

It's sometimes called triage. Fix the showstoppers first. Errors that
require diagnostic messages are showstoppers as far as I'm concerned.
Once you've got something that I can compile and link, maybe I'll
take a look at the semantics.

You're evil because you're using your own stupidity and lack of
diligence to imply that typographical errors are equivalent to
substantive bugs.

I think you'll find that it is your stupidity which led you to
misunderstand my original relatively mild objection to the syntax
error, and your lack of diligence which caused that error to be
posted in the first place and for the two other errors I reported to
go unaddressed.

Here is the current statement in the current code, which will be
posted when it works or seems to work, for comments. Your comments
are not very welcome but shall be answered. I don't know if it will
compile.

Then find out. FCOL.

<snip>

Here is the code.

<snip>

// ----- Parent segment start index
-------------------------

Your mess, not mine. If you want people to comment on your stuff, fix
the wrap issue. You can do this by using shorter lines.
Alternatively, you can use:

/* ----- Parent segment start index
------------------------- */

which survives most wrapping. (Wrapping could conceivably break a line
in the middle of a /* token or a */ token, however, so going for
shorter lines is a better strategy.)

How short is short? Depends on your news client. As long as you send
out the code correctly, how it is received is not your problem. But
you do need to send it out correctly, and that means configuring your
news client with a wide enough wrap setting (or no wrap setting) to
deal with your code.

<snip>

Ben B: the code with the missing function name seemed to be an
expression whose lowest precedence operators were the comma. I like
the comma op but did not mean to use it. Isn't there a syntax issue
in a function call of the form

a(p1, p2 ... pn)?

That is, doesn't the PARSER have to know the number of arguments to
avoid treating the parameter list as one expression?

The parser can simply look out for the opening parenthesis's matching
closing parenthesis to know when the arguments have all been parsed.
This is normally pretty easy because the lexer has done a lot of the
hard work already.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
This line unintentionally left unblank
.



Relevant Pages

  • Re: Function to count workdays
    ... even compile code before moving it to production, ... I prefer handling holidays ... That's why experienced programmers write tests. ...
    (comp.databases.ms-access)
  • Re: Compiling the scriptbasic package
    ... configuring module bdb ... The module did not compile ... dll FAIL lib FAIL bas OK ...
    (comp.os.linux.misc)
  • Re: Java web services
    ... > * Use WSDL2Java to create classes based on the supplied WSDL, ... > that the JDK be in the classpath, and compile the necessary classes on ...
    (comp.lang.java.programmer)
  • Re: 200x wish list
    ... Albert van der Horst wrote: ... <SNIP> ... to check whether] is used when there is no definition in progress. ... It's an error to compile anything without a definition started to ...
    (comp.lang.forth)
  • Re: reading more data than the record size (RECL)
    ... end snip ... This overhead is there to allow Fortran ... written by the Fortran code, ... compile the original source code with g95, ...
    (comp.lang.fortran)

Loading