Hey guys,
I know feature suggestions are supposed to go to [email protected], but I'd like some input/ideas on this first, because I don't have a particular model I can propose as an example.
I think it would add a whole new dimension to PB if support for a pre-processor/pre-compiler was introduced. (A program that can modify the source code before compilation, and restore it afterwards, leaving it untouched)
If you don't know what I mean, it's basically this ...
Instead of compiling say hello.bas to hello.exe when you go to Compile the program, a pre-processor is invoked, and allowed to make whatever modifications to the source file it likes. Hello.bas can be modified in any way the pre-compiler likes, before allowing the compiler to do its job.
However, you obviously want to leave the original source code alone and just compile the modified code, and (probably?) deleting the modified code after compilation.
There are so many things that could be made possible by this, from such simple things as embedding Copyright information into various functions, to encoding strings, and so on - the list really is ENDLESS, which is why I think it would be a great addition to the PB compiler - it opens up a whole new dimension.
I have a few ideas about it, but there are several ways to approach this so I'd love to hear others perspectives/ideas.
To me it seems like this would be very easy for Bob/PB staff to add to the compiler, but there are so many ways that they could go about it and I know that nothing less than the best will do.
Many thanks
I know feature suggestions are supposed to go to [email protected], but I'd like some input/ideas on this first, because I don't have a particular model I can propose as an example.
I think it would add a whole new dimension to PB if support for a pre-processor/pre-compiler was introduced. (A program that can modify the source code before compilation, and restore it afterwards, leaving it untouched)
If you don't know what I mean, it's basically this ...
Instead of compiling say hello.bas to hello.exe when you go to Compile the program, a pre-processor is invoked, and allowed to make whatever modifications to the source file it likes. Hello.bas can be modified in any way the pre-compiler likes, before allowing the compiler to do its job.
However, you obviously want to leave the original source code alone and just compile the modified code, and (probably?) deleting the modified code after compilation.
There are so many things that could be made possible by this, from such simple things as embedding Copyright information into various functions, to encoding strings, and so on - the list really is ENDLESS, which is why I think it would be a great addition to the PB compiler - it opens up a whole new dimension.
I have a few ideas about it, but there are several ways to approach this so I'd love to hear others perspectives/ideas.
To me it seems like this would be very easy for Bob/PB staff to add to the compiler, but there are so many ways that they could go about it and I know that nothing less than the best will do.
Many thanks
Comment