jed-users mailing list

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

Re: optional arguments


Joerg Sommer, <joerg@xxxxxxxxxxxx> wrote:

> in slang.txt section "4.1.5 Null_Type" is an example given, that show,
> how to use NULL for functions with optional arguments. But this example
> doesn't work if I call add_numbers() and what's my problem, I don't see
> how to use this with functions with one argument.

"junk";bla()  == bla("junk")
bla(,99) == bla(NULL,99) == NULL;99;bla() == bla(99);NULL
bla(99,) == bla(99,NULL) == 99;NULL;bla() == bla(NULL);99

That means:
- Jed works with an operand stack (similar PostScript)
- Empty comma places are substituted by NULL (just for convenience)

Have fun!

-- Klaus


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