PDA

View Full Version : Calling single gosub from multiple files



3imoh
10-20-2005, 11:38 PM
Hi-

I have a master file that calls a number of other files. I would like for all of these called files to be able to use a single subroutine defined in the main file. Does anyone know if this is possible? It does not seem that a called file can refer to a subroutine in a calling file...

thanks,
Howie

paco
10-20-2005, 11:52 PM
Hi Howie!

If I get you correctly, you need to put this/thoses sub-routnies within each called files... can you give more details/infos about what you need to do? Is the sub-routine(s) at the end of each called files?... or about in the middle?
Sound like you've tried this and it ain't work... right?

3imoh
10-21-2005, 12:29 AM
Hi Paco-

I can get things to work if I put the sub in each file (it is a peck drilling routine). The issue is that if I have to modify my drilling routine I have to go thru all the files. Would be nice if there was the ability to have global subroutines available for all files.

I think I may be able to get around this by creating an entire peck drilling file (instead of a sub)...I would just call the file whenever I needed it...

-Howie

beacon14
10-21-2005, 12:31 AM
if you save the subroutine as a separate file each of the others files could call it when needed.

joecmay
11-14-2005, 01:25 PM
YOU CAN USE CUSTOM CUTS FOR YOUR SUB-ROUTINES AND CALL THEM IN ANY PROGRAM IE C#,51 THE SUB-ROUTINE IS SAVED AS CUSTOM51.SBC WE DO THIS IN ALL OUR PROGRAMS FOR AUTOTOOL CHANGES, SET A SAFE TRAVEL PATH AND OTHER REPEATING CODE. YOU CAN SET YOUR POST TO AUTOMATICLY PUT THEM INTO YOUR PROGRAMS. WE HAVE 45 CUSTOM CUTS, I DON'T KNOW WHAT THE LIMIT IS. USING THE CUSTOM CUT METHOD IS ALOT SHORTER THAN GOING THE C:/SBPARTS/FP,*****.SBP ROUT. ALSO THEY ARE THERE IN THE C PULLDOWN TO BE USED JUST LIKE HOMING X,Y .

Brady Watson
11-14-2005, 03:28 PM
Joe,
Thanks for the tip.

FYI, on the web/in cyberspace typing in all CAPS is considered YELLING...and subsequently is harder to read than if you were just typing normally as you would a letter to a friend.

-Brady

Ryan Patterson
11-14-2005, 06:17 PM
I put together a program for part editing. It makes add the FP, a little easier. Here is the link to download http://www.cabinetpartspro.com/AtoZsetup.exe. If anyone needs any help on using the editor you can email me at coastalcarpentry@cabinetpartspro.com (mailto:coastalcarpentry@cabinetpartspro.com)