filepro quirk

Jeff Harrison jeffaharrison at yahoo.com
Thu Oct 28 14:17:28 PDT 2004


--- Roger Cornelius <rac at custom-mobility.com> wrote:

> On Thu Oct 28 11:35, Jeff Harrison wrote:
> > --- Roger Cornelius <rac at custom-mobility.com>
> wrote:
> > [snip]
> > 
> > > It appears filepro is comparing only the first n
> > > characters of the two
> > > vars where n is the length of the shorter of the
> > > two.
> > > I believe I remember reading something about
> this,
> > > possibly on this
> > > list, long ago.  Can anyone explain this
> behavior to
> > > me?
> > > 
> > > -- 
> > > Roger Cornelius           
> rac at custom-mobility.com
> > > 
> > 
> > Not much to explain.  You described it pretty
> > accurately.  That is how filepro does comparisons.
>  It
> > can be handy as long as you know what to expect.
> 
> Seems bizarre to me.  It's counter to any other
> language I've programmed
> in and I'm surprised I've never noticed it before. 
> Now I'm wondering
> where else the code I've written over the years is
> going to blow up.
> Can you give me an example of when it can be handy?
> -- 
> Roger Cornelius            rac at custom-mobility.com
> 

Sure.  In most languages you would need to use a mid
or left command or something similar to get the same
functionality:

VB:
If mid(xx,"1","2") = "so"  then
' .... etc.
end if

filePro:
If:  xx = "so"
Then:' ...etc.

Lets see, that's at least 13 characters saved per
comparison (not counting the "if, then, endif"  :-)


Jeff Harrison
jeffaharrison at yahoo.com

---------------------------------------------------------
Author of JHImport and JHExport.  The fastest and
easiest
way to create code for filePro Imports and
Exports.
---------------------------------------------------------





		
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 


More information about the Filepro-list mailing list