PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WD21  +=
WD21 +=
Iniciado por Roy, 26,jun. 2016 10:58 - No hay respuesta
Miembro registrado
47 mensajes
Publicado el 26,junio 2016 - 10:58
What is wrong in this code?

Numbers is array of 10 int
Line is int
Value_x is int = 5

for x = 1 to 4
Number[x]+= Value_x
end

When I debug this code then on the line Number[x] += Value_x the debugger stops and says
WDTST.EXE doesn't work anymore and sometimes WINDEV21 crashes.

When I change the code as follows:

for x = 1 to 4
Number[x] = Number[x]+ Value_x
end

then all works fine.

Is this a bug in the debugger or is it not possible to use += for an array?

--
Roy van der Lee