Page 1 sur 1

Bug ou pas ?

Publié : dim. 18/juil./2010 12:33
par jerexgrz

Code : Tout sélectionner

Dim Tab.s (30,30,0)

tab(20,5,0) = "TT"
tab(22,5,0) = "TT"
tab(20,6,0) = "TT"
tab(21,6,0) = "SS"
tab(22,6,0) = "TT"
tab(20,7,0) = "TT"
tab(21,7,0) = "TT"
tab(22,7,0) = "TT"

ZoneX.l = 21
ZoneY.l = 6

range.l = 1

Tx.l = 0
Ty.l = 0

For ScanY = ZoneY - range To ZoneY + ty + range
    For ScanX = ZoneX - range To ZoneX + tx + range
          
       ;If Not (scanx >= zonex And scanx =< zonex + tx) And Not (scany => zoney And scany <= zoney + ty)    ; BUG ?
       ;If Not (scanx = zonex And scanx = zonex) And Not (scany = zoney And scany = zoney)  ; BUG ?
        If Not (scanx = zonex) And Not (scany = zoney)      ; BUG ?
       ;If Not scanx = zonex And Not scany = zoney           ; Ok 
           Debug scanx
           Debug scany
           Debug tab(scanx,scany,0)
           Debug "===="   
        EndIf
       
    Next ScanX
Next ScanY

Je n'ai pas le meme resultat avec : If Not scanx = zonex And Not scany = zoney par rapport à :
If Not (scanx = zonex) And Not (scany = zoney)
Pourtant, il s'agit de la meme chose !

Re: Bug ou pas ?

Publié : dim. 18/juil./2010 12:41
par G-Rom
Met le debut de ta parenthèse avec le not ;)

Re: Bug ou pas ?

Publié : dim. 18/juil./2010 20:05
par jerexgrz
Merci de la réponse. On devrait retrouver quelques infos sur le NOT dans l'aide.