but you say "PB Doc for AddMapElement wrote... " Where you find the PB Doc

I have just the "Survival Guide" and some sample from the "v440_examples"
Many Thanks for all...
press [F1]GeBonet wrote:Where you find the PB Doc
I noticed that the SQLite lib is at 3.6.14.2 but there have been 4 releases since then, with the latest release (just released Sept 11) at 3.6.18.Fred wrote:We updated third part libs as well, so if you use SQLite, RegExp, etc. it could explain that.
Uuuh, there is a severe bug: Porsche is missing on that map!netmaestro wrote:Lovely! Lots of docs for the new stuff and optional number-of-slots parameter is added for the NewMap command. Thanks for this
PureBasic must be selling well, somebody's been looking at catalogues...PB doc for NewMap wrote: NewMap Cars.Car()
;
Cars("Ferrari F40")\Weight = 1000
Cars()\Speed = 320
Cars()\Price = 500000
Cars("Lamborghini Gallardo")\Weight = 1200
Cars()\Speed = 340
Cars()\Price = 700000
Normaly, you are right and from many year... But With the news version a Doc it's not update...Kaeru Gaman wrote:press [F1]GeBonet wrote:Where you find the PB Doc
or look here: http://www.purebasic.com/documentation/index.html
... but the online doc maybe not yet updated...
@pbteamblueznl wrote:I pretty much skipped 4.40b2 but I'll try this one a bit more extensively...
Can't you zoom the text using CTRL + MOUSE WHEEL ?adshead wrote:Thought I'd just posted this message but didn't seem to appear so here it is again...
I still can't change the font size on the Mac version - makes the product unusable in my opinion as the font is just too small
I think it's 14 for PureBasic 4.0... might only be 13, not 100% sure. But it's at least 13.Flype wrote:Quizz :
what was the max betas record in the past ?
Why is this still NOT done!?!?!?! It's been posted time after time!!!! I really does irk me, because i use PB on my Mac and the font is awful!adshead wrote:Thought I'd just posted this message but didn't seem to appear so here it is again...
I still can't change the font size on the Mac version - makes the product unusable in my opinion as the font is just too small
With this version... I have found only for 'Flags' "#PB_Map" with for value #PB_Map=9, but not what for ?netmaestro wrote:...but they don't seem to be actually included yetPB Doc for AddMapElement wrote:'Flags' is an optional parameter which can be one of the following value:
#PB_Map_ElementCheck : Checks if an element with a same key already exists, and replaces it (default).
#PB_Map_NoElementCheck: No element check, so if a previous element with the same key was already present, it will be lost and couldn't be accessed anymore. Its memory will be only released if ClearMap() is used.I would guess that elementcheck is 0 as it's the default, and noelementcheck 1. I tested it and it seems right, but I wouldn't take my word for anything.
Code: Select all
; -------------------------------------------------------------------------------------------------------
; Map exemple Single Key$ : ou Table avec clef d'accès unique...
; ---------------------------------------------------------------------------------------------------------------
;
; Commandes disponibles :
;
; AddMapElement(Map(), Key$ [, Flags]) - Ajoute un nouvel element vide dans la "map".
; ClearMap(Map()) - Efface tout les elements dans la "map" et libère la mémoire.
; FindMapElement(Map(), Key$) - Cherche l'element spécifié dans la "map".
; DeleteMapElement(Map() [, Key$]) - Enlève l'élément en cours de la "map" .
; MapKey(Map()) - Renvois la Clef de l'element courant de la map.
; MapSize(Map()) - Rendvois le nombre d'éléments contenu dans la "map".
; NextMapElement(Map()) - Deplace l'élement courent vers le suivant dans la "map".
; ResetMap(Map()) - Deplace le pointeur en tête de la "map"
;
; Map() - Accéde à l'élement courant dans la "map"; access the current element in the map
; Map("key") - Accéde à l'élément correspondant à la clef et il devient l'élement courant
;
; -----------------------------------------------------------------------------------------------------------------------
; Une table de hachage est une Structure de données qui permet une association clé-élément.
; ==================================================================
; Autre Exemple / Other sample :
; ==================================================================
NewMap Test.s() ; Table indexé selon le Hascode Sur la Clef .....
Dim T$(6) ; Table qui contientdrait les clefs.... indépendament de Test.s()
;
; Ordre de création ....
T$(1)="Fred" :Test(T$(1)) = "1 - Any sentence that contains all the desired item"
T$(2)="Timo" :Test(T$(2)) = "2- Is two or 2"
T$(3)="Albert" :Test(T$(3)) = "3- And this is the additional writing"
T$(4)="Joseph" :Test(T$(4)) = "4- c'est une série B"
T$(5)="Dorothe":Test(T$(5)) = "5- It's not a joke but not serious"
T$(1)="Fred" :Test(T$(1)) = "1 - Any sentence that contains all the desired item"
T$(2)="Timo" :Test(T$(2)) = "2- est deux ou écrit 2"
T$(3)="Albert" :Test(T$(3)) = "3- And this is the additional writing"
T$(4)="Joseph" :Test(T$(4)) = "4- It's some picture 'B' serie"
T$(5)="Dorothe":Test(T$(5)) = "5- It's not a joke but not serious"
T$(6)="Roberto":Test(T$(6)) = "6- Eu acho que o pais de você e o Brasil ?"
AddMapElement(Test(), "Gerhard", #PB_Map) ; - Addjoute un nouvel element vide dans la "Map".
;
;--------------------------------------------------------
Debug " == Organisation de la table selon le Hash coding de Map ==="
ResetMap(Test()) ; Move to the begin of the Map - Deplace le pointeur en tête de la "map"
While NextMapElement(Test())
Debug Str(l+1)+" - "+Test() ; Here is the order of the map.... Ici l'ordre dans la table
l+1
Wend
l=0
Debug "====================================================="
Debug " Ordre selon l'appel par les clefs... donc de l'enregistrement correspondant"
Debug "-----------------------------------------------------------------------------------------------"
;--------------------------------------------------------------------------------------------------------------------
; Ordre d'extraction par appel en utilisant la clef / Calling Forme
;--------------------------------------------------------------------------------------------------------------------
; 1 on appelle la première clef du de T$(1) --- Various Calling form !
FindMapElement(Test.s(), "Fred")
Debug "Fred="+Test.s()
; 2 on appelle la quatrième clef de T$(4)
FindMapElement(Test.s(), "Joseph")
Debug "Joseph"+"="+Test.s()
; 3 on appelle la cinquième clef de T$(5)
FindMapElement(Test.s(), "Dorothe")
Debug "Dorothe"+"="+Test.s()
; 4 on appelle la cinquième clef de T$(2)
B$="Timo"
FindMapElement(Test.s(), B$)
Debug B$+"="+Test.s()
; 5 on appelle la cinquième clef de T$(3) ="Albert"
;
FindMapElement(Test.s(), T$(3))
Debug B$+"="+Test.s()
; ----------------------------------------------------------------------------------------------
Debug "===== Numero element ======="
Debug "Donné par MapSize()="+Str(MapSize(Test()))
Debug "========================="
; ----------------------------------------------------------------------------------------------
ResetMap(Test()) ; Move to the begin of the Map - Deplace le pointeur en tête de la "map"
While NextMapElement(Test())
Debug Str(l+1)+" - "+Test() ; Here is the order of the map.... Ici l'ordre dans la table
l+1
Wend
Debug "======================="
Debug " classement par ordre des clefs"
Debug "-------------------------------------------------"
; OR
ResetMap(Test()) ; Move to the begin of the Map - Deplace le pointeur en tête de la "map"
For i=1 To 6
Debug Str(i)+" - "+Test(T$(i)) ; Here is we find with the key.... geved from the array T$(i)... recupère par la clef...
Next i
; ------------------------ Other form to call -------------------
Debug "--------------- Autre forme d'utilisation de Map -----------------"
;
FindMapElement(Test.s(),InputRequester("Recherche","Donnez la clef d'accès : ", Clef$))
MessageRequester("Votre réponse est : ",Test.s(),#PB_MessageRequester_Ok )
;
Debug Test.s()
Debug "---------------- FIN ---- END -------------"
;
ClearMap(Test.s())
End
; ===================================================
; Simplified form using the features "MAP"
; GeBonet
; ===================================================
; If you have ....
;
NewMap Test.s() ;
Dim T$(5) ; Array with somme name or other thiing.... Here name.
;
; Buld of the Map and array with the key...
;
T$(1)="Fred" :Test(T$(1)) = "1 - Any sentence that contains all the desired item"
T$(2)="Timo" :Test(T$(2)) = "2- Is two or 2"
T$(3)="Albert" :Test(T$(3)) = "3- And this is the additional writing"
T$(4)="Joseph" :Test(T$(4)) = "4- c'est une série B"
T$(5)="Dorothe":Test(T$(5)) = "5- It's not a joke but not serious"
T$(6)="Roberto":Test(T$(6)) = "6- Eu acho que o pais de você e o Brasil ?"
; -------------------------------------------------
; A Simple access of this is ...
; -------------------------------------------------
FindMapElement(Test.s(),InputRequester("research","Give the key name : ", Clef$))
MessageRequester("Your answers is / Votre réponse est : ",Test.s(),#PB_MessageRequester_Ok )
;
End
Maybe because it is not as simple as you think ?Kale wrote:Why is this still NOT done!?!?!?! It's been posted time after time!!!! I really does irk me, because i use PB on my Mac and the font is awful!adshead wrote:Thought I'd just posted this message but didn't seem to appear so here it is again...
I still can't change the font size on the Mac version - makes the product unusable in my opinion as the font is just too small