IsSimpleValue
Determine whether the given value is a string, boolean, numeric, or date value.
Method Signature
IsSimpleValue(value=[any])
Arguments
Argument
Type
Required
Description
Default
value
any
false
Value to test for simple-ness.
Examples
A number is a simple value
isSimpleValue( 42 );
Result: true
A string is a simple value as well
isSimpleValue( "Hello world" );
Result: true
A structure is a complex value
So it can't a be simple value
isSimpleValue( structNew() );
Result: false
An array is a complex value
isSimpleValue( arrayNew( 1 ) );
Result: false
Additional Examples
writeOutput( isSimpleValue( "string" ) & "<br>" );
writeOutput( isSimpleValue( 123456 ) & "<br>" );
writeOutput( isSimpleValue( getTimezone() ) & "<br>" );
writeOutput( isSimpleValue( now() ) & "<br>" );
writeOutput( isSimpleValue( javacast( "char", "A" ) ) & "<br>" );
writeOutput( isSimpleValue( nullValue() ) & "<br>" );
writeOutput( isSimpleValue( [] ) & "<br>" );
writeOutput( isSimpleValue( {} ) & "<br>" );
writeOutput( isSimpleValue( queryNew( "test" ) ) );
Related
Last updated
Was this helpful?