test for integer value

Hello, 

Using a "if" statement how can I evaluate if a global variable (or wave) is an integer or not ?

Any idea or solution are welcome.

many thanks,

all the best

e.

Variable val=pi

if( val == trunc(val) )
    Print "integer"
else
    Print "non-integer"
endif

 

Forum

Support

Gallery

Igor Pro 8

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More