Find variable at run time

Josh moonburntm at gmail.com
Sat May 18 22:07:11 PDT 2013


On Saturday, 18 May 2013 at 08:26:09 UTC, Dicebot wrote:
> On Saturday, 18 May 2013 at 02:09:49 UTC, Josh wrote:
>> Bearophile, is your findVar an AA? It looks like it is, I just 
>> didn't think you could put refs in an AA.
>>
>> Thanks
>>
>> Josh
>
> It is AA and it stores pointers, not references.
>
> P.S. There can be found a lot of solutions but they will all do 
> some kind of adding extra run time information, be it "if" 
> chain or AA map. Local variable names exist only during 
> compilation, in compiled binary those are just stack offsets so 
> can't possibly find one based on run time value without that 
> extra info.

Ah, thanks for that.

Josh


More information about the Digitalmars-d-learn mailing list