Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Efficency and the standard library
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="spinoza1111, post: 4026807"] "When everything is ended, you come." - Shakespeare, Henry IV part 2 ....dishonestly, like Falstaff, seeking glory. I find it hard to believe that you've been keeping grave observations in reserve, since you found no bugs, and would have been as my arch-enemy happy to do so (stylistic observations about pseudo-portability don't count, and there were several juicy bugs, none of which you were able to find). I'm massively underwhelmed. It's "simpler" only in having fewer characters in the source code, and this isn't what we mean by simplicity; mathematics isn't "simple and readable" in the way we want. Your code saves one assignment: I'll alert the media. Integrating the increment of s with the test is what you would call "confusing code" if anyone other than you'd written it, because you're a narcissist. It defeats what purpose there is in the C for loop, which was to disambiguate the three parts of a loop. It did so poorly, but your use manages to make a bad situation worse. If you can write "len", you can write "length". "len" could be anything. Initializing len in its declaration-definition will not even compile on some C compilers. I thought you wrote portable code. Oh well. OK, how many errors do we have in your code, if we use your own thug's standard for errors as "I don't like it?" Three. Oh, I dunno. Some strings of nonsense (such as yours) should never have been typed and have what we might call negative entropy, and we could represent this as a negative string length. Yes. Monkey and typewriter, but yes. However, you may have noticed if you were awake that the code is "packaged" as a proof of concept (the concept being "writing a replace even outside the string library is not rocket science, but it is too hard for Republicans and Limey sods"). And Lo! Heathfield labors mightily to stay inside the Game: But the combat is already over, to each side's shame or fame: The shadows lengthen on the pitch, he cries play up for me And so the Combatants turn once more to their game of reading C. The crowd is hush'd, and expectant Pall falls upon one and all And then the mighty Heathfield upon the Gods doth cry his call And show us his solution, alas, 'tis...Trivi-all. He's missed the point, the boat, the bus, and the London train If this were not so funny it would give the Gentle pain: He's rolled offside off the Pitch and onto the green grass To tell me how to write a string length function, Lord, what an Ass! In tones of grave and pompous Preaching he groans Admonishment: Expecting us his Flock to receive him with Astonishment: But alas in the remains of a day so drear there is silence in the Crowd: And then a Titter, then a Chortle, third a Guf-faw, then both long and Loud Resounds the Laughter of the Gods which dismays all Philistines From Hill, to Dale, to Glen, to Pale, are hearden its load Screams: And so it is, and was, and ever it shall be cried That Heathfield has struck out and has kicked the ball, offside. Oh, that was Lofty. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Efficency and the standard library
Top