gmStudio attempts to refactor subroutines the use using GoSub by extracting the GoSub target code into a method can and then calling the extracted method from the locations of the GoSub.
...
In some cases, this technique can fail to produce a good translation ; – for example, when the GoSub is intermingled with Gotos and VB6 error handling logic. In those cases, you may suppress the GoSub migration in for the particular method using using a Refactor rule:
Code Block |
---|
<Compile...> ... <Refactor> <Migrate id="identifier_of_method" RemoveGoSub="on" /> </Refactor> </Compile> |
...
You may also choose to analyze and rework the difficult code to allow GoSub refactoring , or rework it manually after translation. Remember also that that manually modified subroutines may be re-integrated into the upgrade solution using a Refactor/Reauthor directive that is performed after the <Analyse/> operation.