octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Testing for function handles


From: Richard
Subject: Re: Testing for function handles
Date: Wed, 09 Nov 2011 10:01:18 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 09/11/2011 08:18, Dr. Alexander Klein wrote:
Good morning,

is there any preferred way to check whether a given parameter or variable 
contains a function handle?

I find myself strcmp'ing the result of typeinfo quite often, but this is really 
clumsy. Then again, ishandle only checks for graphics handles ...

Best regards,

        Alex


if it is octave code you can use the 'isa' function e.g.

isa(@sin, 'function_handle')

but maybe I'm misunderstanding and you mean in the C++ sources or something.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]