Chapter 3 DynaScript Predefined Objects
Allows you to create an object with a value of true or false. The Boolean object has no properties.
Standard: ECMAScript
Boolean.MethodName( parameter )
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 contains that initial value. If you do not provide a value, the object has the value of false.
This example creates a Boolean object and sets the value as false:
<!--SCRIPT myBool = new Boolean( false ); document.WriteLn( myBool ); -->
Boolean.toString( )
Returns the value of the Boolean as a string.
String
This example returns the value of the Boolean as a string:
<!--SCRIPT myBool = new Boolean(true); document.WriteLn(myBool.toString() ); -->
Boolean.valueOf( )
Returns the value of the Boolean object.
Boolean
This example returns the value of the Boolean object:
<!--SCRIPT myBool = new Boolean(true); document.WriteLn(myBool.valueOf() ); -->
Copyright © 2001 Sybase, Inc. All rights reserved. |
![]() |