Memory corruption on freeing a pointer to pointer

Discussion in 'C Programming' started by Sharwan Joram, Aug 23, 2013.

  1. Or "behaviour".

    But "behavior" doesn't appear as a standard header name. Maybe you can
    think of "math" as an abbreviation of "maths", just as "stddef" is an
    abbreviation of "standard definitions". :cool:}
    Keith Thompson, Aug 27, 2013
    1. Advertisements

  2. I still think of (0 == strcmp(s1, s2)) as a Yoda condition; that
    particular case doesn't guard against "==" vs. "=" errors, but the
    cultivated habit of putting the constant on the left does.
    Keith Thompson, Aug 27, 2013
    1. Advertisements

  3. [snip]

    Let's just say that Yoda conditions upset me less than they seem to
    upset you.
    Keith Thompson, Aug 27, 2013
  4. Sharwan Joram

    James Kuyper Guest


    There's an awful lot of dark blue in that pie chart. The UK wouldn't
    have a majority of the native speakers of English even if the US,
    Canada, and Australia all suddenly disappeared.
    James Kuyper, Aug 27, 2013
  5. Keith Thompson, Aug 27, 2013
  6. Sharwan Joram

    Joe Pfeiffer Guest

    When my daughter spent a semester as an exchange student in Germany, the
    teacher not only taught UK English, he also tried to correct her
    American pronunciations and slang.
    Joe Pfeiffer, Aug 27, 2013
  7. Sharwan Joram

    Ian Collins Guest

    Except Americans.
    Ian Collins, Aug 27, 2013
  8. In the the Chalet School stories, set in an Anglophone school in the Swiss
    Alps, the girls are reprimanded for "smashing".
    Malcolm McLean, Aug 27, 2013
  9. Sharwan Joram

    James Kuyper Guest

    Sorry - I was in a bit of a bad mood, for reasons that had nothing to do
    with your message or this newsgroup.

    If you'd added a smiley to your message, I might have added one to mine
    - but I don't think I would have changed anything else except dropping
    the "Get over it". That was definitely influenced by my bad mood.

    If you restrict it to native speakers, most (58%) are American.
    James Kuyper, Aug 27, 2013
  10. (snip, someone wrote)
    (snip, then I wrote)
    Oh, yes, I was thinking about non-native speakers, too.

    As much of science is done in English, many students will learn
    English to do science.

    According to the table, but not in the pie chart, there are many
    second and third language English speakers in India, Pakistan,
    and Nigeria. The second language English speakers from Europe
    aren't in that chart. I will guess that India and Pakistan use
    England English, and that Philippines uses American English.

    -- glen
    glen herrmannsfeldt, Aug 28, 2013
  11. (snip of England and American English)
    Seems to me that math should be an abbreviation, but that it is
    not normally written with a period like most abbreviations.

    OK, so why stddef and not stddefs?

    If I pick peas, then I can make pea soup. (But not peas soup.)

    -- glen
    glen herrmannsfeldt, Aug 28, 2013
  12. Because, IIRC (I.I.R.C.?), some ancient file systems permitted only six
    characters for the file name plus one for the extension.
    Keith Thompson, Aug 28, 2013
  13. No you didn't, I see some of it right there. :)

    Ben Bacarisse, Aug 28, 2013
  14. That sounds like a quasi-mathematical argument, but mathematicians don't
    do this. I can't recall ever seeing "let 0 = x" or "for all 2 < x" in a
    maths paper[*] (it may have happened but the rarity is the thing). The
    only place where it occurs with any frequency in the rather natural
    notation for a range: "0 < x < 1". Mathematicians know that it is hard
    enough to read the damn stuff, without the author throwing up
    road-blocks in the way. We, as programmers, are in the same boat.

    The people who know about this stuff (what's easy and what's hard to
    read) are not computer scientists and logicians, but linguists and
    psychologists. What little I know of both, strongly suggests that
    natural language is easy for us, but maths and programming are not.
    Narrowing that gap is likely to be helpful, and English, for one, is not
    symmetrical with its verbs: there is a subject and an object even when
    that is not logical. We are not Vulcan.

    [*] You might see that in a text about formal logic where 0 is being
    defined, but that's just another confirmation of my point.

    Ben Bacarisse, Aug 28, 2013
  15. It's a risky joke. The UK is not free of bigots and xenophobes. I know
    at least one person who'd say that in all seriousness, and take it
    seriously if someone else said it. I'm not sure that even using a
    smiley will work in such situations, Twitter has spoilt it

    Ben Bacarisse, Aug 28, 2013
  16. (snip, I wrote)
    I know some with six and three for extension.

    -- glen
    glen herrmannsfeldt, Aug 28, 2013
  17. Some countries have a language academy. For instance there's one in French
    which bans English terms like "le hotdog" and demands "chien chaude" or
    whatever it is they think French people should say. Hebrew has one too,
    it's recently ruled that the feminine plural may be used when addressing
    a mixed group mainly of women.
    But we've never had one in English. The closest thing is the politically
    correct lobby which insists on "chairperson", bans slang terms for a Negro,
    and so on. But they still don't have any official standing.
    Malcolm McLean, Aug 28, 2013
  18. Sharwan Joram

    James Kuyper Guest

    On 08/28/2013 03:39 AM, David Brown wrote:
    Any serious complaint about the differences between British English and
    any of the other dialects that is worded to suggest that the British
    ones are superior implies such a desire. Your complaint was apparently
    not serious, but it had that form. I've known people to make such
    complains seriously, which is why I responded poorly to it.
    I spent a year studying advanced maths at Cambridge (at least, that's
    what they called it - in the US, we call things like General Relativity
    Quantum Field Theory, and String Theory advanced Physics, though
    there's certainly also a lot of advanced mathematics involved).
    During that time I met people from all over the British Commonwealth,
    speaking a variety of dialects (now that I think about it, I don't
    recall meeting any Scots, which seems odd). No one was impolite enough
    to express anti-US sentiments while I was around (as one of them pointed
    out to me :) ). However, I was surprised to hear several of them
    express strong prejudices based upon the differences between English
    dialects from places separated by no more than few hundred kilometers,
    such as York and London.
    It seemed to me that, while all of the British dialects shared common
    differences in grammar and vocabulary from US English, that the
    difference in pronunciation between US English and the Queen's English
    was much smaller than the differences between the various British dialects.
    James Kuyper, Aug 28, 2013
  19. Sharwan Joram

    Ike Naar Guest

    How long did you spend thinking about yours?
    Ike Naar, Aug 28, 2013
  20. Sharwan Joram

    Ike Naar Guest

    So, for the '+' operator it may depend on context,
    but for the '==' operator it should depend on dogma?
    Ike Naar, Aug 28, 2013
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.