handypam
asked on
Is it possible to evaluate the code in an include file before it is included?
Hi there,
I have an application that generates code which it writes to file. Then the main program includes and runs this file in amongst all the other bits and bobs.
My question is ...
Is there a way to ensure that the generated code is without errors before it is run?
As on the odd occasion an error has been written into the file it just breaks the whole system.
I have been racking my brains to work out a way to do this but i cant think of anything.
I am not really looking for code, just a theory or idea as to how this could be achieved.
Thank you for your ideas.
I have an application that generates code which it writes to file. Then the main program includes and runs this file in amongst all the other bits and bobs.
My question is ...
Is there a way to ensure that the generated code is without errors before it is run?
As on the odd occasion an error has been written into the file it just breaks the whole system.
I have been racking my brains to work out a way to do this but i cant think of anything.
I am not really looking for code, just a theory or idea as to how this could be achieved.
Thank you for your ideas.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have implemented something along the lines of the first response and have therefore award it the most points.
But as all ideas have helped my thought process i am awarding all some points
thanks