DIMDEL help

Previous topic - Next topic

ampos

How do I use DIMDEL inside a FOREACH?

Code (glbasic) Select

FOREACH p IN puntos[]
px=fondo[p.x][p.y+1]
IF px=0
INC p.y
ELSE
fondo[p.x][p.y]=1
DIMDEL puntos[],p
ENDIF
   NEXT


I dont get it.

Minion

Use "DELETE p" instead (Im asuming you`re trying to delete the element within the FOREACH loop ?)

MrTAToad

If you need to use DIMDEL, then you need a standard FOR loop

ampos

Quote from: Minion on 2010-Oct-07
Use "DELETE p" instead (Im asuming you`re trying to delete the element within the FOREACH loop ?)

Sometimes you forgot a command.

Will try later. Thx.