int CDequoteApp::Reverse( int nBufferLength, LPSTR cBuffer ) >{ >char *cpIn; >char *cpOut; >char cSave; > >cpIn = cBuffer; >cpOut = cpIn + nBufferLength - 1; > >while ( cpIn < cpOut ) > { > cSave = *cpIn; > *cpIn++ = *cpOut; > *cpOut-- = cSave; > } > >return ( nBufferLength ); >} > >N = 400 > >dimension laX[N] > >for i = 1 to N > laX[i] = replicate( "abc123", i ) >endfor > >? "start" >lnStart = seconds() > >for i = 1 to N > lcX = StrRev( laX[i] ) >endfor > >?? seconds() - lnStart > >declare integer Reverse in C:\VFP6App\df_foxpro\dequote\Release\dequote.dll integer nBufferLength, string @ cBuffer > >lnStart = seconds() > >for i = 1 to N > lcX = laX[i] > = Reverse( len( lcX ), @lcX ) >endfor > >?? seconds() - lnStart > >return > >FUNCTION StrRev( cText ) > >LOCAL lcresult, lni, lnlast >lnlast = LEN(cText) >lcresult = "" >FOR lni = 1 TO lnlast > lcresult = SUBSTR(cText, lni, 1) + lcresult >NEXT >RETURN lcresult >ENDFUNC>