Hi all, Can somebody help with this scenario? const cbassets = @["g", "e", "x", "m", "pos", "neg", "nau"] template mybootup*(): expr = bootSystems() for ipos, i in @[system_flats_g, system_flats_e, system_flats_x, system_flats_m, system_flats_pos, system_flats_neg, system_flats_nau]: echo "system_flats_" & cbassets[ipos] & "= ", $i
This template runs a macro named _bootSystems()_, which generates the "system_flats" variables, that the above code loops to show they were created. I'd next like to run a 2nd macro, say _bootSystems2()_, which uses the "system_flats" variables, but I get an error that says **"undeclared identifier"**, since those var variables aren't available to the 2nd macro. How do I make dynamically created variables persist "within the entire VM?" phase, just like they do for my normal program? The purpose of bootSystems2() macro will be to create some dynamically created procs, but it needs access to the "system_flats" variables to do that. I would love to keep everything within my _bootSystems()_ macro, but that gives "**Error: VM problem: too many registers required**". Do I need to update nim here? (currently runnning 0.13.0). Thanks.