Ce que fait la commande
DictionaryGetFloat prend dictionary (un entier) et key (une chaîne), et rend un flottant. C'est la première de 2 formes.
Syntaxe
1
DictionaryGetFloat(dictionary integer, key string) → float2
DictionaryGetFloat(dictionary integer, key string, defaultValue float) → floatParamètres
| Nom | Type | Dans les formes |
|---|---|---|
| dictionary | integer | toutes |
| key | string | toutes |
| defaultValue | float | 2 |
Chaque forme rend
float
Exemple · engendré
Forme 1 : la plus courte
DO Print(DictionaryGetFloat(1, "score")) Sync()LOOPForme 2 : avec tous les arguments
DO Print(DictionaryGetFloat(1, "score", 1.0)) Sync()LOOPDictionaryGetFloat est appelé et sa réponse est affichée à chaque image. La boucle DO … LOOP n'est pas décorative : un programme BASIC classique s'arrête dès qu'il n'a plus de lignes, et c'est Sync() qui dessine l'image.