#490 Error in assigning values to a pointer array

closed-fixed
nobody
None
5
2012-10-01
2012-09-30
Joanna
No

In the current CVS, an error is generated when assigning values to a pointer array if the elements in the array are variables:

p = ptrarr(2,2,/allocate_heap)
i = 1
j = 0
*p[i,j] = [3,2,5]

which generates this error:
% Expression must be a scalar in this context: <Expression> <POINTER Array[1]>
% Execution halted at: $MAIN$

if instead the command was:
*p[1,0] = [3,2,5]
GDL would not output any errors.

Thanks.
Joanna

Discussion

  • Marc Schellens
    Marc Schellens
    2012-10-01

    • status: open --> closed-fixed
     
  • Marc Schellens
    Marc Schellens
    2012-10-01

    Error was actually caused by GDL returning a 1-element array instead of a scalar on the left side.
    Thanks for reporting.