Question whether a variable is type_boolean

type:boolean?($variable)

type:boolean?(TRUE)     
#=> ERROR: uncaught_error_on_sunsed_l648 -- Undefined index: true /tmp/ucode/c2c4dea2d6a64366f57a62ac4ffad869e2d260d234b8134c59d50871175c4f0bbc87a22e5ef352283820508d299d81e2c7cfde9beffe0ac2e99538b19d2c7467 2

type:boolean?(FALSE)    
#=> TRUE

type:boolean?(0)        
#=> FALSE

type:boolean?('hi')     
#=> FALSE

type:boolean?(NULL)     
#=> FALSE

type:boolean?(0.0)      
#=> FALSE

type:boolean?(10.0)     
#=> FALSE

type:boolean?('10')     
#=> FALSE

type:boolean?(10.2)     
#=> FALSE

type:boolean?('10.2')   
#=> FALSE

Copyright ©2013-2022 SunSed®. All rights reserved.