Hi all,

On Wed, 17 Apr 2013 15:53:36 +0100
David Cantrell <[email protected]> wrote:

> On Wed, Apr 17, 2013 at 09:38:08AM -0500, Greg London wrote:
> > > On Wed, Apr 17, 2013 at 09:29:34AM -0500, Greg London wrote:
> > >> > You can write macros that have varargs,
> > >> Dumb hardware engineer question:
> > >> Why use macros when you can write a function?
> > > In this very simple case it makes no significant difference.
> > When WOULD it make a difference?
> 
> I'm assuming that you want to use these macros/functions in more than
> one C file.
> 
> Doing it as just a macro means writing and #include-ing one file and the
> job's done.  Doing it as a function means that plus writing another C
> source file, plus frobbing your Makefile to make sure that it gets built
> and linked.  If the benefits (in terms of making the code cleaner or
> more debuggable or whatever) outweigh the minor hassle involved, then
> I'd write a function.
> 
> Incidentally, there is libtap, but I have no idea how complete and
> correct it is, and it appears to have not been updated for some time:
>   http://jc.ngo.org.uk/trac-bin/trac.cgi/wiki/LibTap
> 

I have a maintenance version of libtap here:

http://www.shlomifish.org/open-source/projects/libtap/

Regards,

        Shlomi Fish


-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
My Favourite FOSS - http://www.shlomifish.org/open-source/favourite/

The first phrase that need to be taught when teaching a new language is how to
say “Do you speak English?”. The first thing that needs to be taught when
teaching a new computer tool is how to exit it.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to