Hello,
I've been trying to define lists in .inc files in order to recall a specific one from the main INP file, instead of defining all of them in the INP file. I would do this, e.g., to switch between two sets of patterns in a sequential refinement, or where there could be lists with thousands of values.
Based on the macros in (
http://topas.dur.ac.uk/topaswiki/doku.php?id=sequential_refinements), I defined this, which behaves as expected:
#list nr {
0014
0015
0016}
macro index {nr(Run_Number)}
Then I move the list to
a_list.inc and try to call it from
main.inp:
''' a_list.inc
macro List_A {
#list nr {
014
015
016}
}
''' main.inp
#include a_list.inc
#list recall_list {List_A} ' 1st try: this expands to nothing
#list recall_list {nr} ' 2nd try: this expands to nothing
macro recall_list {nr} ' 3rd try: this expands to "nr(0)" and not the respective value
macro index {recall_list(Run_Number)}
I also tried to make the following definitions work, but to no avail:
''' a_list.inc
macro List_A {
#list nr {
14
15
16}
return nr
}
macro List_A {
14
15
16
}
Thanks for any help!
Stefano