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.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

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.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE