>Hi Gérald;
>
>
>>I suppose the parser see the word DEFINE as a procedure (DEFINE CLASS)
>>and start a new indentation block...
>
>Yes, that's right. Is there any option that stops this behavior ?
>
>Tks
>
>Claudio
You probably search for a more direct solution but...
The following code will probably take care of the problem.
CTRL+A your code
CTRL+C to clipboard
Run the following code
CTRL+P back in place
nlines=ALINES(lCodeArray,_CLIPTEXT)
_CLIPTEXT=""
FOR i = 2 to nLines
IF lCodeArray[i]="DEFINE" AND !lCodeArray[i]="DEFINE CLASS"
nTabs=OCCURS(CHR(9),lCodeArray[i-1])
IF nTabs > 0
lCodeArray[i]=REPLICATE(CHR(9),nTabs)+lCodeArray[i]
ENDIF
ENDIF
_CLIPTEXT=_CLIPTEXT+lCodeArray[i]+ CHR(13)
ENDFOR
HTH :-)
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