jtaseff Posted July 21, 2017 Share Posted July 21, 2017 Say I have a bunch of programs which all get loaded through gpascii. They all have numbers #defined, such as #define progMeasurePart 100 or #define progDrillPart 101. Is there a way to check if these are loaded/exist in PMAC by number? The only way I can figure out is checking if (prog[n].Number==progMeasurePart). However, then I have to loop through from prog[0] up to an unknown number of programs that might exist until I find or don't find the one that matches the number I want. This structure is also not documented. Link to comment Share on other sites More sharing options...
curtwilson Posted July 26, 2017 Share Posted July 26, 2017 I think the easiest way to do this is to try to list the first line of the program. For example: list prog 100,1 might return: 0:linear inc but for a non-existent program list prog 173,1 would return: stdin:19:1: error #22: PROGRAM NOT IN BUFFER: list prog 173,1 Link to comment Share on other sites More sharing options...
Recommended Posts