Hey JLWest,
@Gustavo 'Gus' Carreno Thanks.
Quite welcome!
I saw it done somewhere but can't find it. But then again I may have miss read the code or didn't understand what I was reading.
It's funny you mention this, cuz not long ago someone asked the same thing but with a slight difference on the details:
Define keyword (procedure name) inside running program.
What you're looking for is quite easy to achieve on interpreted/scripting languages, like Perl, PHP or Python, to name a few.
But Pascal is a strongly typed language that is compiled. Resolving names at run time is a no-no.
The compiler actually forgets all names and then just uses indexes to internally built tables.. Well, kind of, since it's a bit more complicated than that
So in a sense, names are irrelevant in a compiled environment, again, with a bit of humour since it is quite more complicated than that.
Cheers,
Gus