>>>>>IF lcRowposition $ laArray(I)=.T. >>>>>lnRightColumnposition=GETWORDNUM(laArray(I), GETWORDCOUNT(laArray(I)) - 2) && The Third last word >>>>>lnRightColumnposition=VAL(STREXTRACT(lnRightColumnposition,')','')) >>>>>IF lnRightColumnposition>lnLeftColumnposition >>>>>IF TYPE(STREXTRACT(laArray(I),'(',')'))='N'could be written as a single if-line (or filter for cursor).
>>>>>IF m.lcRowposition $ laArray(I) ; >>>>>and VAL(STREXTRACT(GETWORDNUM(laArray(I), GETWORDCOUNT(laArray(I)) - 2),')','')) >m.lnLeftColumnposition; && The Third last word >>>>>and TYPE(STREXTRACT(laArray(I),'(',')'))='N'But the speedup will probably not be large enough if you have a big problem. Working off a local var instead of always accessing array might be beneficient as well, but as only 3 to 5 array loads are needed again nothing helping you gain big savings if any at all.
>>>>>*****************Extract Usage Charges From PS File****************** >>>>>cExit='N' >>>>>lnRowposition=10000 >>>>> >>>>>FOR I= 1 TO nU1 && nU1 is the Length of Array >>>>>IF 'Usage Charges' $ laArray(I)=.T. >>>>>lnRowposition = VAL(GETWORDNUM(laArray(I), GETWORDCOUNT(laArray(I)) - 1)) && The second last word >>>>>lnLeftColumnposition = GETWORDNUM(laArray(I), GETWORDCOUNT(laArray(I)) - 2) && The Third last word >>>>>lnLeftColumnposition=VAL(STREXTRACT(lnLeftColumnposition,')','')) >>>>>EXIT >>>>>ENDIF >>>>>ENDFOR >>>>> >>>>>FOR nFor=-1 TO 1 >>>>>lcRowposition=ALLTRIM(STR(lnRowposition+nFor))+' x' >>>>>FOR I= 1 TO nU1 >>>>>IF lcRowposition $ laArray(I)=.T. >>>>>lnRightColumnposition=GETWORDNUM(laArray(I), GETWORDCOUNT(laArray(I)) - 2) && The Third last word >>>>>lnRightColumnposition=VAL(STREXTRACT(lnRightColumnposition,')','')) >>>>>IF lnRightColumnposition>lnLeftColumnposition >>>>>IF TYPE(STREXTRACT(laArray(I),'(',')'))='N' >>>>>nUsagecharges=VAL(STREXTRACT(laArray(I),'(',')')) >>>>>cEXit='Y' >>>>>EXIT >>>>>ENDIF >>>>>ENDIF >>>>>ENDIF >>>>>IF cExit='Y' >>>>>EXIT >>>>>ENDIF >>>>>ENDFOR >>>>>ENDFOR >>>>>************************************************************************ >>>>>*****************Extract Balance Minimum Guarantee PS File****************** >>>>>cExit='N' >>>>>lnRowposition=10000 >>>>> >>>>>FOR I= 1 TO nU1 >>>>>IF 'Minimum Guarantee' $ laArray(I)=.T. >>>>>lnRowposition = VAL(GETWORDNUM(laArray(I), GETWORDCOUNT(laArray(I)) - 1)) && The second last word >>>>>lnLeftColumnposition = GETWORDNUM(laArray(I), GETWORDCOUNT(laArray(I)) - 2) && The Third last word >>>>>lnLeftColumnposition=VAL(STREXTRACT(lnLeftColumnposition,')','')) >>>>>EXIT >>>>>ENDIF >>>>>ENDFOR >>>>> >>>>>FOR nFor=-1 TO 1 >>>>>lcRowposition=ALLTRIM(STR(lnRowposition+nFor))+' x' >>>>>FOR I= 1 TO nU1 >>>>>IF lcRowposition $ laArray(I)=.T. >>>>>lnRightColumnposition=GETWORDNUM(laArray(I), GETWORDCOUNT(laArray(I)) - 2) && The Third last word >>>>>lnRightColumnposition=VAL(STREXTRACT(lnRightColumnposition,')','')) >>>>>IF lnRightColumnposition>lnLeftColumnposition >>>>>IF TYPE(STREXTRACT(laArray(I),'(',')'))='N' >>>>>nBalMinimumGuarantee=VAL(STREXTRACT(laArray(I),'(',')')) >>>>>cEXit='Y' >>>>>EXIT >>>>>ENDIF >>>>>ENDIF >>>>>ENDIF >>>>>IF cExit='Y' >>>>>EXIT >>>>>ENDIF >>>>>ENDFOR >>>>>ENDFOR >>>>>************************************************************************ >>>>> >>>>>