octave-maintainers
[Top][All Lists]
Advanced

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

Re: Implementing show_source function


From: Jordi Gutiérrez Hermoso
Subject: Re: Implementing show_source function
Date: Wed, 4 May 2011 13:54:36 -0500

2011/5/4 Michael D Godfrey <address@hidden>:
> On 05/04/2011 07:55 AM, Jordi Gutiérrez Hermoso wrote:
>
> > Octave has a few mechanisms sort of in place to do this partially,
> > like the edit function and the help function, but they don't work for
> > compiled code (I don't know if Sage has solved this problem for
> > compiled code either). I can see how to do this for m-scripts, but how
> > could something comparable be done for compiled-in functions? I'm
> > thinking it should be possible to modify the DEFUN family of macros to
> > include __LINE__ and __FILE__ so that this information is available to
> > the interpreter. Would this be feasible? I haven't really tried to
> > untangle the magic behind DEFUN.

> This would really be a good feature for Octave.  I hope you can
> find the time to work on it.

This may be easier than I thought, look:

     http://codepad.org/VpEQv7Pz

It may be a simple matter of modifying the DEFUN macros to include
__FILE__ and __LINE__ information, with perhaps some path prefix
information, and then using this information from the edit or help
commands. (The __FUNCTION__ macro isn't standard CPP, but it seems of
limited use for this case anyways.)

I hope it really is easy...

- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]