Chapter 3 DynaScript Predefined Objects


Boolean object

Object

Allows you to create an object with a value of true or false. The Boolean object has no properties.

Standard: ECMAScript

Syntax

Boolean.MethodName( parameter ) 

Description

You can set the Boolean object's value when you create the object, or at a later date. To create a Boolean object, use this constructor:

BoolObj = new Boolean ( [value] );

If you provide a value, the Boolean object will contain that initial value. If you do not provide a value, the object will have the value of false.

Example

This example creates a Boolean object and sets the value as false:

<!--SCRIPT 
myBool = new Boolean( false );
document.WriteLn( myBool );
-->

 


Copyright © 1999 Sybase, Inc. All rights reserved.