Re: Program crashes when running it outside dev environment



pete <pfiland@xxxxxxxxxxxxxx> writes:
Keith Thompson wrote:
Probably the strstr() interface was established before the "const"
keyword was added to the language,

I've never seen a version of strstr
that didn't have a (const char *) type parameter.

and adding a second function with a
distinct name was considered too confusing.

I see that K&R1 doesn't mention strstr, but it does talk about strcat,
strcmp, strcpy, and strlen (and something called strsave, which is
equivalent to strdup, but is presented as an example). This was
before the "const" keyword was added to the language.

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.



Relevant Pages

  • Re: Program crashes when running it outside dev environment
    ... keyword was added to the language, ... I've never seen a version of strstr ... that didn't have a (const char *) type parameter. ...
    (comp.lang.c)
  • Re: Unsigned Indexing (was: some other sad story)
    ... [snipped lengthy discussion about whether the presence of an "unsafe" ... >> verifiably type safe from running. ... >> track of which programming language was used to write each piece ... > features including the unsafe keyword. ...
    (comp.programming)
  • Re: Lisp for the C21
    ... This has nothing to do with keyword arguments as such. ... Because it is a standardized way of doing and thus has language support (which ... It would not be difficult to add keyword arguments to an object system ... implemented in Scheme via macros. ...
    (comp.lang.functional)
  • Re: Working on new language
    ... I'll make sure to put some warts in the language:) ... syntax to me is misguided. ... So apart from the "so" keyword mentioned below I require ... It would be possible to separate arguments with commas, but the opens ...
    (comp.lang.misc)
  • Re: Possible TRY...CATCH...END TRY
    ... but I don't see retry as being useful enough, ... doesn't justify a new keyword being introduced. ... language construct already supports it. ...
    (microsoft.public.dotnet.languages.csharp)