Newer
Older

Eric Oulashin
committed
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
return false;
else if (pArray1 == null && pArray2 != null)
return false;
var arraysHaveSameValues = true;
if (pArray1.length != pArray2.length)
arraysHaveSameValues = false;
else
{
for (var a1i = 0; a1i < pArray1.length && arraysHaveSameValues; ++a1i)
{
var seenInArray2 = false;
for (var a2i = 0; a2i < pArray2.length && !seenInArray2; ++a2i)
seenInArray2 = (pArray2[a2i] == pArray1[a1i]);
arraysHaveSameValues = seenInArray2;
}
}
return arraysHaveSameValues;
}
///////////////////////////////////////////////////////////////////////////////////
// For debugging: Writes some text on the screen at a given location with a given pause.
//
// Parameters:
// pX: The column number on the screen at which to write the message
// pY: The row number on the screen at which to write the message
// pText: The text to write
// pPauseMS: The pause time, in milliseconds
// pClearLineAttrib: Optional - The color/attribute to clear the line with.
// If not specified or null is specified, defaults to normal attribute.
// pClearLineAfter: Whether or not to clear the line again after the message is dispayed and
// the pause occurred. This is optional.
function writeWithPause(pX, pY, pText, pPauseMS, pClearLineAttrib, pClearLineAfter)
{
var clearLineAttrib = "\x01n";
if ((pClearLineAttrib != null) && (typeof(pClearLineAttrib) == "string"))
clearLineAttrib = pClearLineAttrib;
console.gotoxy(pX, pY);
console.cleartoeol(clearLineAttrib);
console.print(pText);
if (pPauseMS > 0)
mswait(pPauseMS);
if (pClearLineAfter)
{
console.gotoxy(pX, pY);
console.cleartoeol(clearLineAttrib);
}