jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: optional arguments


On Sun, Jun 15, 2003 at 11:48:29AM -0400, John E. Davis wrote:
> Günter Milde <milde@xxxxxxxxxxxxxxxxxxxx> wrote:
> >Unfortunately, menu_append_item doesnot set _NARGS right, when calling a
> >function with the 4th argument as argument. So use with caution.
> 
> The underlying C code is menu.c is missing the appropriate calls to
> SLang_start/end_arg_list.  The next release will fix this.
 
This is good news. Thanks!

Caution is still needed for library functions that sometimes pass arguments
by simply leaving them on stack. As this makes code faster and simpler I
consider this as a feature and not a bug, however.


A big feature wish for slang would be a support for optional arguments in a
form like

define foo(arg1, arg2=default, arg3=default2)

which would make my modes several lines shorter and much nicer.

Günter

-- 
Milde at ife.et.tu-dresden.de

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]