GLBasic forum

Main forum => GLBasic - en => Topic started by: ampos on 2010-Oct-07

Title: DIMDEL help
Post by: ampos on 2010-Oct-07
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.
Title: Re: DIMDEL help
Post by: Minion on 2010-Oct-07
Use "DELETE p" instead (Im asuming you`re trying to delete the element within the FOREACH loop ?)
Title: Re: DIMDEL help
Post by: MrTAToad on 2010-Oct-07
If you need to use DIMDEL, then you need a standard FOR loop
Title: Re: DIMDEL help
Post by: ampos on 2010-Oct-07
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.