Line numbers, include files

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
NancyM
Pro Scripter
Posts: 66
Joined: Mon Jul 18, 2016 7:01 pm

Line numbers, include files

Post by NancyM » Tue Aug 16, 2016 4:02 pm

It is a bit frustrating dealing with line numbers. Is there any way I can see the line number of the file being included and not the whole conglomeration?

For instance, my main routine has 300 lines, but I'm getting errors on line 600. It'd be more useful to know the line number of the included file really.

Thanks!

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Line numbers, include files

Post by JRL » Tue Aug 16, 2016 4:34 pm

It is a bit frustrating dealing with line numbers. Is there any way I can see the line number of the file being included and not the whole conglomeration?
No.

Try something like this:
Add a line just prior to the Include> line similar to below. You can then simply subtract the value of the "Macro1StartPos" variable from the line number in the error message.

Code: Select all

Let>Macro1StartPos={%_Line_Num%+1}
Include>%Script_dir%\Macro1.scp

NancyM
Pro Scripter
Posts: 66
Joined: Mon Jul 18, 2016 7:01 pm

Re: Line numbers, include files

Post by NancyM » Wed Aug 17, 2016 6:31 pm

Great suggestion! Thanks.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts