Skip to content

Modern LinkedList PopBack

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › LinkedList › LinkedList › PopBack

PopBack

Removes and returns the back value, or a default value if the list is empty.

Syntax

PopBack( ) as T

Examples

#import "std/numeric"
#import "std/containers"
using containers, numeric

dim q as LinkedList( of ustring )
q.PushBack( "a" ) : q.PushBack( "b" )

print q.PopBack( )       '' b
print q.Count            '' 1

'' PushBack + PopBack is a stack; PushBack + PopFront is a queue
dim e as LinkedList( of ustring )
print "[" & e.PopBack( ) & "]"       '' [] -- empty gives a blank T

Library: LinkedList
Category: LinkedList
Documented under: Members

Clone this wiki locally