[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53118] char ( function_handle ) throws error
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #53118] char ( function_handle ) throws error |
Date: |
Sun, 11 Feb 2018 11:05:12 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Update of bug #53118 (project octave):
Severity: 3 - Normal => 2 - Minor
Priority: 5 - Normal => 3 - Low
Status: None => Confirmed
Summary: char( @function_handle ) throws error => char (
function_handle ) throws error
_______________________________________________________
Follow-up Comment #1:
Confirmed. The wider issue is that function handles probably need to
implement an overload of the char function which just returns the string
version of them.
For example,
octave:2> f = @(x) x^2 + 1
f =
@(x) x ^ 2 + 1
Clearly there are routines that understand how to print the string
representation of a function handle.
But,
char (f)
error: octave_base_value::convert_to_str_internal (): wrong type argument
'function handle'
This is the case with all function handles including handles to built-in
functions.
octave:3> char (@plus)
error: octave_base_value::convert_to_str_internal (): wrong type argument
'function handle'
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53118>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/