lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


When you say it's easy in C#, how would this be any different from C++?

wes

On 9/14/07, Stefan Sandberg <keffo.sandberg@gmail.com> wrote:
> It's very easy and elegant in C#..
>
> http://www.gamedev.net/reference/articles/article2275.asp
>
> Matias Guijarro wrote:
> > Hello,
> >
> > I would like to implement a kind of "help" function,
> > that would return a string documenting the function,
> > taken from the function source code (like Python
> > docstrings...).
> >
> > Maybe someone already tried ?
> >
> > For Lua functions, I think a possible solution would
> > be to use the debug library (debug.getinfo) to find
> > the source file and to extract a kind of "docstring" out
> > of the function code.
> >
> > Of course it will not be possible to do the same for
> > functions defined at runtime (for example if someone
> > does "f=function() return 'HELLO' end" no docstring
> > can be extracted...)...
> >
> > And what about C functions ?
> > If I write a Lua library with C functions, I have no idea
> > how I could get a "docstring" out of it.
> >
> > Any ideas ?
> >
> > Thanks in advance!!!
> >
> >
> >
>
>