This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
deprecated:vba:dictionary [03.07.2014 11:11:40] yaslaw [Variante: Parameterliste (dListSimple)] |
deprecated:vba:dictionary [01.10.2014 10:13:03] (current) yaslaw vba:functions:dictionary renamed to deprecated:vba:dictionary |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== [VBA] dictionary() ====== | ====== [VBA] dictionary() ====== | ||
+ | {{section>:snippets#deprecated&noheader&firstseconly}} | ||
+ | Die Neue Funktion heisst [[vba:cast:cdict]] | ||
+ | |||
+ | |||
Download{{:vba:functions:cls_dictionaray.bas|cls_dictionaray.bas}} | Download{{:vba:functions:cls_dictionaray.bas|cls_dictionaray.bas}} | ||
Line 51: | Line 55: | ||
==== Variante: Ein Array mit allen Keys, der Zweite mit allen Values (dCombine) ==== | ==== Variante: Ein Array mit allen Keys, der Zweite mit allen Values (dCombine) ==== | ||
- | Zwei Parameter werden mitgegeben werden.Der Erste beinhaltet alle Keys, der Zweite di dazugehörigen Values | + | Zwei Parameter werden mitgegeben werden.Der Erste beinhaltet alle Keys, der Zweite die dazugehörigen Values |
<code>dictionary([dCombine,] array(key1 [,key2... [,key#]]), array(value1[, value2...[, value#]]))</code> | <code>dictionary([dCombine,] array(key1 [,key2... [,key#]]), array(value1[, value2...[, value#]]))</code> | ||
<code vb>print_r dictionary(array("A", "B"), array("aa", "bb")) | <code vb>print_r dictionary(array("A", "B"), array("aa", "bb")) | ||
Line 60: | Line 64: | ||
==== Varainte: Eine beliebige Anzahl Dictionaries (dDictionary) ==== | ==== Varainte: Eine beliebige Anzahl Dictionaries (dDictionary) ==== | ||
- | Alle Parametersind Dictionaries. DIese werden zusammengeführt zu einem | + | Alle Parameter sind Dictionaries. DIese werden zusammengeführt zu einem |
<code>dictionary([dDictionary,] dictionary1 [,dictionary2... [,dictionary#]])</code> | <code>dictionary([dDictionary,] dictionary1 [,dictionary2... [,dictionary#]])</code> | ||
<code vb>print_r dictionary(dictionary(dListSimple, 1,2,3), dictionary("A","a","B","b")) | <code vb>print_r dictionary(dictionary(dListSimple, 1,2,3), dictionary("A","a","B","b")) | ||
Line 71: | Line 75: | ||
)</code> | )</code> | ||
- | ==== Variante: Ein Array in ein Dictionary wandeln (dArray= ==== | + | ==== Variante: Ein Array in ein Dictionary wandeln (dArray) ==== |
Hat nur ein Array als Parameter. Aus dem Array wird ein Dictionary erstellt | Hat nur ein Array als Parameter. Aus dem Array wird ein Dictionary erstellt | ||
<code>dictionary([dArray,] array(value1 [,value2... [,value#]]))</code> | <code>dictionary([dArray,] array(value1 [,value2... [,value#]]))</code> |