>LPARAMETERS tcWords, tnStringNumber >************************************************************ >* Parameters explained: >* >* tcWords - Represents the entire string of words found >* in the Description field that is 60-characters long. >* >* tnStringNumber - Represents the choice of getting either >* the 1st or 2nd string. >* >* If tnStringNumber = 1, then we are getting the 1st string >* of complete words. >* >* If tnStringNumber = 2, then we are getting the 2nd string >* of words. >************************************************************ > >lcStr1=LEFT(tcWords, 30) >lnSpace=RAT(" ",lcStr1) >DO CASE > CASE tnStringNumber = 1 > lcStr1=SUBSTR(tcWords, 1, lnSpace) > RETURN lcStr1 > > CASE tnStringNumber = 2 > IF lnSpace=0 > lcStr2=RIGHT(tcWords,30) > *?lcStr1,",",lcStr2 > RETURN lcStr2 > ELSE > lcStr2=SUBSTR(tcWords, lnSpace+1) > RETURN lcStr2 > ENDIF >ENDCASE >