The way I've seen this handled before was by using a preprocessor.

So instead of calling BASIC to compile your code, you have your own command 
that wraps BASIC. 

In your case, the first step would be to read each line, find the include 
statements and insert the code (probably with * BEGIN INCLUDE 'x' & * END 
INCLUDE 'x' comments to help us humans).
You would then write it to a temporary directory and call BASIC to compile that 
version.

Regards,
Dan

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David Wolverton 
Sent: Thursday, January 26, 2012 1:25 PM
To: 'U2 Users List'
Subject: [U2] A Thursday Quandry...


UniData.

I have an external subroutine we call thousands of times within a program
(does G/L Account assembly from all the 'pieces' of data).   

Our logic was that making it an 'included' subroutine within the program would 
make it perform faster, and I think that was a good call.

Now it sort of bites during debug, as UniData does not 'explode' the code at 
compile, so that if you're doing interactive debugging, you get the 'same line 
number' each time as you step through that included code - so there's no way to 
know where it's at in the subroutine (and therefore, no good clue how many 
lines you can do "Enn" to step through.)  It's not often that I need this, but 
I'm doing it now and am not believing there is not a 'better way'...

Is there a way to make an Included Subroutine 'insert itself' at compile time - 
as if that code were REALLY in the program??

How have others dealt with this?

David W.


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to