Array manual question.

  • I am learning how to use arrays. The manual seems to be saying something that is contradictory. Am I missing something or is it describing "push front" and "push back" in the exact same way?

    (The following is a copy from the online manual.)

    Manipulating arrays

    A one-dimensional array, sized N x 1 x 1, serves as a simple list of N values. The actions in the Manipulation category (e.g. Push, Pop) allow one-dimensional arrays to be used like other data structures. (These actions work with multidimensional arrays, but are intended for the one-dimensional case.)

    For example, the following scheme implements a queue (first in first out, or 'FIFO'):

    •Add new items with Push front

    •Retrieve the next value with Array.Back

    •Remove the retrieved value with Pop back

    The following scheme implements a stack (last in first out, or 'LIFO'):

    •Add new items with Push back

    •Retrieve the next value with Array.Back

    •Remove the retrieved value with Pop back

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • And the question is ?

  • I think I misunderstood what the manual is actually saying. The emphasis is on the whether the example is a queue or a stack and where the new items initially go. Front or back. The retrieving location is the same in both examples.

    My mistake. I think I get it now.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)