A rebuttal to an "anti-filePro" web page.

While I won't link to it here, there is a link to an "anti-filePro" website at the bottom of Wikipedia's filePro page. (Which is probably how you found this page in the first place.) I had a few minutes to kill, so I wrote this rebuttal of sorts to his "filePro versus Perl" page.

Note that some of the code lines are broken in the middle, with the continuation line indented 8 spaces. This is simply to allow the code to better fit on the screen in this side-by-side comparison format.

The "anti-filePro" code was cut-and-pasted from the actual web page on 17-July-2006. I made no changes to his code, other than the breaking of long lines as noted above. It is possible the page has been changed since then.

As a final note here, the code samples he used are shown in filePro's internal format, and not the format as shown to the user while within the filePro environment. For consistency, my code is shown in the same format.

See my notes below for some further information.

 
Code from "anti-filePro" page.
 
 
My version.
 
 
Get field 2 from employee number 33.
::aa(3,.0) = "33":
::lookup emp = Employee i=A k=aa -nx:
::en(33,*) = emp(2);
::lookup emp = Employee i=A k=("33") -nx:
::en(33,*) = emp(2);
 
Does a field contain the text "red"?
rd1:aa co "red" or aa co "Red" or aa co "REd"
        or aa co "RED":
rd2:aa co "rEd" or aa co "rED" or aa co "reD":
all:rd1 and rd2:show "@found red":
(Side note: he forgot "ReD".)
:aa co "red":show "@found red"
 
Does a field contain the text "limberger"?
He doesn't attempt this, under the mistaken belief that he
has to use his convoluted method used above for "red".
:aa co "limberger":show "@found limberger":
 
Does a field contain the text "pig" or "pin"?
::za(33,ALLUP) = aa:
:za co "PIN" or za co "PIG": show "@I found a pig
        or pin":
:aa co "pin" or aa co "pig":show "@I found a pig
        or pin":
 
Does a field start with "fee"?
::za(3,ALLUP) = MID(aa,"1","3"):
:aa eq "FEE":show "found fee in first 3 characters":
:aa eq "fee":show "found fee in first 3 characters":
 
Does a field contain "bar" at the end?
::za(1,ALLUP) = MID(aa,"1","1"):
::zb(1,ALLUP) = MID(aa,"2","1"):
::zc(1,ALLUP) = MID(aa,"3","1"):
::zd(1,ALLUP) = MID(aa,"4","1"):
::ze(1,ALLUP) = MID(aa,"5","1"):
::zf(1,ALLUP) = MID(aa,"6","1"):
:zf eq "R" and ze eq "A" and zd eq "B":gosub found:
:ze eq "R" and zd eq "A" and zc eq "B" and zf eq " ":
      gosub found:
:zd eq "R" and zc eq "A" and zb eq "B" and zf eq " "
      and ze eq " ":gosub found:
:zc eq "R" and zb eq "A" and za eq "B" and zf eq " "
      and ze eq " " and zd eq " ":gosub found:
::end:
found::show "@found BAR at the end of the word":
::zz = aa{"":
:mid(zz,len(zz)-"2","3") eq "bar":show "@found BAR
       at the end of the field":
 

    

    
 

    

    

Notes

A lot of the "problems" he describes in filePro are apparently related to his lack of knowledge of the filePro language, rather than the language itself. Back to top.
Hit counter: since 30-Jan-2000