jed-users mailing list

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

Re: optional arguments


Günter Milde <milde@xxxxxxxxxxxxxxxxxxxx> wrote:
>A big feature wish for slang would be a support for optional arguments in a
>form like
>
>define foo(arg1, arg2=default, arg3=default2)

S-Lang 2 may provide support for IDL/VMS-like qualifiers.  I.e.,

   plot (x, y, /linestyle="dashed");

where plot is defined as. e.g,,

   define plot (x, y)
   {
      if (qualifer_set ("linestyle", "dashed"))
        set_linestyle ("dashed");
      .
      .
   }

I have not though too much about this yet and any implementation is
very likely to differ from the about example.

--John


--------------------------
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]