Edit question (was Re: string manipulation question)

Fairlight fairlite at fairlite.com
Sun Dec 12 16:50:38 PST 2004


With neither thought nor caution, Kenneth Brody blurted:
> 
> So, the question is "why does this fail, while the others will not?"  After
> all, shouldn't monexp fail the same way?
> 
>     Jan      |
> becomes
>     January      |
> 
> Obviously, it doesn't fail that way.  Why does the "expand single quotes"
> edit fail this way, while all the others in the global edits table do not?

We've come up with two possible solutions:

Fairlight's:

The monexp edit pertains to the entire contents of the field, not something
that may occur "one or more times" within the string as a whole, and thus
it nukes the trailing spaces internally automatically, preventing an
overflow unless the edit substitution itself is written to exceed it with
real contents.


Jim Asman's:

In one example, you're working with a single character and must handle it
on a case by case basis.  In the other, you're dealing with a known
quanitity, which can be handled as such.


Both answers amount roughly to the same basic difference--a variable one or
more, versus a known quantity.  It's a question of how the internals are
applied algorithmically, more or less--information to which neither of us
would be privy.

mark->
-- 
Bring the web-enabling power of OneGate to -your- filePro applications today!

Try the live filePro-based, OneGate-enabled demo at the following URL:
               http://www2.onnik.com/~fairlite/flfssindex.html


More information about the Filepro-list mailing list