bugfussy - Bugs: bug #57841, Built-in functions cannot be...


bug #57841: Built-in functions cannot be passed as argument to user defined functions/procs

Submitted by:  Sanjay <sanb>
Submitted on:  Mon 17 Feb 2020 09:13:23 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 17 Feb 2020 09:13:23 PM UTC, original submission:  

A user-defined function like

g(func f,x){return f(x);}

takes a 1-argument function as the first argument of g().  However currently, this first argument must be also a user-defined function.  A built-in function with the same signature cannot be passed as an argument.


> f(x){return sin(x);}

> g(f,10pm4)
              -0.54402 +/-    3.35629
> g(sin,10pm4)
###Error: syntax error near token ',' in "g(sin,10.0pm4)"

Sanjay <sanb>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by sanb (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.5