GetCount() | Returns the number of values in the queue |
---|---|
AddHead() | Adds value to the beginning of the list |
AddTail() | Adds value to the end of the list |
GetHead() | Returns a value from beginning of the list |
GetTail() | Returns a value from the end of the list |
RemoveHead() | Removes value from beginning of the list |
RemoveTail() | Removes value from the end of the list |
SaveToArray() | Returns 1-dimensional array of values queue |
var iRow;
var oList = Pm.CreatePmList();
oList.AddHead("TitleHead");
for (iRow = 0; iRow <= 10; iRow++)
{
oList.AddTail("row" + iRow);
}
// ----------SaveToArray----------
var arr = oList.SaveToArray();
// ----------RemoveHead, RemoveTail----------
var nCount;
var sHead = oList.RemoveHead();
Pm.Debug(sHead);
nCount = oList.GetCount();
for (iRow = nCount; iRow > 0; iRow--)
{
Pm.Debug(oList.RemoveTail());
}