Hi all
I'm doing a bunch of stuff with local parameters and macros, and am coming across a few issues with not finding local parameters once I've defined them, and I think it is because of the different macro expansions having objects in them that introduce a new level, and so the order in which I have my macros is important.
What introduces a new level (or scope)?
From techref: "The local keyword is used for defining named parameters as local to the top, xdd or phase level."
I take this as meaning I can have global local parameters (??) if they are declared at the beginning of an inp file, local prms that belong to an `xdd` or `yobs_eqn`, and local prms that belong to a `str`, `hkl_Is`, `xo_Is`, or `d_Is`.
Are there any other keywords that introduce a new level? Is there anyway of manually defining (or just ending) a level?
How I think it works:
'this is top level. everything here globally accessable.
...
xdd ...
'local prms in here are only visible to things inside the xdd
...
str
'local prms in here are only visible to things inside the str
...
...
...
...
'this still belongs to the str
yobs_eqn ...
'local prms in here are only visible to things inside the yobs_eqn
...
d_Is
'local prms in here are only visible to things inside the str
...
...
...
'this still belongs to the d_Is. There is no way to declare a local prm of yobs_eqn scope down here
.
Also, most of this is in v5, as that is what I have at work...