On Tue, Aug 19, 2008 at 5:07 AM, Mark Miesfeld <[EMAIL PROTECTED]> wrote: > >> + INTERNAL_METHOD(rexx_erase_queue) > >> +RexxMethod0(int, rexx_clear_queue) > >> +::METHOD empty EXTERNAL 'LIBRARY REXX rexx_clear_queue' > > You can not define the name as rexx_erase_queue in one place and then > expect rexx_clear_queue to be understood in another place.
Jon, I think it would be better if you use the the word empty in the name. It is consistent with the other names in the RexxQueueMethods.cpp file. The above would become: + INTERNAL_METHOD(rexx_empty_queue) +RexxMethod0(int, rexx_empty_queue) +::METHOD empty EXTERNAL 'LIBRARY REXX rexx_empty_queue' FYI to understand this a little better: The name rexx_empty_queue is the name of C++ function (or you could think of it as a method name) that implements the functionality of the ooRexx empty() method. Just as you wouldn't expect to be able to use 2 different method names in ooRexx for the same method, you can't use 2 different names in the C++ code for the same function. It is a little harder to see that all 3 lines above refer to the same thing because they are in different files, but they do. This line: +::METHOD empty EXTERNAL 'LIBRARY REXX rexx_empty_queue' Tells the interpreter that when the the ooRexx empty() method is invoked, it should call the C++ function with a name of "rexx_empty_queue" in an external library with the name of "REXX" On Windows this is a DLL and the name of REXX resolves to a DLL name of rexx.dll. The other 2 lines are even harder to understand because they are actually macros that resolve to something different than what you actually see. But, you can think of them this way to understand them somewhat: + INTERNAL_METHOD(rexx_empty_queue) That line is something that provides the C++ compiler information it needs when it is compiling the source code. This line: +RexxMethod0(int, rexx_empty_queue) Is the start of the actual source code implementation. -- Mark Miesfeld ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel