Re: [U2] A Thursday Quandry...
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
Re: [U2] A Thursday Quandry...
With all due respect ... ew! Put the DEBUG command in the INCLUDED code or make it a subroutine for the purpose of debugging it, THEN put it back when you fixed the problem. Sincerely, David Laansma IT Manager Hubbard Supply Co. Direct: 810-342-7143 Office: 810-234-8681 Fax: 810-234-6142 www.hubbardsupply.com Delivering Products, Services and Innovative Solutions -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Daniel McGrath Sent: Thursday, January 26, 2012 3:31 PM To: U2 Users List Subject: Re: [U2] A Thursday Quandry... 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 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] A Thursday Quandry...
Alternate opinions always welcome :) I personally dislike the 'making it a subroutine' method is it can fundamentally can change the program behaviour (changes variable scope) leaving you chasing wild geese in a house of mirrors. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dave Laansma Sent: Thursday, January 26, 2012 2:10 PM To: U2 Users List Subject: Re: [U2] A Thursday Quandry... With all due respect ... ew! Put the DEBUG command in the INCLUDED code or make it a subroutine for the purpose of debugging it, THEN put it back when you fixed the problem. Sincerely, David Laansma IT Manager Hubbard Supply Co. Direct: 810-342-7143 Office: 810-234-8681 Fax: 810-234-6142 www.hubbardsupply.com Delivering Products, Services and Innovative Solutions -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Daniel McGrath Sent: Thursday, January 26, 2012 3:31 PM To: U2 Users List Subject: Re: [U2] A Thursday Quandry... 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 ___ 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
Re: [U2] A Thursday Quandry...
We have used the -D and -Z2 options when compiling and it lets us see the code from the included items when in the debugger. -Dan Dan Goble | IT Senior Software Engineer Interline Brands, Inc. 804 East Gate Drive Suite 100, Mount Laurel, NJ 08054 Office: 856.533.3110 | Mobile: 609.792.6855 E-mail: dan.go...@interlinebrands.com | Website: www.interlinebrands.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] A Thursday Quandry...
You will want the -D option also. This creates the cross reference table for the debugger. Need to use the -Z2 and -D in combination. -Dan Dan Goble | IT Senior Software Engineer Interline Brands, Inc. 804 East Gate Drive Suite 100, Mount Laurel, NJ 08054 Office: 856.533.3110 | Mobile: 609.792.6855 E-mail: dan.go...@interlinebrands.com | Website: www.interlinebrands.com -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 4:59 PM To: 'U2 Users List' Subject: Re: [U2] A Thursday Quandry... I've ALWAYS done the -Z ... never noticed the -Z2 option -- that would read as if it's the answer! I'll give that a try. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan Goble Sent: Thursday, January 26, 2012 3:49 PM To: U2 Users List Subject: Re: [U2] A Thursday Quandry... We have used the -D and -Z2 options when compiling and it lets us see the code from the included items when in the debugger. -Dan Dan Goble | IT Senior Software Engineer Interline Brands, Inc. 804 East Gate Drive Suite 100, Mount Laurel, NJ 08054 Office: 856.533.3110 | Mobile: 609.792.6855 E-mail: dan.go...@interlinebrands.com | Website: www.interlinebrands.com ___ 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 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] A Thursday Quandry...
Dan hit it on the head. I have such a pre-processor (somewhere?) written several times over in angst when working on various systems. David - I'll try to find it today and send it over, then will probably post to my website. T From: Daniel McGrath 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. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users