Hey falks,
I would like to know if there is a way of compilling a piece of code during Run-Time?
Is there a function for doing that?
Printable View
Hey falks,
I would like to know if there is a way of compilling a piece of code during Run-Time?
Is there a function for doing that?
AFAIK you can't. But you can use several functions to call methods by name (such as running DLLs). If you need to compile while runtime I think you need to make a script language, but depends on what you want to do...
What are you tying to do? write a program that outputs code or write a program that can add to itself?
Timing would be ugly but I suppose you could output a VB project (dll), compile it from command line, register it then connect to it.
(that's off the top of my head mind you)
Or investigate the CallByName function, have your code write what it want's to do to text files and read them back later.
You realise I'm just going off on a tangent here :D
OR!!! have your program spawn anther program and leave it instructions (code) in a text file (or the registry) then close, the new program writes to the module source code of the first program then compiles it from consol and restarts the other app, if the other app dies (or doesn't compile) then the program reloads a backup copy. then shuts down.
That would take ages to get working and would probably achieve little :):)
Hm.. using CallByName would make his functions very difficult to use because of the arguments...
Just wanted to say that ;)
so Paul282 im guessing you don't want to be in the group or what? You said if I was going to be commited then you would join, and i have posted a few messages to you here but no replies. I guess ill take that for you dont want to join right? please reply