Répondre à : Position caractère dans chaîne de texte

Accueil Forums Programmation WIMS Programmation d’exercices OEF Position caractère dans chaîne de texte Répondre à : Position caractère dans chaîne de texte

#3139
Eric Guillet
Participant
Up
0
Down
::

Je me réponds…

\text{m=2456.8}
\integer{cnt=wims(charcnt \m)}
\integer{lst=wims(text mark . in \m)}
\if {\lst!=0}{\integer{pos=\cnt-(log10(\lst))}}{\text{pos=}}

\pos retourne la position de . dans \m (vide si pas de .)
Pas très concis mais en attendant ça fonctionne…