View Full Version : Checking for undefined macros
Peter Boks
05-04-2000, 10:33 PM
Normally all macro execution stops by calling an undefined macro. Does anybody know a way to check if a macro exists? This check should be done from within a macro, without stopping it if the macro it searches for is undefined.
Darren Litherland
05-05-2000, 01:20 AM
The formatting is probably shot: DEFINE MACRO_TEST LOCAL MACRO_NAME LOCAL C LOCAL E READ MACRO "Enter macro name" MACRO_NAME TRAP_ERROR MACRO_NAME LET E (ERROR_STR) LET C (CHECK_ERROR) IF (POS E "not defined") DISPLAY E ELSE DISPLAY ("The macro: "+MACRO_NAME+" is defined.") END_IF END_DEFINE
Frederic LHOTE
09-04-2000, 04:19 AM
Darren's macro is fine but you are obliged to run the macro you want to test. You can also make a LIST_MACRO_NAMES 'your_file.txt' and search for your macro is this file.
Milos Jez
12-23-2000, 10:24 PM
ME10 8.0 macros
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.