List/Map in Structure - recursion error

Everything else that doesn't fall into one of the other PB categories.
User avatar
Kiffi
Addict
Addict
Posts: 1484
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: List/Map in Structure - recursion error

Post by Kiffi »

Fred wrote:Removed for List and Map.
Image

Greetings ... Kiffi
Hygge
User avatar
NicTheQuick
Addict
Addict
Posts: 1502
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: List/Map in Structure - recursion error

Post by NicTheQuick »

Juhuu! ...eehm... Yeah!
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: List/Map in Structure - recursion error

Post by srod »

Now that beta 3 is upon us I've been having a real crack at embedding lists/maps within structures. I've nested them 3 deep (structure contains a map of structures each of which contains a list of structures, each of which...)

Seems pretty solid right now. ForEach worked fine with the various levels.

In a word, absolutely bloody awesome! Okay, that was 3 words, but 1 simply wasn't enough. :) There is some serious work there behind the scenes by the compiler to get all of this working!

Thanks Fred/Timo.
I may look like a mule, but I'm not a complete ass.
Little John
Addict
Addict
Posts: 4773
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: List/Map in Structure - recursion error

Post by Little John »

srod wrote:absolutely bloody awesome!
I couldn't have said it better. ;-)
Thanks a lot, Fred and Timo, for the new powerful possibilities for creating trees and similar data structures!

Regards, Little John
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: List/Map in Structure - recursion error

Post by freak »

quidquid Latine dictum sit altum videtur
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: List/Map in Structure - recursion error

Post by Fred »

It worth noting than you can call FreeArray(), FreeList(), FreeMap(), or even ClearStructure() right after the structure creation if you want the behaviour "structure not initialized by default". The NewList, Dim and NewMap() will have to be called on demand.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: List/Map in Structure - recursion error

Post by freak »

Fred wrote:It worth noting than you can call FreeArray(), FreeList(), FreeMap(), or even ClearStructure() right after the structure creation if you want the behaviour "structure not initialized by default". The NewList, Dim and NewMap() will have to be called on demand.
Added a note to the post as well.
quidquid Latine dictum sit altum videtur
Post Reply