/* nesting.pov */ #version 3.8; global_settings {assumed_gamma 1} #include "foreach.inc" #declare A = array [4] {1, 2, 3, 4}; #macro m_l10(i_,n_) #debug concat("----------> level 10, n = ",str(n_,0,0),".\n") #end #macro m_l9(i_,n_) #debug concat("---------> level 9, n = ",str(n_,0,0),".\n") //Foreach(A, dictionary {.Macro: "m_l10"}) #end #macro m_l8(i_,n_) #debug concat("--------> level 8, n = ",str(n_,0,0),".\n") Foreach(A, dictionary {.Macro: "m_l9"}) #end #macro m_l7(i_,n_) #debug concat("-------> level 7, n = ",str(n_,0,0),".\n") Foreach(A, dictionary {.Macro: "m_l8"}) #end #macro m_l6(i_,n_) #debug concat("------> level 6, n = ",str(n_,0,0),".\n") Foreach(A, dictionary {.Macro: "m_l7"}) #end #macro m_l5(i_,n_) #debug concat("-----> level 5, n = ",str(n_,0,0),".\n") Foreach(A, dictionary {.Macro: "m_l6"}) #end #macro m_l4(i_,n_) #debug concat("----> level 4, n = ",str(n_,0,0),".\n") Foreach(A, dictionary {.Macro: "m_l5"}) #end #macro m_l3(i_,n_) #debug concat("---> level 3, n = ",str(n_,0,0),".\n") Foreach(A, dictionary {.Macro: "m_l4"}) #end #macro m_l2(i_,n_) #debug concat("--> level 2, n = ",str(n_,0,0),".\n") Foreach(A, dictionary {.Macro: "m_l3"}) #end #macro m_l1(i_,n_) #debug concat("-> level 1, n = ",str(n_,0,0),".\n") Foreach(A, dictionary {.Macro: "m_l2"}) #end Foreach(A, dictionary {.Macro: "m_l1"})