Codecore Logo
Quick Search
»
Advanced Search »

Boolean Data Type

RSS
Represents a Boolean value of true or false.


Constructors

Boolean ( )

Initializes a new Boolean instance with a value of false.

Syntax:

Boolean( )

Example:


b = new Boolean(); // results in false

Boolean ( String )

Initializes a new Boolean instance by converting the specified string to a boolean. "true" = true, "false" = false, not case-sensitive.

Syntax:

Boolean( String value )

Parameters:

value: A String.

Example:


s = "true";
b = new Boolean( s ); // results in true

Boolean ( Number )

Initializes a new Boolean instance by converting the specified number to a boolean. 0 results in a value of false, all other numeric values result in true.

Syntax:

Boolean( Number value )

Parameters:

value: A Number.

Example:


i = 100.25;
b = new Boolean( b ); // results in true.

Boolean ( Boolean )

Initializes a new Boolean instance to the specified value.

Syntax:

Boolean( Boolean value )

Parameters:

value: A Boolean.

Example:


b1 = true;
b2 = new Boolean( b1 ); // results in true.
// equivalent to
b2 = b1;

Boolean ( Object )

Initializes a new Boolean instance to a value of true for any values other than those specified by other constructors.

Syntax:

Boolean( Object value )

Parameters:

value: A Object.

Example:


dict = new Dictionary();
b = new Boolean( dict ); // results in true.
Privacy Policy | Conditions Of Use

Copyright ©2014 Codecore Technologies, All rights reserved.