Matt Diephouse <[EMAIL PROTECTED]> wrote: > Matt Diephouse <[EMAIL PROTECTED]> wrote: > > here's a simpler snippet that displays the same failure: > > > > .sub _main :main > > .local pmc pir > > pir = compreg "PIR" > > > > new_pad 0 > > > > $S0 = <<"END_PIR" > > .sub a > > $P1 = find_lex 1, '$a' > > .end > > END_PIR > > $P2 = pir($S0) # using find_name to get the the PMC for a makes it work > > store_global "b", $P2 > > > > c() > > .end > > > > .sub c > > new_pad -1 > > b() # changing this to a() also makes it work > > .end
Leo has now provided another solution. Use: $P2 = pir($S0) $P2 = $P2[0] # get to the first Sub in the Eval store_global "b", $P2 -- matt diephouse http://matt.diephouse.com