Jump to content
Macro Express Forums

Why necessary to re-define restored variables?

Recommended Posts

I've always wondered why MX Pro wasn't coded to automatically define any variables that are inherited from a submacro, but just accepted the chore of doing it manually. However I've just noticed that it has apparently captured and stored these, so I'm puzzled why that very useful extra step of adding them automatically was not implemented?


In case that wasn't clear:

Macro-A contains Macro-B. Macro B uses variable XYZ and at its end includes a Variable Save. But if I run Macro-A, which starts with a Variable Restore, XYZ cannot be displayed in a TBD command, for example. Yet, directly after running Macro-A in debug mode with F9 and then using F5, XYZ is included in the displayed list.


It's no big problem, of course, but it would be helpful when developing a complex macro to have any restored variables added automatically under the Variables tab.



Terry, East Grinstead, UK

Link to comment
Share on other sites

I don't have a lot of time to consider your question so I might be off base here. What I can say is MEP once confused me on this matter and once I understood it everything they do makes perfect sense. Have you considered scope? Read my paper here if you think it might be of use.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...