The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Incorrect values asigned to an uinteger matrix (*solved*)
#1
Si se compila el siguiente fragmento de código el resultado es muy diferente del esperado:
Code:
Dim obj(15) as uinteger for i = 0 to 15 obj(i) = 9999 Print Obj(i) nex i

Si ahora consultas el resultado del array de objs, en lugar de contener todos los elementos 9999 contienen el valor 255.

Compiling the following code, the value of the matrix elements is totally diferent to the expected one:
Code:
Dim obj(15) as uinteger for i = 0 to 15 obj(i) = 9999 Print Obj(i) nex i

All the elements of the obj matrix are now 255 instead 999.
Using a intermediate scalar variable the result is correct.

NOTE: Bug fixed in the new version 1.3.0s952
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)