public void Clear(){ First=null; Last=null; Length=0; }
public void Push(float value) { // Create the entry: CffStackEntry entry = new CffStackEntry(value); Length++; if (First == null) { First = Last = entry; } else { entry.Previous = Last; Last = Last.Next = entry; } }
public void Push(float value){ // Create the entry: CffStackEntry entry=new CffStackEntry(value); Length++; if(First==null){ First=Last=entry; }else{ entry.Previous=Last; Last=Last.Next=entry; } }
public float Shift(){ // Remove first one: CffStackEntry toRemove=First; // Update first: First=toRemove.Next; if(First==null){ Last=null; Length=0; }else{ First.Previous=null; Length--; } return toRemove.Value; }
public float Pop() { // Remove last one: CffStackEntry toPop = Last; // Update last: Last = toPop.Previous; if (Last == null) { First = null; Length = 0; } else { Last.Next = null; Length--; } return(toPop.Value); }
public float Shift() { // Remove first one: CffStackEntry toRemove = First; // Update first: First = toRemove.Next; if (First == null) { Last = null; Length = 0; } else { First.Previous = null; Length--; } return(toRemove.Value); }
public float Pop(){ // Remove last one: CffStackEntry toPop=Last; // Update last: Last=toPop.Previous; if(Last==null){ First=null; Length=0; }else{ Last.Next=null; Length--; } return toPop.Value; }
public void Clear() { First = null; Last = null; Length = 0; }