Ce que fait la commande
TextCharX prend iTextIndex (un entier) et iCharIndex (un entier), et rend un flottant. C'est la première de 2 formes. iTextIndex est l'identifiant d'un objet Text, celui que CreateText a rendu : c'est ainsi que l'appel sait sur quoi agir.
Syntaxe
1
TextCharX(iTextIndex integer, iCharIndex integer) → float2
TextCharX(iTextIndex integer, iCharIndex integer, x float)Paramètres
| Nom | Type | Dans les formes |
|---|---|---|
| iTextIndex | integer | toutes |
| iCharIndex | integer | toutes |
| x | float | 2 |
Ce que rend chaque forme
| 1 | TextCharX(text, char) | float |
| 2 | TextCharX(text, char, 100.0) | rien |
Exemple · engendré
Forme 1 : la commande rend l'identifiant
text = CreateText("hello")char = CreateTweenChar(1.0)DO Print(TextCharX(text, char)) Sync()LOOPForme 2 : vous choisissez l'identifiant
text = CreateText("hello")char = CreateTweenChar(1.0)TextCharX(text, char, 100.0)DO Sync()LOOPCreateText et CreateTweenChar sont là pour donner à l'appel quelque chose sur quoi agir : TextCharX est la ligne qui compte. 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.