[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Array push e pop in FILO (first in, last out) similar mode
[Thread Prev] | [Thread Next]
- Subject: Re: Array push e pop in FILO (first in, last out) similar mode
- From: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Fri, 17 Jul 2026 15:41:01 +0100
- To: Gambas Mailing List <user@xxxxxxxxxxxxxxxxxxxxxx>
On Fri, 17 Jul 2026, 14:54 akrobaticone, <akrobaticone@xxxxxxxxx> wrote: > Hello, > I need to manage a predefined-size array with FILO (First In Last Out) > similar modes. Every time I insert a data item, it's placed at position 0 > and the others are incremented by one position. The first inserted item is > then deleted once it reaches the top. > Obtaining this function from code is fairly simple, but it might be useful > to have a built-in function that performs this mode. > For example, array.push(data, FILO_mode) The same function, in reverse, > could be used to retrieve the data. array.pop(data, FILO_mode) > I don't know if this functionality can be implemented with the current > methods. > I hope I've been clear. > > > Michele > Like this? Push to first MyArray.Add(Data, 0) Pop from first Data = MyArray.Extract(0, 1)[0] Respects BruceS
| Re: Array push e pop in FILO (first in, last out) similar mode | akrobaticone <akrobaticone@xxxxxxxxx> |
| Array push e pop in FILO (first in, last out) similar mode | akrobaticone <akrobaticone@xxxxxxxxx> |