× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello Chris,

Am 04.06.2021 um 14:42 schrieb Chris Hird <chrish@xxxxxxxxxxxxxxxxxx>:

You will be surprised how quick it really is and how little CPU it takes to do this.

Indeed!

Any other language has to resort to the same process under the covers, they have just created functions to do it and called them API's.

Yes, I guessed that. I'm just reluctant to reinvent the wheel.

C can bite you hard if you get things wrong with strings etc, I see lots of code where people do a strcpy() to a buffer that is the same length as the string, that means the NULL termination which is always added writes over the next storage, then they write something to that storage and the string is no longer null terminated.

Yap. I'm also prone to this and other kinds of off-by-one-errors.

I am sure you will get the hang of it, I never write anything but C on the IBM i now (except where I have to) and I have not stumbled into anything that cannot be achieved and run economically.

I have some experience with C on Linux, but apparently, years of doing RPG, a little perl and shell scripts allowed some rust on my C skills. :-)

Thanks for your help, again.

RPG offers no benefits to me 😊

Run, duck and cover! Okay, maybe not in this group. ;-)

I could have done that task in (positional) RPG, also. But since I need a considerable amount of static strings for all the HTML table surroundings, I expected that to be cumbersome. And so this was a perfect "excuse" to learn something half-new. As with a cooked meal, wrong — or missing — ingredients make the taste fail. ;-)

:wq! PoC


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.