[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comprends pas les if()
Essaye en retappant ton code car Director à la fâcheuse habitude
d'offrir son petit bug "float".
A+
Enzo
On jeudi 5 septembre 2002, CWF1Jerome@aol.com wrote:
>salut la piste
>
>ya un truc que je pige pas !
>first,sec,from sont des vecteurs
>
> ttA=(sec-first).magnitude
> ttB=(from-first).magnitude+(from-sec).magnitude
> if ttA=ttB then
> put "egal"
> else
> put "pas egal"
> end if
> put ttA && "**" && ttB
>
>--- "pas egal"
>--- 50.000 ** 50.000
>
>je comprends pas pourkoi dans ce cas, le if ne reconnais pas
>que ttA=ttB
>
>j'ai essayé avec des +1
> ttA=(sec-first).magnitude
> ttB=(from-first).magnitude+(from-sec).magnitude
> if (ttA+1)=(ttB+1) then
> put "egal"
> else
> put "pas egal"
> end if
> put ttA && "**" && ttB
>
>
>marche toujours pas. Par contre avec integer:
> ttA=(sec-first).magnitude
> ttB=(from-first).magnitude+(from-sec).magnitude
> if integer(ttA)=integer(ttB) then
> put "egal"
> else
> put "pas egal"
> end if
> put ttA && "**" && ttB
>
>fonctionne !!! le prob C que moi je peut avoir 1 ou 2 chiffres apres
>la
>virgule !! qq un à une idée ?
>
pistes-l List Home |
Main Index |
Thread Index
Search archives
|