Table of Contents:
Microsoft JScript 2.0 Functions

Workarounds Available:
 
Add
Array
atan2
Boolean
Dictionary
Exists
Item
Items
join
MAX_VALUE
MIN_VALUE
NaN
NEGATIVE_INFINITY
Number
POSITIVE_INFINITY
reverse
sort
toString
valueOf

No Workarounds Available:
 
arguments
AtEndOfLine
AtEndOfStream
caller
Close
Column
constructor
Count
CreateTextFile
FileSystemObject
Line
OpenTextFile
prototype
Read
ReadAll
ReadLine
Remove
RemoveAll
ScriptEngine
ScriptEngineBuildVersion
ScriptEngineMajorVersion
ScriptEngineMinorVersion
Skip
SkipLine
TextStream
void
Write
WriteBlankLines
WriteLine

Add File

Areas Affected:
JScript 3.0 - Dictionary Object



Background Information:
Adds a key and item pair to a Dictionary object.

Example:
var d;
d = new ActiveXObject("Scripting.Dictionary");
d.Add("a", "Athens");
d.Add("b", "Belgrade");
d.Add("c", "Cairo");



Workaround:
 
Javascript 1.2 Using the Array object, you could mimic the general functionality of the dictionary object. 

function add(arrayIn, addElement) 

   var tempArray = new Array(arrayIn.length); 
   for(i = 0; i < arrayIn.length; i++) 
       tempArray[i] = arrayIn[i]; 

  arrayIn = new Array(tempArray.length+1); 
   for(i = 0; i < tempArray.length; i++) 
      arrayIn[i] = tempArray[i]; 
   arrayIn[arrayIn.length] = addElement; // must be the last element in array 
}

Javascript 1.1 See JavaScript 1.2 entry.
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

arguments

Areas Affected:
JScript 3.0



Background Information:
An array containing each argument passed to the currently executing function.

Example:

function ArgTest()
{
   var i, s, numargs = ArgTest.arguments.length;
   s = numargs;
   if (numargs < 2)
     s += " argument was passed to ArgTest. It was ";
   else
     s += " arguments were passed to ArgTest. They were " ;

   for (i = 0; i < numargs; i++)
     {
       s += ArgTest.arguments[i] + " ";
     }
   return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Array

Areas Affected:
JScript 3.0



Background Information:
Provides support for creation of arrays of any data type.As arrays are zero-based, created elements will have indexes from zero to size -1.
element0,...,elementn The elements to place in the array. This creates an array with n + 1 elements, and a length of n.

Example:

var my_array = new Array();
for (i = 0; i < 10; i++)
    {
    my_array[i] = i;
    }
x = my_array[4];



Workaround:
 
Javascript 1.2 Similar Class exists called Array which uses the same initialization sequence. 

name = new Array(3);

Javascript 1.1 Similar Class exists called Array which uses the same initialization sequence. 

name = new Array(3);

Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

atan2

Areas Affected:
JScript 2.0 Functions



Background Information:
Returns the angle (in radians) from the X axis to a point (y,x).The return value is between -pi and pi, representing the angle of the supplied (y,x) point.



Workaround:
 
Javascript 1.2 Supported in JavaScript 1.0 Math Object.
Javascript 1.1 Supported in JavaScript 1.0 Math Object.
Javascript 1.0 Supported in JavaScript 1.0 Math Object.
JScript 1.0 No Workaround exists

Table of Contents
 

AtEndOfLine

Areas Affected:
JScript 2.0 Function



Background Information:
Returns true if the file pointer is positioned immediately before the end-of-line marker in a TextStream file; false if it is not. Read-only.
The AtEndOfLine property applies only to TextStream files that are open for reading; otherwise, an error occurs.
The following code illustrates the use of the AtEndOfLine property:

function GetALine(filespec)
{
  var fso, a, s, ForReading;
  ForReading = 1, s = "";
  fso = new ActiveXObject("Scripting.FileSystemObject");
  a = fso.OpenTextFile(filespec, ForReading, false);
  while (!a.AtEndOfLine)
  {
    s += a.Read(1);
  }
  a.Close( );
  return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

AtEndOfStream

Areas Affected:
JScript 2.0 Function



Background Information:
Returns true if the file pointer is at the end of a TextStream file; false if it is not. Read-only.
The AtEndOfStream property applies only to TextStream files that are open for reading, otherwise, an error occurs.
The following code illustrates the use of the AtEndOfStream property:

function GetALine(filespec)
{
  var fso, f, s, ForReading;
  ForReading = 1, s = "";
  fso = new ActiveXObject("Scripting.FileSystemObject");
  f = fso.OpenTextFile(filespec, ForReading, false);
  while (!f.AtEndOfStream)
    s += f.ReadLine( );
  f.Close( );
  return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Boolean

Areas Affected:
JScript 2.0 Object



Background Information:
Creates a new Boolean value.
The optional boolvalue argument is the initital Boolean value for the new object. If this value is omitted, or is false, 0, null, NaN, or an empty string, the initial value of the Boolean object is false. Otherwise, the initial value is true. The Boolean object is a wrapper for the Boolean data type. JScript implicitly uses the Boolean object whenever a Boolean data type is converted to a Boolean object. You rarely call the Boolean object explicitly.



Workaround:
 
Javascript 1.2 Boolean Object existed as of JavaScript 1.1.
Javascript 1.1 Boolean Object existed as of JavaScript 1.1.
Javascript 1.0 mode = new Boolean(true) is the same as: 
mode = true 

Therefore, you can replace a Boolean object anywhere with a variable that would hold the predefined true data value.

JScript 1.0 mode = new Boolean(true) is the same as: 
mode = true 

Therefore, you can replace a Boolean object anywhere with a variable that would hold the predefined true data value.

Table of Contents

caller

Areas Affected:
JScript 2.0 Function



Background Information:
Contains a reference to the function that invoked the current function. The caller property is only defined for a function while that function is executing. If the function is called from the top level of a JScript program, caller contains null. If the caller property is used in a string context, the result is the same as functionname.toString, that is, the decompiled text of the function is displayed.

Example:

function CallLevel()
{
  if (CallLevel.caller == null)
    return("CallLevel was called from the top level.");
  else
    return("CallLevel was called by another function.");
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Close

Areas Affected:
JScript 2.0 Function - TextStream Object



Background Information:
Closes an open TextStream file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Column

Areas Affected:
JScript 2.0 Function - TextStream Object



Background Information:
Read-only property that returns the column number of the current character position in a TextStream file. After a newline character has been written, but before any other character is written, Column is equal to 1.

Example:

function GetColumn()
{
  var fso, f, m;
  var ForReading = 1, ForWriting = 2;
  fso = new ActiveXObject("Scripting.FileSystemObject");
  f = fso.OpenTextFile("c:\\testfile.txt", ForWriting, true);
  f.Write("Hello World!");
  f.Close();
  f = fso.OpenTextFile("c:\\testfile.txt", ForReading);
  m = f.ReadLine();
  return(f.Column);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

constructor

Areas Affected:
JScript 2.0 Function - All Objects



Background Information:
Specifies the function that creates an object.

Example:

y = new MyFunc();
if (y.constructor == MyFunc)
    // do something



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Count

Areas Affected:
JScript 2.0 Function - Dictionary Object



Background Information:
Returns the number of items in a collection or Dictionary object. Read-only.

Example:

function CountDemo()
{
  var a, d, i, s;                 // Create some variables.
  d = new ActiveXObject("Scripting.Dictionary");
  d.Add ("a", "Athens");          // Add some keys and items
  d.Add ("b", "Belgrade");
  d.Add ("c", "Cairo");
  a = (new VBArray(d.Keys()));    // Get the keys.
  s = "";
  for (i = 0; i < d.Count; i++)   //Iterate the dictionary.
  {
    s += a.getItem(i) + " - " + d(a.getItem(i)) + "<br>";
  }
  return(s);              // Return the results.
}
 



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

CreateTextFile

Areas Affected:
JScript 2.0 Functio - TextStream Object



Background Information:
Creates a specified file name and returns a TextStream object that can be used to read from or write to the file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Dictionary

Areas Affected:
JScript 2.0 Object



Background Information:
A Dictionary object is the equivalent of a PERL associative array. Items can be any form of data, and are stored in the array. Each item is associated with a unique key. The key is used to retrieve an individual item and is usually a integer or a string, but can be anything except an array.


Workaround:
 
Javascript 1.2 Using the Array object, you could mimic the general functionality of the dictionary object. Some of the useful functions could be coded such as: 
y.add ("a", "test"); 
if (y.Exists("a")) 

Add and exists are simply: 

function add(arrayIn, addElement) 

   var tempArray = new Array(arrayIn.length); 
   for(i = 0; i < arrayIn.length; i++) 
       tempArray[i] = arrayIn[i]; 

  arrayIn = new Array(tempArray.length+1); 
   for(i = 0; i < tempArray.length; i++) 
      arrayIn[i] = tempArray[i]; 
   arrayIn[arrayIn.length] = addElement; // must be the last element in array 

function exists(arrayIn, element) 

   for(i = 0; i < arrayIn.length; i++) 
   { 
       if(arrayIn[i] == element) 
           return true; 
   } 
   return false; 
}

Javascript 1.1 See JavaScript 1.2 entry.
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Exists

Areas Affected:
JScript 2.0 Function - Dictionary Object



Background Information:
Returns true if a specified key exists in the Dictionary object, false if it does not.



Workaround:
 
Javascript 1.2 Using the Array object, you could mimic the general functionality of the dictionary object. 

function exists(arrayIn, element) 

   for(i = 0; i < arrayIn.length; i++) 
   { 
       if(arrayIn[i] == element) 
           return true; 
   } 
   return false; 
}

Javascript 1.1 See JavaScript 1.2 entry.
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

FileSystemObject

Areas Affected:
JScript 2.0 Object



Background Information:
Provides access to a computer's file system.

The following code illustrates how the FileSystemObject is used to return a TextStream object that can be read from or written to:

Example:
var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile("c:\\testfile.txt", true);
a.WriteLine("This is a test.");
a.Close();



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Item

Areas Affected:
JScript 2.0 Function - Dictionary Object



Background Information:
Sets or returns an item for a specified key in a Dictionary object. For collections, returns an item based on the specified key. Read/write. If key is not found when changing an item, a new key is created with the specified newitem. If key is not found when attempting to return an existing item, a new key is created and its corresponding item is left empty.


Workaround:
 
Javascript 1.2 Using the Array object, you could mimic the general functionality of the dictionary object. 

function add(arrayIn, addElement, value) 

  eval("arrayIn[\"" + addElement + "\"] = value"); 

function exists(arrayIn, element) 

   for(i = 0; i < arrayIn.length; i++) 
   { 
     if(eval("arrayIn[\"" + element + "\"]") != null) 
         return true; 
   } 
   return false; 

function item(arrayIn, keyword, newValue) 

    if(exists(arrayIn, keyword)) 
       arrayIn[keyword] = newValue; 
   else 
       add(arrayIn, keyword, newValue); 

 

Javascript 1.1 See JavaScript 1.2 entry.
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Items

Areas Affected:
JScript 3.0 Function - Dictionary Object



Background Information:
Returns an array containing all the items in a Dictionary object.



Workaround:
 
Javascript 1.2 If you were to implement the equivalent dictionary object using Array elements, you would always have access to the array that held all of the elements within.
Javascript 1.1 See JavaScript 1.2 entry.
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

join

Areas Affected:
JScript 3.0 Array Function



Background Information:
Converts all elements of an array into a String object and joins them.


Workaround:
 
Javascript 1.2 As of JavaScript 1.1, the join function has been a method of the Array object.
Javascript 1.1 As of JavaScript 1.1, the join function has been a method of the Array object.
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Key

Areas Affected:
JScript 3.0 Function - Dictionary Object



Background Information:
Sets a key in a Dictionary object.
If key is not found when changing a key, a new key is created and its associated item is left empty.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Keys

Areas Affected:
JScript 3.0 Function - Dictionary Object



Background Information:
Returns an array of the keys used to search the dictionary object.


Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Line

Areas Affected:
JScript 3.0 - TextStream Object



Background Information:
Read-only property that returns the current line number in a TextStream file.
After a file is initially opened and before anything is written, Line is equal to 1.


Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

MAX_VALUE

Areas Affected:
JScript 3.0 Constant



Background Information:
The largest number representable in JScript. Equal to approximately 1.79E+308.



Workaround:
 
Javascript 1.2 In the beginning of the document, define constants MAX_VALUE and MIN_VALUE to values given above. 
Javascript 1.1 See JavaScript 1.2 entry
Javascript 1.0 See JavaScript 1.2 entry
JScript 1.0 No Workaround exists

Table of Contents
 

MIN_VALUE

Areas Affected:
JScript 3.0 Constant



Background Information:
The number closest to zero representable in JScript. Equal to approximately 2.22E-308.



Workaround:
 
Javascript 1.2 In the beginning of the document, define constants MAX_VALUE and MIN_VALUE to values given above.
Javascript 1.1 See JavaScript 1.2 entry
Javascript 1.0 See JavaScript 1.2 entry
JScript 1.0 No Workaround exists

Table of Contents
 

NaN

Areas Affected:
JScript 3.0 Constant



Background Information:
A special value that indicates an arithmetic expression returned a value that was not a number.


Workaround:
 
Javascript 1.2 Available as of JavaScript 1.1
Javascript 1.1 Available as of JavaScript 1.1
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

NEGATIVE_INFINITY

Areas Affected:
JScript 3.0 Constant



Background Information:
A value more negative than the largest negative number (-Number.MAX_VALUE) representable in JScript.



Workaround:
 
Javascript 1.2 Available as of JavaScript 1.1
Javascript 1.1 Available as of JavaScript 1.1
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Number

Areas Affected:
JScript 3.0 Object



Background Information:
Number object is a new type in JavaScript 1.1 that represents a numerical number.



Workaround:
 
Javascript 1.2 Available as of JavaScript 1.1
Javascript 1.1 Available as of JavaScript 1.1
Javascript 1.0 In JavaScript 1.1, Number objects are created by the Number constructor, for example 
mode = new Number ( 4 ); 

In JavaScript 1.0, all Numbers had to be created by assignments, for example, 
mode = 4;

JScript 1.0 No Workaround exists

Table of Contents
 

OpenTextFile

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

POSITIVE_INFINITY

Areas Affected:
JScript 3.0 Constant



Background Information:
A value larger than the largest number (Number.MAX_VALUE) representable in JScript.


Workaround:
 
Javascript 1.2 Available as of JavaScript 1.1
Javascript 1.1 Available as of JavaScript 1.1
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

prototype

Areas Affected:
JScript 3.0 - Number Object



Background Information:
Use the prototype property to provide a base set of functionality to a class of objects. New instances of an object "inherit" the behavior of the prototype assigned to that object. For example, say you want to add a method to the Array object that returns the value of the largest element of the array. To do this, declare the function, add it to Array.prototype, and then use it.

Example:
function array_max( )
{
  var i, max = this[0];
  for (i = 1; i < this.length; i++)
  {
     if (max < this[i])
      max = this[i];
  }
  return max;
}
Array.prototype.max = array_max;
var x = new Array(1, 2, 3, 4, 5, 6);
var y = x.max( );

After this code is executed, y contains the largest value in the array x, or 6.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Read

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Reads a specified number of characters from a TextStream file and returns the resulting string.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

ReadAll

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Reads an entire TextStream file and returns the resulting string.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

ReadLine

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Reads an entire line (up to, but not including, the newline character) from a TextStream file and returns the resulting string.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Remove

Areas Affected:
JScript 3.0 Function - Dictionary Object



Background Information:
Removes a key, item pair from a Dictionary object.
An error occurs if the specified key, item pair does not exist.

Example:

var a, d, i, s;              // Create some variables.
d = new ActiveXObject("Scripting.Dictionary");
d.Add ("a", "Athens");       // Add some keys and items
d.Add ("b", "Belgrade");
d.Add ("c", "Cairo");
d.Remove("b");               // Remove second pair.



Workaround:
 
Javascript 1.2 No Workaround exists.
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

RemoveAll

Areas Affected:
JScript 3.0 Function - Dictionary Object



Background Information:
The RemoveAll method removes all key, item pairs from a Dictionary object.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

reverse

Areas Affected:
JScript 3.0 Function - Array Object



Background Information:
Reverses the elements of an Array object.


Workaround:
 
Javascript 1.2 Available as of JavaScript 1.1 in the Array object
Javascript 1.1 Available as of JavaScript 1.1 in the Array object
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

ScriptEngine

Areas Affected:
JScript 3.0 Functions



Background Information:
Returns a string representing the scripting language in use.

The ScriptEngine function can return any of the following strings:
"JScript" =  Indicates that Microsoft JScript is the current scripting engine.
"VBA" = Indicates that Microsoft Visual Basic® for Applications is the current scripting engine.
"VBScript" = Indicates that Microsoft Visual Basic Scripting Edition is the current scripting engine.

Example:
function GetScriptEngineInfo()
{
    var s;
    s = ""; // Build string with necessary info.
    s += ScriptEngine() + " Version ";
    s += ScriptEngineMajorVersion() + ".";
    s += ScriptEngineMinorVersion() + ".";
    s += ScriptEngineBuildVersion();
    return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

ScriptEngineBuildVersion

Areas Affected:
JScript 3.0 Functions



Background Information:
Returns a string representing the build version of the scripting language in use.

The ScriptEngine function can return any of the following strings:
"JScript" =  Indicates that Microsoft JScript is the current scripting engine.
"VBA" = Indicates that Microsoft Visual Basic® for Applications is the current scripting engine.
"VBScript" = Indicates that Microsoft Visual Basic Scripting Edition is the current scripting engine.

Example:
function GetScriptEngineInfo()
{
    var s;
    s = ""; // Build string with necessary info.
    s += ScriptEngine() + " Version ";
    s += ScriptEngineMajorVersion() + ".";
    s += ScriptEngineMinorVersion() + ".";
    s += ScriptEngineBuildVersion();
    return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

ScriptEngineMajorVersion

Areas Affected:
JScript 3.0 Functions



Background Information:
Returns a string representing the major version of the scripting language in use.

The ScriptEngine function can return any of the following strings:
"JScript" =  Indicates that Microsoft JScript is the current scripting engine.
"VBA" = Indicates that Microsoft Visual Basic® for Applications is the current scripting engine.
"VBScript" = Indicates that Microsoft Visual Basic Scripting Edition is the current scripting engine.

Example:
function GetScriptEngineInfo()
{
    var s;
    s = ""; // Build string with necessary info.
    s += ScriptEngine() + " Version ";
    s += ScriptEngineMajorVersion() + ".";
    s += ScriptEngineMinorVersion() + ".";
    s += ScriptEngineBuildVersion();
    return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

ScriptEngineMinorVersion

Areas Affected:
JScript 3.0 Functions



Background Information:
Returns a string representing the minor version of the scripting language in use.

The ScriptEngine function can return any of the following strings:
"JScript" =  Indicates that Microsoft JScript is the current scripting engine.
"VBA" = Indicates that Microsoft Visual Basic® for Applications is the current scripting engine.
"VBScript" = Indicates that Microsoft Visual Basic Scripting Edition is the current scripting engine.

Example:
function GetScriptEngineInfo()
{
    var s;
    s = ""; // Build string with necessary info.
    s += ScriptEngine() + " Version ";
    s += ScriptEngineMajorVersion() + ".";
    s += ScriptEngineMinorVersion() + ".";
    s += ScriptEngineBuildVersion();
    return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Skip

Areas Affected:
JScript 3.0 Functions - TextStream Object



Background Information:
Skips a specified number of characters when reading a TextStream file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

SkipLine

Areas Affected:
JScript 3.0 Functions - TextStream Object



Background Information:
Skips the next line when reading a TextStream file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

sort

Areas Affected:
JScript 3.0 Functions - Array Object



Background Information:
The sort method sorts the Array object in place; no new Array object is created during execution.
If you supply a function in the sortfunction argument, it must return one of the following values:

A negative value if the first argument passed is less than the second argument.
Zero if the two arguments are equivalent.
A positive value if the first argument is greater than the second argument.



Workaround:
 
Javascript 1.2 Available as of JavaScript 1.1 in the Array object
Javascript 1.1 Available as of JavaScript 1.1 in the Array object
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

TextStream

Areas Affected:
JScript 3.0 TextStream Object



Background Information:
Facilitates sequential access to file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

toString

Areas Affected:
JScript 3.0 Object Function



Background Information:
Returns a string representation of an object.

The toString method is a member of all built-in JScript objects. How it behaves depends on the object type:

"Array Elements" of an Array are converted to strings. The resulting strings are concatenated, separated by commas.
"Boolean" If the Boolean value is true, returns "true". Otherwise, returns "false"
"Function" Returns a string returned of the following form, where functionname is the name of the function whose toString method was called:
function functionname( ) { [native code] }
"Number" Returns the textual representation of the number.
"String" Returns the value of the String object.
"Default Returns" "[object objectname]", where objectname is the name of the object type.



Workaround:
 
Javascript 1.2 function toString(convertObj) 

   var tempString = ""+convertObj+""; 
   return tempString; 
}
Javascript 1.1 See JavaScript 1.2 entry
Javascript 1.0 See JavaScript 1.2 entry
JScript 1.0 No Workaround exists

Table of Contents
 

valueOf

Areas Affected:
JScript 3.0 Object Function



Background Information:
Returns the primitive value of the specified object.
The valueOf method is defined differently for each intrinsic JScript object.

"Array" The elements of the array are converted into strings, and the strings are concatenated together, separated by commas. This behaves the same as the Array.toString and Array.join methods.
"Boolean" The Boolean value.
"Date" The stored time value in milliseconds since midnight, January 1, 1970 UTC.
"Function" The function itself.
"Number" The numeric value.
"Object" The object itself. This is the default.
"String" The string value.



Workaround:
 
Javascript 1.2 Available as of JavaScript 1.1 on all objects
Javascript 1.1 Available as of JavaScript 1.1 on all objects
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

void

Areas Affected:
JScript 3.0 Functions



Background Information:
The void operator evaluates its expression, and returns undefined. It is most useful in situations where you want an expression evaluated but do not want the results visible to the remainder of the script.


Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Write

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Specified strings are written to the file with no intervening spaces or characters between each string. Use the WriteLine method to write a newline character or a string that ends with a newline character.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

WriteBlankLines

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Writes a specified number of newline characters to a TextStream file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

WriteLine

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Writes a specified string and newline character to a TextStream file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents