[Remind-Fans] optional arguments to functions

Ian! D. Allen idallen at idallen.ca
Fri Jul 3 15:07:15 EDT 2020


Any easy way to allow functions to have missing arguments that default
to empty?

    /home/idallen/.reminders(117): Not enough arguments

    FSET _Foo(x) iif(x,x,"noarg")
    REM [_Foo("boo")]  # output is "boo"
    REM [_Foo("")]     # output is "noarg"
    REM [_Foo()]       # error, no output, but want "noarg"

Future enhancement?  How about this to mark an optional argument:

    FSET _Foo(x?) iif(x,x,"noarg")

-- 
| Ian! D. Allen, BA, MMath  -  idallen at idallen.ca - Ottawa, Ontario, Canada
| Home: www.idallen.com   Contact Improvisation Dance: www.contactimprov.ca
| Former college professor (Free/Libre GNU+Linux) at:  teaching.idallen.com
| Defend digital freedom:  http://eff.org/  and have fun:  http://fools.ca/


More information about the Remind-fans mailing list