O'Reilly logo

DarkBASIC Pro Game Programming, Second Edition by Joshua R. Smith, Jonathan S. Harbour

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introduction to Data Sequences and Arrays

A data sequence can store any data in sequential order. That is, data is read one item at a time, like an assembly line. A stack is another way of describing a data sequence. A stack keeps track of data in a first in, last out order (also known as “FILO”). Alternatively, this can be described as last in, first out (“LIFO”). Figure 5.6 illustrates a common example of a stack, in which plates coming from the dishwasher are added to the stack and immediately removed for service. The first plate added to the stack might never even be used if plates continue to be added as fast as they are removed.

Figure 5.6. A software stack works like a stack of plates, where the last plate added is the first plate removed. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required