× 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.



On Wed, Apr 22, 2020 at 8:48 AM Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote:

I have a vague recollection that %str() is horribly inefficient, and its use is discourage. Am I remembering correctly, and is that still applicable to 7.3? If so, is there a preferred alternative?

I highly doubt %STR is discouraged. Indeed, I don't think any BIFs are
discouraged, per se. They each have a purpose, and when used for that
purpose, they are as good a solution for that purpose as any
alternative (and often better than any alternative).

I suspect what you are thinking of is the recommendation against
building long strings using fixed-length fields and %TRIM or %TRIMR.
If you have something like that going on, better to switch to using
varying-length fields instead.

The only other thing I can think of that might be tickling your memory
is that we, as humans, often work out pencil-and-paper numeric
operations in a "base-10 stringy" way, and we may be tempted to
recreate those on the computer by converting numbers to strings to do
the same thing. (Example off the top of my head: reverse the digits in
a number.) But it's usually faster for the computer to keep all its
operations in the machine-native numeric format and use math rather
than converting to and from string. (This is not a hard-and-fast rule;
it depends on the thing you're trying to do.)

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.