Bug SS-2324
2 votes

Wrong error message when function-as-parameter has previously assigned parameter

Created by Mike Kaganski on 4/20/2016 5:30 AM Last Updated by Mike Kaganski on 4/20/2016 5:37 AM
%
 (hrs)
Logged: 0   (hrs)

 Description

In functions passed as parameters, their fictive arguments must all be names that are previously undefined. If this requirement isn't met, then error is generated.

 

The problem is, that the error's English message is wrong and misleading: "Variables should be defined for argument-functions." It says the opposite to what should be. Supposedly, there should be used "undefined".

 

While we are here, maybe it's possible to enable another variant of syntax for passing parameter functions? I mean, enable passing functions with parameters placehilder not filled at all, i.e. equal to simply #. I know that SMath is sometimes able to do so: time(#) works with empty placeholder. If this would be allowed just for this case (functions-as-params), then no problem would be to find previously unassigned names, and another problem (that having same unassigned names causes wrong results) would be solved, too. SMath only needs to know the number of parameters, doesn't it? Well, empty placeholders give this information.

    Mike Kaganski (Wednesday, April 20, 2016 5:37 AM) #

See also this post.