myudf(padr(trim(str(lnVariable)),10))In Ruby (using VFP methods) the same thing would be like this:
lnVariable.str().trim().padr(10).myudf()The sequential way is SO much more readable. Here's my question. Generically, what do you call this difference/paradigm (as I'm sure it's not called Sequential In-Line Function Calls) ?
** SILF.prg - Sequential In-Line Function ** Allow us to make Ruby type calls ** lxValue = original source value ** lcF = functions calls use pipe | for proper variable placement ** ** Example call: SILF(5,[STR(|).ALLTRIM(|).PADL(|,3,'0')]) LPARAMETERS lxValue,lcF LOCAL lnX,lnFCount,lxReturnValue lnFCount=GETWORDCOUNT(lcF,[.]) lxReturnValue=lxValue FOR lnX=1 TO lnFCount lxReturnValue=EVALUATE(STRTRAN(GETWORDNUM(lcF,lnX,[.]),[|],[lxReturnValue])) ENDFOR RETURN lxReturnValue