• Samuel Vella (5/8/2009)


    Jan Van der Eecken (5/7/2009)[hr

    Samuel, no, I don't put ANDs and ORs at the end of the line. They go where they are most easily visible and comprehensible for the reader who comes after me, i.e. at the beginning of a new line of code AND properly indented.

    Re Grammatically looking wrong, no, it is not. There are no rules in any natural language I know of that impose a rule as to whether a comma must be at the end of a line or at the beginning. If we are talking grammar, then only the rules as to where a comma must be placed inline to make syntactical or sementical sense are defined. It's only some older computer languages that imposed rules that forced one to put certain statements at certain offsets from the begiinning of a new line. Darn, I hated those.

    Whoah! calm down

    I said it looked gramatically wrong, not it is grammatically wrong

    Leading commas, for me are just not pleasing to the eye, it "looks wrong"

    Anyway, I'm sure we can argue about this till we're blue in the face and not come to an agreement about it 🙂

    Apologies, Samuel, I must have misunderstood you. I wasn't getting upset by the way :-). And you are right, one can argue about style for ever and ever. The lowdown is, if you are working as an individual, do whatever pleases your eye, but make sure the next person working on your code (if ever) can actually read it without having to spend hours and hours reformatting before getting any real work done. If you work for a company and they do have a coding standard, either stick to it, or try to convince them to change (get your arguments worked out well first), or if that doesn't help, and you really can't live with those standards, you have only one choice: get yourself another job.

    --------------------------------------------------------------------------
    A little knowledge is a dangerous thing (Alexander Pope)
    In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)[/url]