Jump to content
Macro Express Forums

Variables Across Macros


m204prgmr
 Share

Recommended Posts

I'm running a macro that has an ASCII process which acquires T10-T15. In the middle of this macro another macro is called to run and in that macro I am saving T1. When this is all done, I'm emailing information using all variables, (T1, T10-T15). My problem is that I am not returning T1 in my text. T1 is a Set Text String Variable and obviously wrong choice. Suggestions? Thanks

Robert

Link to comment
Share on other sites

Then something within your macro is resetting the T1 variable to "" (empty).

 

All variables in Macro Express are global in scope. It does not matter in which level within a chain of callable macros the variable is set or reset. All other macros, up-and-down the calling chain will use the same variable and variable value. In other words, you may have an unlimited number of macros calling other macros, but they will all use the same T1-T99, N1-N99, and D1-D99 set of finite variable tags.

 

This will be true for as long as the current macro session is running. Once a new macro session is fired, all variables are immediately set back to their default empty or zero values. A macro session starts when a macro, or chain of macros, begins execution and ends when it, or they, stop.

 

There is a way to pass variable values to the next macro session, but that is a different subject.

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.

Guest
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.

Loading...
 Share

×
×
  • Create New...