[Lazarus] strcat problem
lazarus2 at de-brouwerij.be
Fri Jun 24 22:46:45 CEST 2016
Op 24-06-16 om 21:31 schreef David W Noon:
> After reading this, you should now know why C sucks as a string
> processing language, and why C++ implemented the std::string class to
> replace all this function call buffoonery.
> - --
> Dave [RLU #314465]
I think we're spoiled (fpc users), but not too much. The original c-code
was this :
Now is the winter of our discontent\n\
Made glorious summer by this sun of York;\n\
And all the clouds that lour'd upon our house\n\
In the deep bosom of the ocean buried.\n\
Now are our brows bound with victorious wreaths;\n\
Our bruised arms hung up for monuments;\n\
Our stern alarums changed to merry meetings,\n\
Our dreadful marches to delightful measures.\n\
Grim-visaged war hath smooth'd his wrinkled front;\n\
And now, instead of mounting barded steeds\n\
To fright the souls of fearful adversaries,\n\
He capers nimbly in a lady's chamber\n\
To the lascivious pleasing of a lute.\n\
I had to "improvise" and somehow put together that string which is
really a constant here, or put that whole string on one line.
Or does fpc have a similar construct to break strings in different lines
like this c-code does ?
It's the first time I knowingly used a PChar and I want to learn more
about it, because sooner or later I will need it again.
FWIW, with this problem "solved" I got a working port of pigpio, with a
test/demo-application. If anyone is interested, please ask. It's the
stuff that _uses_ the pigpio-daemon.
More information about the Lazarus