Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The beauty that is lost with the beautify
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00611595
Message ID:
00611694
Views:
22
>
>Wise boy, clever idea.. But, didn't worked ! :))
>
>It seems that nothing have been changed on the _CLIPTEXT !! Maybe, beacause I've been using spaces instead of tabs !
>
>Claudio

Come on!
nlines=ALINES(lCodeArray,_CLIPTEXT)
_CLIPTEXT=""
FOR i = 2 to nLines  && start with 2 to avoid trouble with lCodeArray[i-1]
	IF lCodeArray[i]="DEFINE" AND !lCodeArray[i]="DEFINE CLASS"
*!*			*take the same number of tabs - chr(9) - of the prev line
*!*			nTabs=OCCURS(CHR(9),lCodeArray[i-1])
*!*			IF nTabs > 0
*!*				lCodeArray[i]=REPLICATE(CHR(9),nTabs)+lCodeArray[i]
*!*			ENDIF
		*take the same number of spaces of the prev line
		nSpaces=LEN(lCodeArray[i-1])-LTRIM(LEN(lCodeArray[i-1]))
		IF nSpaces > 0
			lCodeArray[i]=REPLICATE(" ",nSpaces)+lCodeArray[i]
		ENDIF
	ENDIF
	_CLIPTEXT=_CLIPTEXT+lCodeArray[i]+CHR(13)
ENDFOR
And you said you are a programmer! <g>
:-)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform