First , thanks a lot at you all for your quicks answers
@threedslider
I want just can read in a list without needed to pertubating the LIST
I think this function is missing
The result i wanted, i's the same i have given, but without change current element
NicTheQuick wrote:Regarding the initial question: Yes, it is not possible to read directly from an element without changing the current element.
That's what I was afraid of.

Thank you for confirming that.
@jacdelad and Axolotl and NAF
I didn't understand what this solution ChangeCurrentElement would be used for. ChangeCurrentElement and PushListPosition(mylist()) that JACELAD talk too, it's a little bit that i search but when even not as convenient to use as a direct reading at my advice
NicTheQuick wrote: Thu Jan 22, 2026 2:32 pm
Here's an idea:
Waouhh !! it's exactely what i asked, can be read another element without all moving
Nice peace of code, thanks
@CHRISR
Very nice code

Perhaps a little bit complicated for my little head

I try to understand it, during all this week
Thanks a lot too
@HEXOR
Waooouh 2

!!! very nice code, the pointers waltz

That's exactly what I was looking for, but not specifically for the before or after recording, but anywhere in the list
A style of
Code: Select all
MyElement$ = ReadElement(MyList(), 3)
WriteElement(MyList(), 3, "Kcc 2")
@FOR ALL
In fact it's the first time in more than 20 years i do PB, that i use the LIST()
Because i've always found this function heavy to use, compared to MAP and arrays
Firstly, this function addElement() forced to use for each adding
Why like the MAP we cannot record directly the element after the current element, without write again a line before ?
With MAP also there are the AddMapElement() but we can also adding an element directly with MyMap("New element") and it's magical the element is recorded, i love the map now that I finally understand them
The only one default, it's it is never natively sorted
Secondely, why it's impossible to read and again worst writing directly an element, without all moving ?
since the list never changes order, unlike the MAP, further more in the variable viewver there are a number ListLangage(0),ListLangage(1),2,3, etc
so there are good a number for each element of the list
This wouldn't prevent other functions, certainly for more complex things I'm not aware of, but I find that I miss direct reading and writing., for have a simple code without X lines
Again thanks for all your nices codes and your advices
I wish to you all a very good end of day 