From: Joel VanderWerf Date: 2007-05-04T04:18:48+09:00 Subject: Re: C DSL anyone? Paul Brannan wrote: > On Fri, May 04, 2007 at 01:03:20AM +0900, Joel VanderWerf wrote: >> Paul Brannan wrote: >>> I wrote a tool a while back I called rubypp (pp as in preprocessor), >>> which lets you do something like this: >> ... >>> #ruby def foo(x) ; \ >>> x.to_s.chop ; \ >>> end >> How is this def being used in the output? > > I wish I had a more realisitc example; I think then it would be clearer. > > std::cout << "#{foo(1.0)}" << std::endl; > > std::cout << "1." << std::endl; My bad. I just missed that. So the #ruby stuff is for defining utility functions that can be used inside the C code templates? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407