[slang-users] Advice on "complex" data type integration
John E. Davis
davis at space.mit.edu
Mon Oct 24 13:05:22 EDT 2005
Robert Lipe <robertlipe at usa.net> wrote:
>If you have doc or examples on these, and think this is a pond worth
>fishing in, I'd like to check them out.
JED <http://www.jedsoft.org/jed/> makes use of the sget functions
for its "Mark_Type" objects representing buffer positions. It also
defines a number of binary operators for these objects allowing
comparisons of buffer positions, e.g.,
if (m1 > m2)
(m1, m2) = (m2, m1); % swap the marks
The marks are represented as SLANG_CLASS_TYPE_MMT objects so that the
memory associated with them is managed by the interpreter. This means
that such objects will automatically be freed (by calling the appropriate
destroy method) when nolonger used.
The code may be found in paste.c in the jed distribution.
Perhaps this coming weekend I will add a more complete example to the
demo directory. But I think the code in paste.c should be enough to
get you started.
--John
More information about the slang-users-l
mailing list