Difference between revisions of "LlList2String/fr"
Jump to navigation
Jump to search
Gally Young (talk | contribs) (Localized to french) |
Gally Young (talk | contribs) m (proofread) |
||
Line 9: | Line 9: | ||
|caveats | |caveats | ||
|constants | |constants | ||
|examples=<lsl>//ce code illustre les différentes | |examples=<lsl>//ce code illustre les différentes conversions dans le LSL (et l’utilisation des fonctions llList2* ). | ||
// Mieux visible dans l’historique du chat (ctrl-h) | // Mieux visible dans l’historique du chat (ctrl-h) | ||
default | default |
Revision as of 11:23, 21 March 2008
LSL Portail Francophone | LSL Portail Anglophone | Fonctions | Évènements | Types | Operateurs | Constantes | Contrôle d'exécution | Bibliothèque | Tutoriels |
Description
Fonction: string llList2String( list src, integer index );188 | N° de fonction |
0.0 | Delais |
10.0 | Energie |
Renvoie un string correspondant à l’élément à l’index du src.
• list | src | |||
• integer | index |
index accepte les index négatifs.
Si l’élément du list src n’est pas un string, il est alors converti en string.
Si l’index est hors de portée, la fonction renvoie un string null.
Spécifications
Index | Positif | Negatif |
---|---|---|
Premier | 0 | - longueur |
Dernier | longueur - 1 | -1 |
Exemples
<lsl>//ce code illustre les différentes conversions dans le LSL (et l’utilisation des fonctions llList2* ). // Mieux visible dans l’historique du chat (ctrl-h) default {
state_entry() { list my_list = ["a", "0xFF", "0xFF.FF", "1.0e3", 1, 2.0, <1,2,3>, <1,2,3,4>, llGetOwner()]; integer i = 0; integer end = llGetListLength(my_list); for (; i<end; ++i) { llOwnerSay("string=" + llList2String(my_list,i) + "\n integer=" + (string)llList2Integer(my_list,i) + " OR " +(string)((integer)llList2String(my_list,i)) + "\n float=" + (string)llList2Float(my_list,i) + " OR " +(string)((float)llList2String(my_list,i)) + "\n vector=" + (string)llList2Vector(my_list,i) + " OR " +(string)((vector)llList2String(my_list,i)) + "\n rot=" + (string)llList2Rot(my_list,i) + " OR " +(string)((rotation)llList2String(my_list,i)) + "\n key=" + (string)llList2Key(my_list,i) + " OR " +(string)((key)llList2String(my_list,i)) ); } }
}</lsl>
Notes
Pour convertit un string au format hexadécimal en integer, utilisez llList2String puis convertissez le résultat en integer : ‘’(integer)valeur’’
Pour convertir cet integer en hexadécimal, utilisez hex.
Voir également
Fonctions
• llGetListEntryType | Renvoie le type d’un élément de list | |||
• llList2Float | Renvoie un élément de list | |||
• llList2Integer | Renvoie un élément de list | |||
• llList2Key | Renvoie un élément de list |
Articles
• | Negative_Index |
Vous cherchez encore des informations ? Peut-être cette page du LSLwiki pourra vous renseigner.