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



It's not causing trouble, Joel.  It's showing that there are
10 ways to skin a cat.

And using %len on a normal string will do what you
experienced, that's just how it works.  So the problem
wasn't necessarily that you weren't using varying strings,
it could have been that you didn't use the %trim BIF.

Again, different views that "dissapoint" everyone.  Which is
why programming is so cool.  It's just what you choose to
nitpick about I guess.  Because when it does get to that
level, it's really preference.  Put 10 java programmers in a
room and give them a simple task, you'll get 10 solutions
and blood pressure rising through the roof from each trying
to prove why "his/her" way is the "best".

I mean, we have three different ways of doing this now.
CHECKR, %len(%trim(foo)), and varying with %len.

I have to think that each has their positives and negatives.

Varying fields may not cause a big cycle doing %len, but
what about what goes on when it's keeping track of the
length of that string as it changes?

All of those things should be taken into account when seeing
which is "faster", not just figuring the length.  I can
imagine the code behind CHECKR is really very simple and the
cycles used depends on a number of factors including the
size of the string and where the character checking for is
in the string.  The same will hold true for using
%len(%trim(foo)) as well as a varying string keeping track
of it's length (as the %len probably just reads the length
bits from the front of the string, not that much work in
that).

After all, in the end, they really all are doing a similar
function and probably have similar code to run each
BIF/operation.  So we'll wait on what Hans has to say about
the differences.  I know I'm curious.  :)

Brad

On Tue, 13 Aug 2002 16:00:26 -0400
 "Joel R. Cochran" <jrc@masi-brac.com> wrote:
> > > Brad Stone wrote:
> > > > Well, I must be "Bard".  Right?  I missed the
> thread
> > > before
> > > > Jon's reply, but here's why I use CHECKR.
>
> Sorry Brad, my fault...
>
> I was lamenting the fact that when I rewrote my #WrStout
> wrapper (a la your
> optional NewLine parameter) I wrote:
>
> WrtDtaLen = %len( WrtDta );
>
> instead of:
>
> WrtDtaLen = %len( %trim( WrtDta ) );
>
> The result were horrendously large webpages full of lots
> of blank spaces.
> Jon mentioned that I could use Varying instead, he asked
> if you were doing
> that, I showed him a bit of your code with the CHECKR and
> here we are!
>
> I'm just always causing trouble...
>
> :-)
>
>
> Joel R. Cochran
> Director of Internet Services
> VamaNet.com
> (800)480-8810
> mailto:webmaster@vamanet.com
>




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.