Menu ▾ ▴

#2901 Failure in defining an array if size not defined

None
pending-fixed
nobody
None
5 days ago
2026-10-23
No

Hey,

in gnuplot v6.0.5 I get the error "unexpected or unrecognized token: ]" when defining an array whereas the array elements themselves are array elements, in the case that I do not declare the array size ahead, see the example below:

#works:
array A = [1]
array B[2] = [A[1], 1]
#produces an error:
array A = [1]
array B = [A[1], 1]

if just using numbers, constant expressions, or variables, I do not need to define the array size, so I guess this is a bug.

Cheers,
Alex

Discussion

  • Ethan Merritt

    Ethan Merritt - 2026-10-23

    Version 6.1 handles this without error. It's too late for the 6.0.6 release, but I will look into how much work it would be to back-port the revised array parsing.

     
    👍
    1
  • Ethan Merritt

    Ethan Merritt - 5 days ago
    • status: open --> pending-fixed
    • Group: -->
    • Priority: -->
     

Log in to post a comment.