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


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

Submitter:  Sanjay <sanb>
Submitted:  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
* Mandatory Fields

Add a New Comment Rich Markup

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>
Group 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)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-ee12.
    Corresponding source code