[SAC-HELP] detecting "inf" and "nan" in sac
Igor Stubailo
stubailo at gmail.com
Tue Aug 16 22:53:17 PDT 2011
Hello,
Is there any way to detect a non-number value (like inf and nan) in an if loop?
I couldn't find any references to this in the manual.
All versions below are simply ignored by sac:
mtw %min %max
rms to user0
setbb sta &1,user0
*** doesn't work:
if %sta eq inf
message "***** not a number ******"
endif
*** doesn't work:
if %sta eq "inf"
message "***** not a number ******"
endif
Note, this works:
if %sta eq 0
message "***** detected zero ******"
endif
Thanks,
Igor
More information about the sac-help
mailing list