Difference between revisions of "LlList2Float/fr"

From Second Life Wiki
Jump to navigation Jump to search
(Localized to french)
 
m (Robot: <pre> -> <lsl>)
 
(2 intermediate revisions by one other user not shown)
Line 11: Line 11:
**Dans ces deux cas, utilisez alors la syntaxe : (float)[[llList2String/fr|llList2String]](src, index);
**Dans ces deux cas, utilisez alors la syntaxe : (float)[[llList2String/fr|llList2String]](src, index);
|constants
|constants
|examples=<pre>// Mieux visible dans l’historique du chat(ctrl-h)
|examples=<lsl>// Mieux visible dans l’historique du chat(ctrl-h)
default
default
{
{
Line 28: Line 28:
         }
         }
     }
     }
}</pre>
}</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetListEntryType/fr|llGetListEntryType]]|Renvoie le type d’un élément d’un list}}
|also_functions={{LSL DefineRow||[[llGetListEntryType/fr|llGetListEntryType]]|Renvoie le type d’un élément d’un list}}
{{LSL DefineRow||[[llList2Integer/fr|llList2Integer]]|Renvoie un élément au format integer}}
{{LSL DefineRow||[[llList2Integer/fr|llList2Integer]]|Renvoie un élément au format integer}}
{{LSL DefineRow||[[llList2String/frllList2String|llList2String/frllList2String]]|Renvoie un élément au format string}}
{{LSL DefineRow||[[llList2String/fr|llList2String]]|Renvoie un élément au format string}}
|also_events
|also_events
|also_tests
|also_tests

Latest revision as of 20:13, 4 August 2009

Description

Fonction: float llList2Float( list src, integer index );

Renvoie un float correspondant à l'index du list src.

• list src
• integer index

index accepte les index négatifs.
Si l’élément identifié dans le list src par l'index n’est pas un float, il est converti en float, si cela n’est pas possible, la valeur renvoyée est zéro .

Spécifications

Index Positif Negatif
Premier 0 - longueur
Dernier longueur - 1 -1

Avertissements

  • Quand cette fonction est utilisée sur un string, cette dernière ne peut renvoyer que des floats en notation simple et ne gérera pas de formats hexadécimaux ou de notations scientifiques.
    • Dans ces deux cas, utilisez alors la syntaxe : (float)llList2String(src, index);

Exemples

<lsl>// Mieux visible dans l’historique du chat(ctrl-h) default {

   state_entry()
   {
       list my_list = ["a", 1, 2.0, <1,2,3>, <1,2,3,4>, llGetOwner()];
       integer i;
       for (i=0;i<llGetListLength(my_list); ++i)
       {
           llOwnerSay("string=" + llList2String(my_list,i)
                       + "\n   integer=" + (string)llList2Integer(my_list,i)
                       + "\n   float=" + (string)llList2Float(my_list,i)
                       + "\n   vector=" + (string)llList2Vector(my_list,i)
                       + "\n   rot=" + (string)llList2Rot(my_list,i)
                       + "\n   key=" + (string)llList2Key(my_list,i) );
       }
   }

}</lsl>

Voir également

Fonctions

•  llGetListEntryType Renvoie le type d’un élément d’un list
•  llList2Integer Renvoie un élément au format integer
•  llList2String Renvoie un élément au format string

Articles

•  Negative_Index
Vous cherchez encore des informations ? Peut-être cette page du LSLwiki pourra vous renseigner.