Check if a variable is a number of wave object in OCEAN/SKIL

L

Lior Dagan

Guest
Hello, in OCEAN, one can define outputs which can be both scalars and wave objects. In Ruby/PERL, it is very easy to know what type of object is a variable. Can one do a similar, if less generic check for that? I.e., get if a variable is a wave object, scalar, or nil.
Thanks,
-Lior
 
On 05/04/14 18:23, Lior Dagan wrote:
Hello, in OCEAN, one can define outputs which can be both scalars
and
wave objects. In Ruby/PERL, it is very easy to know what type of object
is a variable. Can one do a similar, if less generic check for that?
I.e., get if a variable is a wave object, scalar, or nil.
> Thanks, -Lior

Lior,

In general, you can use type(val) and it will tell you the type. With
waveform objects, they return "other" though. Another way is to use
className(classOf(val)) .

Or you can use the appropriate predicate functions, such as
drIsWaveform(), famIsFamily(), fixp(), floatp(), numberp() etc.

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top