Bengt,

Quote Originally Posted by Bengt View Post
I had defined the struct inside a procedure, so that behavior is explained by that.

I also have a code part which I re-use by including it on different places in my program. Variables are defined in the beginning of the methods where the code is included and some are only used in the included part. These where of course removed by DFRefactor. That is easy to fix, but anyway, I would prefer that the standard functions weren't selected as default.

Bengt
So if I'm reading that correctly then you have include files where you include logic within a method?

So similar to:
Code:
Procedure MyMethod
  String sFoo
  Number nBar

  ... some code not using sFoo
  #include EXTRACODE.inc  // using sFoo
  ... more code
End_Procedure
and you want DfRefactor to leave your file alone?

I think the better way would be to rewrite that logic similar to this:

Code:
Procedure ExtraCode String ByRef sFoo
  Move "abc" to sFoo
End_Procedure 

Procedure MyMethod
  String sFoo
  Number nBar

  ... some code not using sFoo
  Send Extracode (&sFoo)
  ... more code
End_Procedure
That way DfRefactor won't take away those variables and your code is cleaner.
But I don't know if it is an option for you to rework the code in that way.

Another solution would be to move files you don't want to be touched by DfRefactor in a folder outside of AppSrc/DdSrc so that they are not immediately selected.

--
Wil