Sub Program Call Value

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Re: Sub Program Call Value

Postby fsli » Sat Nov 05, 2022 12:35 pm

Here's another method that does work. This doesn't rely on any misinterpreted, undocumented data structures. :oops:

The idea is the same: Look for the program line that contains the entry point name. I thought the Substack list would give me a shortcut, but that didn't work out. In this macro, I look at every line of the program, starting with the line from which the macro was executed and working backwards toward the top of the program file. It's expected that the subroutine entry point (for example, O2001) will occur at the beginning of some program line which precedes the macro call.

I'll attach the macro text file so there shouldn't be any problem with mistyped punctuation.

This is the program I used for testing:

M98P2000
M30
O2000M9991
M98P2001
M99
O2001
M9991
M99
Attachments
M9991.txt
(852 Bytes) Downloaded 212 times
Frank
fsli
 
Posts: 97
Joined: Mon Jul 11, 2022 12:36 am

Re: Sub Program Call Value

Postby MrCactus1 » Sat Nov 05, 2022 4:46 pm

Thanks for the attempted help. I have decided to key in on the M3 call and what work offset is selected.
MrCactus1
 
Posts: 10
Joined: Thu Oct 27, 2022 9:04 pm

Previous

Return to Macros

Who is online

Users browsing this forum: No registered users and 17 guests